|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy org.apache.wicket.authorization.strategies.role.annotations.AnnotationsRoleAuthorizationStrategy
public class AnnotationsRoleAuthorizationStrategy
Strategy that checks the
AuthorizeInstantiation
annotation.
Field Summary |
---|
Fields inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy |
---|
ALLOW_ALL |
Constructor Summary | |
---|---|
AnnotationsRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
Construct. |
Method Summary | |
---|---|
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. |
Methods inherited from class org.apache.wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy |
---|
hasAny, isEmpty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationsRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
roleCheckingStrategy
- the authorizer delegateMethod Detail |
---|
public boolean isInstantiationAuthorized(java.lang.Class componentClass)
IAuthorizationStrategy
IUnauthorizedComponentInstantiationListener
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.
componentClass
- The component class to check
IAuthorizationStrategy.isInstantiationAuthorized(java.lang.Class)
public boolean isActionAuthorized(Component component, Action action)
IAuthorizationStrategy
component
- The component to be acted uponaction
- The action to authorize on the component
IAuthorizationStrategy.isActionAuthorized(org.apache.wicket.Component,
org.apache.wicket.authorization.Action)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |