public abstract class AbstractPageAuthorizationStrategy extends IAuthorizationStrategy.AllowAllAuthorizationStrategy
isPageAuthorized(Class), which gets called for Page classes when they are being
constructed.IAuthorizationStrategy.AllowAllAuthorizationStrategyALLOW_ALL| Constructor and Description |
|---|
AbstractPageAuthorizationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
instanceOf(Class<?> type,
Class<?> superType)
Works like instanceof operator where instanceOf(a, b) is the runtime equivalent of (a
instanceof b).
|
<T extends IRequestableComponent> |
isInstantiationAuthorized(Class<T> componentClass)
Checks whether an instance of the given component class may be created.
|
protected <T extends Page> |
isPageAuthorized(Class<T> pageClass)
Whether to page may be created.
|
isActionAuthorized, isResourceAuthorizedpublic final <T extends IRequestableComponent> boolean isInstantiationAuthorized(Class<T> componentClass)
IAuthorizationStrategyIUnauthorizedComponentInstantiationListener that is configured in
the security settings will be called. The default implementation of
that listener throws a UnauthorizedInstantiationException.
If you wish to implement a strategy that authenticates users which cannot access a given Page
(or other Component), you can simply throw a
RestartResponseAtInterceptPageException in your implementation of
this method.
isInstantiationAuthorized in interface IAuthorizationStrategyisInstantiationAuthorized in class IAuthorizationStrategy.AllowAllAuthorizationStrategycomponentClass - The component class to checkIAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)protected boolean instanceOf(Class<?> type, Class<?> superType)
type - The type to checksuperType - The interface or superclass that the type needs to implement or extendCopyright © 2006–2014 Apache Software Foundation. All rights reserved.