Class AuthorizeAction
java.lang.Object
org.apache.struts.chain.commands.ActionCommandBase
org.apache.struts.chain.commands.AbstractAuthorizeAction
org.apache.struts.chain.commands.servlet.AuthorizeAction
- All Implemented Interfaces:
org.apache.commons.chain.Command<ActionContext>,ActionCommand
Determine if the action is authorized for the given roles.
- Version:
- $Rev$ $Date: 2005-11-12 13:01:44 -0500 (Sat, 12 Nov 2005) $
-
Field Summary
Fields inherited from interface org.apache.commons.chain.Command
CONTINUE_PROCESSING, PROCESSING_COMPLETE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetErrorMessage(ActionContext context, ActionConfig actionConfig) Retrieve error message from context.protected booleanisAuthorized(ActionContext context, String[] roles, ActionConfig mapping) Determine if the action is authorized for the given roles.Methods inherited from class org.apache.struts.chain.commands.AbstractAuthorizeAction
execute_, isAuthorizationRequiredMethods inherited from class org.apache.struts.chain.commands.ActionCommandBase
execute
-
Constructor Details
-
AuthorizeAction
public AuthorizeAction()
-
-
Method Details
-
isAuthorized
protected boolean isAuthorized(ActionContext context, String[] roles, ActionConfig mapping) throws Exception Description copied from class:AbstractAuthorizeActionDetermine if the action is authorized for the given roles.
- Specified by:
isAuthorizedin classAbstractAuthorizeAction- Parameters:
context- TheContextfor the current requestroles- An array of valid roles for this requestmapping- The current action mapping- Returns:
trueif the request is authorized, elsefalse- Throws:
Exception- If the action cannot be tested for authorization
-
getErrorMessage
Description copied from class:AbstractAuthorizeActionRetrieve error message from context.
- Specified by:
getErrorMessagein classAbstractAuthorizeAction- Parameters:
context- TheContextfor the current requestactionConfig- The current action mapping- Returns:
- error message
-