Class AbstractRoleAuthorizationStrategy
- java.lang.Object
-
- org.apache.wicket.authorization.IAuthorizationStrategy.AllowAllAuthorizationStrategy
-
- org.apache.wicket.authroles.authorization.strategies.role.AbstractRoleAuthorizationStrategy
-
- All Implemented Interfaces:
IAuthorizationStrategy
- Direct Known Subclasses:
AnnotationsRoleAuthorizationStrategy
,MetaDataRoleAuthorizationStrategy
public abstract class AbstractRoleAuthorizationStrategy extends IAuthorizationStrategy.AllowAllAuthorizationStrategy
Base strategy that uses an instance ofIRoleCheckingStrategy
.- Author:
- Eelco Hillenius
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
IAuthorizationStrategy.AllowAllAuthorizationStrategy
-
-
Field Summary
-
Fields inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy
ALLOW_ALL
-
-
Constructor Summary
Constructors Constructor Description AbstractRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 org.apache.wicket.authorization.IAuthorizationStrategy.AllowAllAuthorizationStrategy
isActionAuthorized, isInstantiationAuthorized, isResourceAuthorized
-
-
-
-
Constructor Detail
-
AbstractRoleAuthorizationStrategy
public AbstractRoleAuthorizationStrategy(IRoleCheckingStrategy roleCheckingStrategy)
Construct.- Parameters:
roleCheckingStrategy
- the authorizer delegate
-
-
Method Detail
-
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
-
-