|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.chain.commands.ActionCommandBase org.apache.struts.chain.commands.AbstractAuthorizeAction org.apache.struts.chain.commands.servlet.AuthorizeAction
public class AuthorizeAction
Determine if the action is authorized for the given roles.
Field Summary |
---|
Fields inherited from interface org.apache.commons.chain.Command |
---|
CONTINUE_PROCESSING, PROCESSING_COMPLETE |
Constructor Summary | |
---|---|
AuthorizeAction()
|
Method Summary | |
---|---|
protected java.lang.String |
getErrorMessage(ActionContext context,
ActionConfig actionConfig)
Retrieve error message from context. |
protected boolean |
isAuthorized(ActionContext context,
java.lang.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthorizeAction()
Method Detail |
---|
protected boolean isAuthorized(ActionContext context, java.lang.String[] roles, ActionConfig mapping) throws java.lang.Exception
AbstractAuthorizeAction
Determine if the action is authorized for the given roles.
isAuthorized
in class AbstractAuthorizeAction
context
- The Context
for the current requestroles
- An array of valid roles for this requestmapping
- The current action mapping
true
if the request is authorized, else
false
UnauthorizedActionException
- If the logic determines that the request is not authorized
but does not wish to rely upon the default mechanism reporting the error.
java.lang.Exception
- If the action cannot be tested for authorizationprotected java.lang.String getErrorMessage(ActionContext context, ActionConfig actionConfig)
AbstractAuthorizeAction
Retrieve error message from context.
getErrorMessage
in class AbstractAuthorizeAction
context
- The Context
for the current requestactionConfig
- The current action mapping
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |