|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.aris.actionservlet.Action
public abstract class Action
A base class to create hlServlet actions.
You should inherit this class and implement at least therun() function.
Method Execution during a request to the hlServlet : run() -> ContentType()
| Field Summary | |
|---|---|
static int |
ACTION_HTML
By returning this in your run() method, you define that the out
contains HTML to be returned to the browser. |
static int |
ACTION_NULL
By returning this in your run() method, you define that no further processing should be done after returning from run(). |
static int |
ACTION_REDIRECT
By returning this in your run() method, you define that the out
contains a URL to redirect the browser to. |
static int |
ACTION_XML
By returning this in your run() method, you define that the xout
contains XML to be transformed by an XSLT template. |
static java.lang.String |
lastEditorDepth
|
static java.lang.String |
lastEditorStr
|
java.lang.StringBuffer |
out
The output StringBuffer. |
javax.servlet.http.HttpServletRequest |
request
Servlet request |
javax.servlet.http.HttpServletResponse |
response
Servlet response |
javax.servlet.http.HttpSession |
session
|
org.jdom.Element |
xout
Use this to create your XML tree, when the Action output is ACTION_XML. |
java.lang.String |
XSLT
Defines which XSLT to use to transform the XML of the out buffer. |
| Constructor Summary | |
|---|---|
Action()
Creates a new instance of hlAction |
|
| Method Summary | |
|---|---|
void |
clearLastActionsStack()
Clears the LastActionStackStore stack |
java.lang.String |
ContentType()
Defines the content-type of the action's result. |
java.lang.String |
getActionLink()
Returns the Action Link {$ACTION} |
Config |
getConfig()
Getter for property config. |
java.lang.String |
getLastAction()
Returns the lastaction action. |
java.lang.Object |
getLastActionParam(java.lang.String name)
gets a parameter for the specific action |
java.lang.Object |
getLastActionParam(java.lang.String name,
int ddepth)
gets a parameter for the specific -ddepth action |
javax.servlet.http.HttpSession |
getSession()
Gets or creates the session. |
javax.servlet.http.HttpSession |
getSession(boolean create)
Returns the session. |
org.jdom.Element |
getXout()
Getter for property xout. |
java.lang.String |
getXSLT()
Override this method and return the XSLT that this action will use. |
java.lang.String |
requestOrLastActionParam(java.lang.String name)
Returns the string from request, if it exists, or from lastAction if not |
abstract int |
run()
The main method of this action. |
void |
setAsLastAction(java.lang.String action)
Sets an action return point. |
void |
setConfig(Config config)
Setter for property config. |
void |
setLastActionParam(java.lang.String name,
java.lang.Object value)
|
void |
setLastActionParam(java.lang.String name,
java.lang.Object value,
int ddepth)
sets a parameter for the specific action |
void |
setSession(javax.servlet.http.HttpSession session)
Sets the session. |
void |
setXout(org.jdom.Element xout)
Setter for property xout. |
void |
setXSLT(java.lang.String XSLTFileName)
Defines which XSLT to use to transform the XML of the out buffer. |
void |
updateLastActionsDepth()
Updates the depth of the lastActions. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public javax.servlet.http.HttpSession session
public static final java.lang.String lastEditorStr
public static final java.lang.String lastEditorDepth
public static final transient int ACTION_NULL
public static final transient int ACTION_XML
xout
contains XML to be transformed by an XSLT template.
public static final transient int ACTION_HTML
out
contains HTML to be returned to the browser.
public static final transient int ACTION_REDIRECT
out
contains a URL to redirect the browser to.
public javax.servlet.http.HttpServletRequest request
public javax.servlet.http.HttpServletResponse response
public java.lang.StringBuffer out
public java.lang.String XSLT
out buffer.
Use the setXSLT() method to set it.
public org.jdom.Element xout
| Constructor Detail |
|---|
public Action()
| Method Detail |
|---|
public javax.servlet.http.HttpSession getSession(boolean create)
create - true to create the session if it doesn't exist.
public javax.servlet.http.HttpSession getSession()
public void setSession(javax.servlet.http.HttpSession session)
session - HttpSessionpublic java.lang.String ContentType()
public abstract int run()
setXSLT() method to define which template to use.
2. ACTION_HTML if the out buffer contains HTML;
3. ACTION_REDIRECT if the out buffer contains a redirection URL;public void setXSLT(java.lang.String XSLTFileName)
out buffer.
XSLTFileName - The file name of the XSLT template, relative to $DATA/Templates.. The
DATA parameter should point to a valid directory, and be defined at your
web.xml.public java.lang.String getXSLT()
public org.jdom.Element getXout()
public void setXout(org.jdom.Element xout)
xout - New value of property xout.public Config getConfig()
public void setConfig(Config config)
config - New value of property config.public java.lang.String getActionLink()
public java.lang.String getLastAction()
public void setAsLastAction(java.lang.String action)
action - the action of the editor
public void setLastActionParam(java.lang.String name,
java.lang.Object value,
int ddepth)
name - param namevalue - param value
public void setLastActionParam(java.lang.String name,
java.lang.Object value)
public java.lang.Object getLastActionParam(java.lang.String name,
int ddepth)
name - name of the parameterddepth - currentaction-ddepth action is scanned for this parameter.
public java.lang.Object getLastActionParam(java.lang.String name)
name - public java.lang.String requestOrLastActionParam(java.lang.String name)
name - the param name
public void updateLastActionsDepth()
public void clearLastActionsStack()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||