com.oroad.stxx.action
Class Action

java.lang.Object
  extended byorg.apache.struts.action.Action
      extended bycom.oroad.stxx.action.Action

public class Action
extends org.apache.struts.action.Action

Extends the struts action class to add methods to allow the subclasses to store XML documents. This class is semi-deprecated as it simply delegates functionality to StxxHelper.

Author:
Jeff Pennal, Don Brown

Field Summary
static java.lang.String ATTACH_ERRORS_KEY
          The request attributes key that holds whether to attach error XML
static java.lang.String ATTACH_FORM_KEY
          The request attributes key holding the action form XML
static java.lang.String ATTACH_MESSAGES_KEY
          The request attributes key that holds whether to attach message XML
static java.lang.String ATTACH_REQUEST_ATTRIBUTES_KEY
          The request attributes key that holds whether to attach request attribute XML
static java.lang.String ATTACH_REQUEST_PARAMETERS_KEY
          The request attributes key that holds whether to attach request parameter XML
static java.lang.String ATTACH_RESOURCES_KEY
          The request attributes key that holds whether to attach resource XML
static java.lang.String CONTEXT_KEY
          The request attribute key holding the context objects
static java.lang.String DOCUMENT_KEY
          The request attributes key under which the xml objects are stored
static java.lang.String ERROR_XML_KEY
          Deprecated. Since 1.3, use ATTACH_ERRORS_KEY instead
static java.lang.String FORM_KEY
          The request attribute key holding the current form
static java.lang.String FORM_XML_KEY
          Deprecated. Since 1.3, use ATTACH_FORM_KEY
static java.lang.String MESSAGES_XML_KEY
          Deprecated. Since 1.3, use ATTACH_MESSAGES_KEY
static java.lang.String REQUEST_XML_KEY
          Deprecated. Since 1.3, use ATTACH_REQUEST_PARAMETERS_KEY and ATTACH_REQUEST_ATTRIBUTES_KEY instead
static java.lang.String RESOURCE_MESSAGES_KEY
          The request attributes key holding the resources
static java.lang.String RESOURCES_XML_KEY
          Deprecated. Since 1.3, use ATTACH_RESOURCES_KEY
 
Fields inherited from class org.apache.struts.action.Action
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY
 
Constructor Summary
Action()
           
 
Method Summary
protected  void attachErrors(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the errors object saved to XML and attached to your XML output from this Action.
protected  void attachErrorXML(javax.servlet.http.HttpServletRequest request, boolean state)
          Deprecated. Since 1.3, use attachErrors(javax.servlet.http.HttpServletRequest, boolean) instead
protected  void attachForm(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the action form saved to XML and attached to your XML output from this Action.
protected  void attachMessages(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the action messages saved to XML and attached to your XML output from this Action.
protected  void attachRequestAttributes(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the request attributes saved to XML and attached to your XML output from this Action.
protected  void attachRequestParameters(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the request parameters saved to XML and attached to your XML output from this Action.
protected  void attachRequestXML(javax.servlet.http.HttpServletRequest request, boolean state)
          Deprecated. Since 1.3, use attachRequestParameters(javax.servlet.http.HttpServletRequest, boolean) and attachRequestAttributes(javax.servlet.http.HttpServletRequest, boolean) instead
protected  void attachResources(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the application resources object saved to XML and attached to your XML output from this Action.
protected  void attachResourcesXML(javax.servlet.http.HttpServletRequest request, boolean state)
          Deprecated. Since 1.3, use attachResources(javax.servlet.http.HttpServletRequest, boolean) instead
protected  void saveDocument(javax.servlet.http.HttpServletRequest request, org.jdom.Document document)
          Saves a JDOM document
protected  void saveDocument(javax.servlet.http.HttpServletRequest request, org.w3c.dom.Document document)
          Saves a w3c DOM document
 
Methods inherited from class org.apache.struts.action.Action
execute, execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOCUMENT_KEY

public static final java.lang.String DOCUMENT_KEY
The request attributes key under which the xml objects are stored

See Also:
Constant Field Values

RESOURCE_MESSAGES_KEY

public static final java.lang.String RESOURCE_MESSAGES_KEY
The request attributes key holding the resources

See Also:
Constant Field Values

FORM_KEY

public static final java.lang.String FORM_KEY
The request attribute key holding the current form

See Also:
Constant Field Values

CONTEXT_KEY

public static final java.lang.String CONTEXT_KEY
The request attribute key holding the context objects

See Also:
Constant Field Values

RESOURCES_XML_KEY

public static final java.lang.String RESOURCES_XML_KEY
Deprecated. Since 1.3, use ATTACH_RESOURCES_KEY

The request attributes key that holds whether to attach resource XML

See Also:
Constant Field Values

ATTACH_RESOURCES_KEY

public static final java.lang.String ATTACH_RESOURCES_KEY
The request attributes key that holds whether to attach resource XML

See Also:
Constant Field Values

MESSAGES_XML_KEY

public static final java.lang.String MESSAGES_XML_KEY
Deprecated. Since 1.3, use ATTACH_MESSAGES_KEY

The request attributes key that holds whether to attach messages XML

See Also:
Constant Field Values

ATTACH_MESSAGES_KEY

public static final java.lang.String ATTACH_MESSAGES_KEY
The request attributes key that holds whether to attach message XML

See Also:
Constant Field Values

ERROR_XML_KEY

public static final java.lang.String ERROR_XML_KEY
Deprecated. Since 1.3, use ATTACH_ERRORS_KEY instead

The request attributes key that holds whether to attach errors XML

See Also:
Constant Field Values

ATTACH_ERRORS_KEY

public static final java.lang.String ATTACH_ERRORS_KEY
The request attributes key that holds whether to attach error XML

See Also:
Constant Field Values

REQUEST_XML_KEY

public static final java.lang.String REQUEST_XML_KEY
Deprecated. Since 1.3, use ATTACH_REQUEST_PARAMETERS_KEY and ATTACH_REQUEST_ATTRIBUTES_KEY instead

The request attributes key that holds whether to attach request XML

See Also:
Constant Field Values

ATTACH_REQUEST_PARAMETERS_KEY

public static final java.lang.String ATTACH_REQUEST_PARAMETERS_KEY
The request attributes key that holds whether to attach request parameter XML

See Also:
Constant Field Values

ATTACH_REQUEST_ATTRIBUTES_KEY

public static final java.lang.String ATTACH_REQUEST_ATTRIBUTES_KEY
The request attributes key that holds whether to attach request attribute XML

See Also:
Constant Field Values

FORM_XML_KEY

public static final java.lang.String FORM_XML_KEY
Deprecated. Since 1.3, use ATTACH_FORM_KEY

The request attributes key that holds whether to attach form XML

See Also:
Constant Field Values

ATTACH_FORM_KEY

public static final java.lang.String ATTACH_FORM_KEY
The request attributes key holding the action form XML

See Also:
Constant Field Values
Constructor Detail

Action

public Action()
Method Detail

saveDocument

protected void saveDocument(javax.servlet.http.HttpServletRequest request,
                            org.jdom.Document document)
Saves a JDOM document

Parameters:
request - The http request
document - The JDOM document

saveDocument

protected void saveDocument(javax.servlet.http.HttpServletRequest request,
                            org.w3c.dom.Document document)
Saves a w3c DOM document

Parameters:
request - The http request
document - The DOM document

attachErrorXML

protected void attachErrorXML(javax.servlet.http.HttpServletRequest request,
                              boolean state)
Deprecated. Since 1.3, use attachErrors(javax.servlet.http.HttpServletRequest, boolean) instead

Set this value to false if you do not want the errors object saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach error XML

attachErrors

protected void attachErrors(javax.servlet.http.HttpServletRequest request,
                            boolean state)
Set this value to false if you do not want the errors object saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach error XML

attachMessages

protected void attachMessages(javax.servlet.http.HttpServletRequest request,
                              boolean state)
Set this value to false if you do not want the action messages saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach action message XML

attachForm

protected void attachForm(javax.servlet.http.HttpServletRequest request,
                          boolean state)
Set this value to false if you do not want the action form saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach error XML

attachRequestParameters

protected void attachRequestParameters(javax.servlet.http.HttpServletRequest request,
                                       boolean state)
Set this value to false if you do not want the request parameters saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach error XML

attachRequestAttributes

protected void attachRequestAttributes(javax.servlet.http.HttpServletRequest request,
                                       boolean state)
Set this value to false if you do not want the request attributes saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach error XML

attachResources

protected void attachResources(javax.servlet.http.HttpServletRequest request,
                               boolean state)
Set this value to false if you do not want the application resources object saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach Resources as XML

attachResourcesXML

protected void attachResourcesXML(javax.servlet.http.HttpServletRequest request,
                                  boolean state)
Deprecated. Since 1.3, use attachResources(javax.servlet.http.HttpServletRequest, boolean) instead

Set this value to false if you do not want the application resources object saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If true, attach Resources as XML

attachRequestXML

protected void attachRequestXML(javax.servlet.http.HttpServletRequest request,
                                boolean state)
Deprecated. Since 1.3, use attachRequestParameters(javax.servlet.http.HttpServletRequest, boolean) and attachRequestAttributes(javax.servlet.http.HttpServletRequest, boolean) instead

Set this value to false if you do not want the request object saved to XML and attached to your XML output from this Action. By default this will be set to true

Parameters:
request - The HttpServletRequest object
state - If True, attach request XML