tomp.ext
Class Action

java.lang.Object
  |
  +--tomp.ext.Action
Direct Known Subclasses:
GenericAction, ServletAction

public abstract class Action
extends java.lang.Object

The abstract Action class Contains

And provides logging services (simply forward the log-requests to underlying application)


Field Summary
protected static org.apache.log4j.Category ACTION
          Logging Category for Action.
protected  Application application
           
protected  Action previous
           
protected  ActionResult result
           
 
Constructor Summary
protected Action(Action prev)
          The Action class constructor For constructing an action that already has a previous action.
protected Action(Application app)
          The Action class constructor For constructing an action with no previous action.
 
Method Summary
 void event2tree(TreeSourceBuilder b)
           
 void execute()
           
 java.lang.Object get(java.lang.String s)
          Get a named parameter or an instanceof Base object.
 Application getApplication()
           
abstract  java.lang.Object getHere(java.lang.String s)
          Try to get a named parameter here.
 Action getPreviousAction()
           
 boolean hasParameter(java.lang.String s)
          Has already the named parameter?
 java.lang.String id()
           
protected  void init()
          Simple initialization of the Action object.
 boolean isERROR()
          Test the ActionResult
 boolean isOK()
          Test the ActionResult
abstract  void put(java.lang.String s, java.lang.Object o)
           
 ActionResult result()
          Get the ActionResult
 void setParameter(java.lang.String s, java.lang.Object o)
          Set the named parameter (simulated by putting a named object)
 void setResult(ActionResult result)
          Set the ActionResult
 void trace()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION

protected static org.apache.log4j.Category ACTION

Logging Category for Action.


application

protected Application application

previous

protected Action previous

result

protected ActionResult result
Constructor Detail

Action

protected Action(Application app)
The Action class constructor For constructing an action with no previous action. In such case, an


Action

protected Action(Action prev)
The Action class constructor For constructing an action that already has a previous action.

Parameters:
prev - previous action (non-null)
Method Detail

init

protected void init()
Simple initialization of the Action object. Sets the id in case when null is provided yet.


event2tree

public void event2tree(TreeSourceBuilder b)
                throws EXTException
EXTException

execute

public void execute()
             throws EXTException
EXTException

getPreviousAction

public Action getPreviousAction()

getApplication

public Application getApplication()

get

public java.lang.Object get(java.lang.String s)
Get a named parameter or an instanceof Base object. If the object is not stored here, ask the previous action...


trace

public void trace()

put

public abstract void put(java.lang.String s,
                         java.lang.Object o)

getHere

public abstract java.lang.Object getHere(java.lang.String s)
Try to get a named parameter here. If the object is not stored here, returns null.


id

public java.lang.String id()

setResult

public void setResult(ActionResult result)
Set the ActionResult


result

public ActionResult result()
Get the ActionResult


isOK

public boolean isOK()
Test the ActionResult


isERROR

public boolean isERROR()
Test the ActionResult


setParameter

public void setParameter(java.lang.String s,
                         java.lang.Object o)
Set the named parameter (simulated by putting a named object)


hasParameter

public boolean hasParameter(java.lang.String s)
Has already the named parameter?