|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfbox.pdmodel.encryption.SecurityHandlersManager
This class manages security handlers for the application. It follows the singleton pattern. To be usable, security managers must be registered in it. Security managers are retrieved by the application when necessary.
Method Summary | |
static SecurityHandlersManager |
getInstance()
Get the singleton instance. |
SecurityHandler |
getSecurityHandler(ProtectionPolicy policy)
Get the security handler for the protection policy. |
SecurityHandler |
getSecurityHandler(String filterName)
Retrieve the appropriate SecurityHandler for a the given filter name. |
void |
registerHandler(String filterName,
Class securityHandlerClass,
Class protectionPolicyClass)
register a security handler. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void registerHandler(String filterName, Class securityHandlerClass, Class protectionPolicyClass) throws BadSecurityHandlerException
filterName
- The name of the filter.securityHandlerClass
- Security Handler class to register.protectionPolicyClass
- Protection Policy class to register.
BadSecurityHandlerException
- If there is an error registering the security handler.public static SecurityHandlersManager getInstance()
public SecurityHandler getSecurityHandler(ProtectionPolicy policy) throws BadSecurityHandlerException
policy
- The policy to get the security handler for.
BadSecurityHandlerException
- If it is unable to create a SecurityHandler.public SecurityHandler getSecurityHandler(String filterName) throws BadSecurityHandlerException
filterName
- The filter name.
BadSecurityHandlerException
- If the security handler does not exist.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |