|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.authorization.strategies.page.AbstractPageAuthorizationStrategy
public abstract class AbstractPageAuthorizationStrategy
An abstract base class for implementing simple authorization of Pages. Users
should override isPageAuthorized(Class), which gets called for Page
classes when they are being constructed.
| Field Summary |
|---|
| Fields inherited from interface wicket.authorization.IAuthorizationStrategy |
|---|
ALLOW_ALL |
| Constructor Summary | |
|---|---|
AbstractPageAuthorizationStrategy()
|
|
| Method Summary | |
|---|---|
protected boolean |
instanceOf(java.lang.Class type,
java.lang.Class superType)
Works like instanceof operator where instanceOf(a, b) is the runtime equivalent of (a instanceof b). |
boolean |
isActionAuthorized(Component component,
Action action)
Gets whether the given action is permitted. |
boolean |
isInstantiationAuthorized(java.lang.Class componentClass)
Checks whether an instance of the given component class may be created. |
protected boolean |
isPageAuthorized(java.lang.Class pageClass)
Whether to page may be created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPageAuthorizationStrategy()
| Method Detail |
|---|
public boolean isActionAuthorized(Component component,
Action action)
IAuthorizationStrategy
isActionAuthorized in interface IAuthorizationStrategycomponent - The component to be acted uponaction - The action to authorize on the component
IAuthorizationStrategy.isActionAuthorized(wicket.Component,
wicket.authorization.Action)public final boolean isInstantiationAuthorized(java.lang.Class 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 IAuthorizationStrategycomponentClass - The component class to check
IAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)
protected boolean instanceOf(java.lang.Class type,
java.lang.Class superType)
type - The type to checksuperType - The interface or superclass that the type needs to implement
or extend
protected boolean isPageAuthorized(java.lang.Class pageClass)
pageClass - The Page class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||