com.oroad.stxx.action
Class StxxHelper

java.lang.Object
  extended bycom.oroad.stxx.action.StxxHelper

public class StxxHelper
extends java.lang.Object

Provides static methods for interacting with the servlet objects to support stxx functionality.

Author:
Jeff Pennal, Don Brown

Constructor Summary
StxxHelper()
           
 
Method Summary
static 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.
static void attachForm(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the form object saved to XML and attached to your XML output from this Action.
static void attachMessages(javax.servlet.http.HttpServletRequest request, boolean state)
          Set this value to false if you do not want the messages object saved to XML and attached to your XML output from this Action.
static 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.
static 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.
static 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.
static void saveAnyDocument(javax.servlet.http.HttpServletRequest request, java.lang.Object document)
          Save the specified document into a list of xml objects
static void saveDocument(javax.servlet.http.HttpServletRequest request, org.jdom.Document document)
          Saves a JDOM document
static void saveDocument(javax.servlet.http.HttpServletRequest request, org.w3c.dom.Document document)
          Saves a w3c DOM document
static void saveToken(javax.servlet.http.HttpServletRequest request)
          Deprecated. Since 1.3, the token is now added to the form xml instead
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StxxHelper

public StxxHelper()
Method Detail

saveDocument

public static 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

public static 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

saveAnyDocument

public static void saveAnyDocument(javax.servlet.http.HttpServletRequest request,
                                   java.lang.Object document)
Save the specified document into a list of xml objects

Parameters:
request - The servlet request we are processing
document - The Action-created Document

attachErrors

public static 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

public static void attachMessages(javax.servlet.http.HttpServletRequest request,
                                  boolean state)
Set this value to false if you do not want the messages 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 message XML

attachForm

public static void attachForm(javax.servlet.http.HttpServletRequest request,
                              boolean state)
Set this value to false if you do not want the form 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 form XML

attachResources

public static 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

attachRequestParameters

public static 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 request XML

attachRequestAttributes

public static 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 request XML

saveToken

public static void saveToken(javax.servlet.http.HttpServletRequest request)
Deprecated. Since 1.3, the token is now added to the form xml instead

Generates and saves a token in the request and session attributes

Parameters:
request - The http request