|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jet.servlet.JetAction
public abstract class JetAction
This class is the base class for every action in jet. Defines how the actions will be executed.
Field Summary | |
---|---|
private ActionValueHolder |
actionDef
the actiondef for the action |
private JetContext |
context
holds the context |
private static org.apache.log4j.Logger |
log
log object |
Constructor Summary | |
---|---|
JetAction()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
Implementation of the clone method for Object pooling |
static void |
delegateTo(JetAction action)
Method to delegate to a specific action (used also by the JetServlet) |
private static void |
delegateTo(JetAction action,
JetForm form)
Method to delegate toa specific action (used also by the JetServlet |
static void |
delegateTo(java.lang.String url,
JetContext context)
Method to delegate to a specific action |
static void |
delegateTo(java.lang.String url,
JetContext context,
JetForm form)
Method to delegate toa specific action (used also by the JetServlet |
void |
dispatch(java.lang.String url)
Same as redirect method |
boolean |
doFormValidation()
Method to indicate if the action should do form based validation |
protected static void |
doFormValidation(JetMessages messages,
JetForm form,
JetContext context)
|
abstract void |
execute(JetMessages messages,
JetData data,
JetForm form,
JetContext context)
Abstract method which is called on the action |
protected ActionValueHolder |
getActionDef()
Returns the action definition object |
JetContext |
getContext()
Returns the context used by this action |
protected static JetData |
getDataStructure(JetForm form,
JetContext context,
JetAction action)
|
java.lang.String |
getIdentifier()
Returns the identifier |
protected Poolable |
getInstanceFor(java.lang.String id)
|
JetContext |
getJetContext()
|
void |
redirect(java.lang.String url)
Method to redirect to a jsp or other resource through RequestDispatcher |
void |
render(JetData data,
java.lang.String templatename)
Method to render a template to response |
void |
reset()
Implementation of the reset method for object cloning |
void |
setActionDef(ActionValueHolder actionDef)
Set the action definition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private ActionValueHolder actionDef
private JetContext context
private static org.apache.log4j.Logger log
Constructor Detail |
---|
public JetAction()
Method Detail |
---|
public JetContext getJetContext()
public abstract void execute(JetMessages messages, JetData data, JetForm form, JetContext context) throws JetActionException, java.io.IOException
messages
- the messagesdata
- the data structureform
- the form to use - could be null!context
- teh context object
JetActionException,IOException
- r
JetActionException
java.io.IOException
public java.lang.String getIdentifier()
getIdentifier
in interface Identifiable
public final void render(JetData data, java.lang.String templatename) throws JetActionException, java.io.IOException
data
- the TreeMap with data structure to usetemplatename
- the name of the template to render
JetActionException,IOException
JetActionException
java.io.IOException
public final void dispatch(java.lang.String url) throws JetActionException, java.io.IOException, javax.servlet.ServletException
url
- to redirect
JetActionException,IOException,ServletException
JetActionException
java.io.IOException
javax.servlet.ServletException
public final void redirect(java.lang.String url) throws javax.servlet.ServletException, java.io.IOException
url
-
javax.servlet.ServletException
java.io.IOException
public static void delegateTo(java.lang.String url, JetContext context) throws JetActionException, java.io.IOException
url
- the url to delegatecontext
- the context to use for this delegation
JetActionException,IOException
JetActionException
java.io.IOException
public static void delegateTo(JetAction action) throws JetActionException, java.io.IOException
action
- the action to delegate to
JetActionException,IOException
JetActionException
java.io.IOException
public static void delegateTo(java.lang.String url, JetContext context, JetForm form) throws JetActionException, java.io.IOException
url
- the url to delegatecontext
- the context to urse for this delegationform
- the form to useme
JetActionException,IOException
JetActionException
java.io.IOException
private static void delegateTo(JetAction action, JetForm form) throws JetActionException, java.io.IOException
action
- the action to delegate toform
- the form to useme
JetActionException,IOException
JetActionException
java.io.IOException
protected static JetData getDataStructure(JetForm form, JetContext context, JetAction action)
protected static void doFormValidation(JetMessages messages, JetForm form, JetContext context)
public final JetContext getContext()
protected ActionValueHolder getActionDef()
public void setActionDef(ActionValueHolder actionDef) throws JetActionException
JetActionException
public java.lang.Object clone()
clone
in class java.lang.Object
public boolean doFormValidation()
public void reset()
reset
in interface Resetable
protected Poolable getInstanceFor(java.lang.String id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |