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
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
getErrorMessage
(ActionContext context, ActionConfig actionConfig) Retrieve error message from context.protected boolean
isAuthorized
(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_, isAuthorizationRequired
Methods 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:AbstractAuthorizeAction
Determine if the action is authorized for the given roles.
- Specified by:
isAuthorized
in classAbstractAuthorizeAction
- Parameters:
context
- TheContext
for the current requestroles
- An array of valid roles for this requestmapping
- The current action mapping- Returns:
true
if the request is authorized, elsefalse
- Throws:
Exception
- If the action cannot be tested for authorization
-
getErrorMessage
Description copied from class:AbstractAuthorizeAction
Retrieve error message from context.
- Specified by:
getErrorMessage
in classAbstractAuthorizeAction
- Parameters:
context
- TheContext
for the current requestactionConfig
- The current action mapping- Returns:
- error message
-