org.apache.wicket.authorization.strategies.role
Class AbstractRoleAuthorizationStrategy
java.lang.Object
org.apache.wicket.authorization.strategies.role.AbstractRoleAuthorizationStrategy
- All Implemented Interfaces:
- IAuthorizationStrategy
- Direct Known Subclasses:
- AnnotationsRoleAuthorizationStrategy, MetaDataRoleAuthorizationStrategy
public abstract class AbstractRoleAuthorizationStrategy
- extends Object
- implements IAuthorizationStrategy
Base strategy that uses an instance of
IRoleCheckingStrategy
.
- Author:
- Eelco Hillenius
Method Summary |
protected boolean |
hasAny(Roles roles)
Gets whether any of the given roles applies to the authorizer. |
protected boolean |
isEmpty(Roles roles)
Conducts a check to see if the roles object is empty. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRoleAuthorizationStrategy
public AbstractRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
- Construct.
- Parameters:
roleCheckingStrategy
- the authorizer delegate
hasAny
protected final boolean hasAny(Roles roles)
- Gets whether any of the given roles applies to the authorizer.
- Parameters:
roles
- the roles
- Returns:
- whether any of the given roles applies to the authorizer
isEmpty
protected final boolean isEmpty(Roles roles)
- Conducts a check to see if the roles object is empty. Since the roles object does not contain
any null values and will always hold an empty string, an extra test is required beyond
roles.isEmpty().
- Parameters:
roles
- the Roles object to test
- Returns:
- true if the object holds no real roles
Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.