public abstract class ClassAuthorizationStrategy extends WaspAuthorizationStrategy
ISecureComponent.MESSAGE_KEY| Constructor and Description |
|---|
ClassAuthorizationStrategy()
Creates a strategy that checks all implementations of
ISecurePage . |
ClassAuthorizationStrategy(Class<? extends ISecureComponent> secureClass)
Creates a strategy that checks all implementations of the supplied class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Does some cleaning up.
|
protected List<ISecurityCheck> |
getClassChecks(Class<?> clazz,
List<ISecurityCheck> list)
Appends all the
ISecurityChecks of a class and its superclasses to the list. |
protected ISecurityCheck[] |
getClassChecks(Class<? extends org.apache.wicket.request.component.IRequestableComponent> clazz)
Returns the static
ISecurityChecks of a class. |
protected String |
getExceptionMessage(Field field)
Produces a generic exception message including information about the field that caused the
exception.
|
<T extends org.apache.wicket.request.component.IRequestableComponent> |
isInstantiationAuthorized(Class<T> c)
Checks if a class is allowed to be constructed.
|
createMessageSource, get, getActionFactory, getMessageSource, getMessageSource, getSecurityCheck, isActionAuthorized, isClassAuthenticated, isClassAuthorized, isComponentAuthenticated, isComponentAuthorized, isModelAuthenticated, isModelAuthorized, isUserAuthenticated, login, logMessage, logMessage, logMessage, logMessages, logoff, removeMessageSource, setStrategyResolverpublic ClassAuthorizationStrategy()
ISecurePage . All other classes
are granted instantiation rights.public ClassAuthorizationStrategy(Class<? extends ISecureComponent> secureClass)
secureClass - an ISecureComponent (sub)class.public <T extends org.apache.wicket.request.component.IRequestableComponent> boolean isInstantiationAuthorized(Class<T> c)
ISecurityChecks must return true for the
authorization to succeed. If the class does not have any static ISecurityChecks a
ClassSecurityCheck is used to simulate a static securitycheck This way you only need
to assign static checks if you want something special.IAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)protected final ISecurityCheck[] getClassChecks(Class<? extends org.apache.wicket.request.component.IRequestableComponent> clazz)
ISecurityChecks of a class. Note that found checks are cached
therefore all checks should be final.clazz - ISecurityCheck of this class and all its super
classes, or an array of length 0 if none is found.protected List<ISecurityCheck> getClassChecks(Class<?> clazz, List<ISecurityCheck> list)
ISecurityChecks of a class and its superclasses to the list.clazz - list - protected String getExceptionMessage(Field field)
field - public void destroy()
destroy in class WaspAuthorizationStrategyWaspAuthorizationStrategy.destroy()Copyright © 2015. All rights reserved.