|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.lu.thep.waf.AbstractAction
public abstract class AbstractAction
Actions are steps in an event. Each action should set a valid template or
Layout for the response or define a list of actionIds for the
ActionServlet to process.
| Field Summary | |
|---|---|
protected java.lang.String |
actionId
|
protected org.apache.log4j.Logger |
log
Logger used in this action. |
| Constructor Summary | |
|---|---|
AbstractAction()
Should be called by all subclasses as it creates the logger. |
|
| Method Summary | ||
|---|---|---|
java.lang.Object |
clone()
|
|
Event |
getEvent()
All actions should be part of an event. |
|
AbstractAction |
getForwardTo()
Used by the ActionServlet to chain actions together. |
|
java.lang.String |
getId()
Get the id of this action, the id should be set by the ActionFactory |
|
Layout |
getLayout()
Get the layout create by this action. |
|
java.security.Principal |
getLoggedInUser()
If a user has logged on then the principal of that user is returned |
|
javax.servlet.http.HttpServletRequest |
getRequest()
|
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
|
protected java.lang.Boolean |
getSessionAttribute(VBoolean param)
Returns a Boolean value defined by the VBoolean param from the HttpRequest session for the given parameter. |
|
protected java.lang.Integer |
getSessionAttribute(VInteger param)
|
|
protected java.lang.String |
getSessionAttribute(VString param)
Adapter method for getRequest().getSession().getAttribute(name) |
|
protected java.util.List<java.lang.Integer> |
getSessionAttributeList(VInteger param)
Adapter method for getRequest().getSession().getAttribute(name) when retrieving a list of Integer values. |
|
java.lang.String |
getTemplate()
Returns the template that should be displayed. |
|
void |
init()
Called by the ActionServlet prior to action.run() and used to validate initial state of an action. |
|
abstract void |
run()
|
|
protected void |
setAttribute(java.lang.String name,
java.lang.Object value)
Adapter method for getRequest().setAttribute(name, value) |
|
void |
setEvent(Event actionRequest)
Associates this action with the given event. |
|
protected void |
setForwardTo(AbstractAction forwardTo)
Set next action to run |
|
void |
setId(java.lang.String actionId)
Set the id of this action. |
|
|
setLayout(T layout)
Register the layout that should be displayed. |
|
void |
setLoggedInUser(java.security.Principal loggedInUser)
Set the authenticated principal of this action |
|
protected void |
setSessionAttribute(java.lang.String name,
java.lang.Object value)
Adapter method for getRequest().getSession().setAttribute(name, value). |
|
void |
setTemplate(java.lang.String template)
Register a template path which the ActionServlet can display when an event has no more actions in the queue. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected org.apache.log4j.Logger log
protected java.lang.String actionId
| Constructor Detail |
|---|
public AbstractAction()
| Method Detail |
|---|
public Layout getLayout()
public <T extends Layout> T setLayout(T layout)
T - Any layout that extends Layoutlayout - to be displayed
public void init()
throws ActionException
ActionException
public abstract void run()
throws ActionException
ActionExceptionpublic java.lang.String getTemplate()
public void setTemplate(java.lang.String template)
template - public javax.servlet.http.HttpServletRequest getRequest()
protected void setAttribute(java.lang.String name,
java.lang.Object value)
name - of attributevalue - of attribute
protected void setSessionAttribute(java.lang.String name,
java.lang.Object value)
name - value - protected java.lang.Boolean getSessionAttribute(VBoolean param)
param - to look for in the session
protected java.lang.String getSessionAttribute(VString param)
param - valid parameter
protected java.lang.Integer getSessionAttribute(VInteger param)
protected java.util.List<java.lang.Integer> getSessionAttributeList(VInteger param)
param - VInteger The valid parameter coupled to the session attribute.
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionpublic javax.servlet.http.HttpServletResponse getResponse()
public AbstractAction getForwardTo()
ActionServlet to chain actions together.
protected void setForwardTo(AbstractAction forwardTo)
forwardTo - public java.security.Principal getLoggedInUser()
public void setLoggedInUser(java.security.Principal loggedInUser)
loggedInUser - public java.lang.String getId()
public void setId(java.lang.String actionId)
actionId - public Event getEvent()
public void setEvent(Event actionRequest)
actionRequest - public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||