org.talika.tarsis.command.action
Class ActionWrapper
java.lang.Object
org.talika.tarsis.command.action.AbstractAction
org.talika.tarsis.command.action.ActionWrapper
- All Implemented Interfaces:
- Action
public final class ActionWrapper
- extends AbstractAction
This is a wrapper for statefull actions. Instead of having an specialized
implementation of Action
for statefull actions we have this
class that wraps a normal action and do all the statefull tricky work.
- Version:
- $Revision: 269 $
- Author:
- Jose M. Palomar
Constructor Summary |
ActionWrapper(java.lang.Class actionClass)
Constructs a new ActionWrapper . |
Method Summary |
java.lang.String |
execute(Request request,
Response response)
Called by Tarsis MVC Framework to handle request everytime command is
invoked. |
void |
validate(Request request)
Called by Tarsis MVC Framework to validate request everytime command is
invoked. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ActionWrapper
public ActionWrapper(java.lang.Class actionClass)
- Constructs a new
ActionWrapper
.
- Parameters:
actionClass
- Class class of action that we wrap.
validate
public void validate(Request request)
throws ActionException
- Called by Tarsis MVC Framework to validate request everytime command is
invoked.
This method is called only if command is validable.
Wrapper first call findActionSession
on current request to
obtain action instance from session. Then call validate
method over
instance.
- Specified by:
validate
in interface Action
- Specified by:
validate
in class AbstractAction
- Parameters:
request
- Request object representing client's request.
- Throws:
ActionException
- if an exception has occurred that interferes with the
action's normal operation.- See Also:
Action.validate(Request)
execute
public java.lang.String execute(Request request,
Response response)
throws ActionException
- Called by Tarsis MVC Framework to handle request everytime command is
invoked.
Wrapper first call findActionSession
on current request to
obtain action instance from session. Then call execute
method over
instance.
- Specified by:
execute
in interface Action
- Specified by:
execute
in class AbstractAction
- Parameters:
request
- Request object representing client's request.response
- Response object representing client's reponse.
- Returns:
- String the name of view to be forwarded or
null
for
default view.
- Throws:
ActionException
- if an exception has occurred that interferes with the
action's normal operation.- See Also:
Action.execute(Request, Response)
Copyright © 2002-2012 Talika Open Source Group. All Rights Reserved.