wt.templateutil.processor
Class HTTPState

java.lang.Object
  extended bywt.templateutil.processor.HTTPState
All Implemented Interfaces:
ContextHolder, Evolvable, Externalizable, Serializable

public class HTTPState
extends Object
implements ContextHolder, Evolvable

Deprecation Notice: This class is still valid for this release, however this serves as advance notice that it will be removed in the future. All user interfaces built using the Windchill HTML Template Processing client architecture will be rewritten using a different framework in an upcoming release. This class is used through out the HTML Client as a "cookie" that contains the current "state" of the HTML Template Processing. In particular, all of the information required by the Factories that drive the processing of an HTML Template. Some of these factories are

Essentially, the information that drives the factories is one of the following combinations An Action is always required, the object or class is not.

There is also additional information that is available through the HTTPState object. The name/values pairs on the URL query string are available in the Properties object returned from the method getQueryData. Similarly, the name values pairs of the HTTP POST are available from the Properties object returned from the method getPostData.

If the URL goes throught the wt.enterprise.URLProcessor class, all of these values are set for by URLProcessor. If you go through any other class, there is not any guarentee.

There are also some convenience methods available from this class. Some, but not all, of these methods are :

These methods provide a way to pass information between TemplateProcessors(for subTemplateProcessing) and between FormTaskDelegates and TemplateProcessors(Help in generating Response Pages).

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
          Deprecated.  
private  String contextAction
          Deprecated.  
private  String contextClassName
          Deprecated.  
private  String[] contextMask
          Deprecated.  
private  Object contextObj
          Deprecated.  
private  Properties contextProperties
          Deprecated.  
(package private)  ServletSessionCookieManager cookieManager
          Deprecated.  
private  String currenPage
          Deprecated.  
private  String editMask
          Deprecated.  
static long EXTERNALIZATION_VERSION_UID
          Deprecated.  
private  Properties formData
          Deprecated.  
private  Hashtable formDataMultivalue
          Deprecated.  
protected static long OLD_FORMAT_VERSION_UID
          Deprecated.  
static String ORIGINAL_CONTEXT_ACTION
          Deprecated.  
private static String PAGE
          Deprecated.  
private  WTPreferences pagePreferences
          Deprecated.  
private  Properties queryData
          Deprecated.  
private  HTTPRequest requestObj
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private  Vector responseExceptions
          Deprecated.  
private  Vector responseFooters
          Deprecated.  
private  Vector responseHeaders
          Deprecated.  
private  Vector responseMessages
          Deprecated.  
private  HTTPResponse responseObj
          Deprecated.  
private  String responseString
          Deprecated.  
(package private) static long serialVersionUID
          Deprecated.  
private  HTTPState state
          Deprecated.  
private  int status
          Deprecated.  
private  int updateCount
          Deprecated.  
private  boolean url_state
          Deprecated.  
private  URLFactory urlFactory
          Deprecated.  
private  WTPreferences userPreferences
          Deprecated.  
private static String WEBAPP
          Deprecated.  
 
Fields inherited from interface wt.templateutil.processor.ContextHolder
CONTEXT_ACTION, CONTEXT_CLASS_NAME, CONTEXT_OBJ, CONTEXT_PROPERTIES, FORM_DATA, QUERY_DATA, RESPONSE_EXCEPTIONS, RESPONSE_FOOTERS, RESPONSE_HEADERS, RESPONSE_MESSAGES, RESPONSE_STRING, STATUS
 
Constructor Summary
HTTPState()
          Deprecated.  
 
Method Summary
 void addToResponseExceptions(Exception newException)
          Deprecated.  
 void addToResponseFooters(LocalizableMessage newFooter)
          Deprecated.  
 void addToResponseHeaders(LocalizableMessage newHeader)
          Deprecated.  
 void addToResponseMessages(LocalizableMessage newMessage)
          Deprecated.  
 void copyContextInto(ContextHolder contextHolder)
          Deprecated.  
 void copyStateFrom(HTTPState httpState)
          Deprecated.  
 ServletSessionCookie createServletSessionCookie(String id)
          Deprecated.  
 String getContextAction()
          Deprecated. Gets the value of the attribute: contextAction.
 String getContextClassName()
          Deprecated. Gets the value of the attribute: contextClassName.
 String[] getContextMask()
          Deprecated.  
 Object getContextObj()
          Deprecated. Gets the value of the attribute: contextObj.
 Properties getContextProperties()
          Deprecated. Gets the value of the attribute: contextProperties.
 ServletSessionCookieManager getCookieManager()
          Deprecated.  
 String getCurrentPage()
          Deprecated.  
 String getEditMask()
          Deprecated.  
 Properties getFormData()
          Deprecated.  
 Hashtable getFormDataMultivalue()
          Deprecated.  
 WTPreferences getPagePreferences()
          Deprecated.  
 Properties getQueryData()
          Deprecated.  
 HTTPRequest getRequestObj()
          Deprecated. Returns the current wt.httpgw.HTTPRequest object for the current request from the client.
 Vector getResponseExceptions()
          Deprecated.  
 Vector getResponseFooters()
          Deprecated.  
 Vector getResponseHeaders()
          Deprecated.  
 Vector getResponseMessages()
          Deprecated.  
 HTTPResponse getResponseObj()
          Deprecated. Returns the current wt.httpgw.HTTPResponse object for the current request from the client.
 String getResponseString()
          Deprecated.  
 ServletSessionCookie getServletSessionCookie(String id)
          Deprecated.  
private  HTTPState getState()
          Deprecated.  
 int getStatus()
          Deprecated.  
 int getUpdateCount()
          Deprecated.  
 URLFactory getURLFactory()
          Deprecated.  
 Preferences getUserPreferences()
          Deprecated.  
 boolean isFullyQualifiedURLFactory()
          Deprecated.  
 void readExternal(ObjectInput input)
          Deprecated.  
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Deprecated. Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(HTTPState thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Deprecated.  
 void refreshPreferences()
          Deprecated.  
 void setContextAction(String a_ContextAction)
          Deprecated.  
 void setContextClassName(String a_ContextClassName)
          Deprecated.  
 void setContextObj(Object a_ContextObj)
          Deprecated.  
 void setContextProperties(Properties a_ContextProperties)
          Deprecated.  
 void setCookieManager(ServletSessionCookieManager cookieManager)
          Deprecated.  
 void setCurrentPage(String currentPage)
          Deprecated.  
 void setFormData(Properties a_FormData)
          Deprecated.  
 void setFormDataMultivalue(Hashtable a_FormDataMultivalue)
          Deprecated.  
 void setFullyQualifiedURLFactory(boolean state)
          Deprecated.  
 void setQueryData(Properties a_QueryData)
          Deprecated.  
 void setRequestObj(HTTPRequest a_request)
          Deprecated. Sets wt.httpgw.HTTPResponse object for the current request.
 void setResponseExceptions(Vector a_ResponseExceptions)
          Deprecated.  
 void setResponseFooters(Vector a_ResponseFooters)
          Deprecated.  
 void setResponseHeaders(Vector a_ResponseHeaders)
          Deprecated.  
 void setResponseMessages(Vector a_ResponseMessages)
          Deprecated.  
 void setResponseObj(HTTPResponse a_response)
          Deprecated. Sets wt.httpgw.HTTPResponse object for the current request.
 void setResponseString(String a_ResponseString)
          Deprecated.  
private  void setState(HTTPState a_state)
          Deprecated.  
 void setStatus(int a_Status)
          Deprecated.  
 void setUpdateCount(int a_UpdateCount)
          Deprecated.  
 void setURLFactory(URLFactory urlFactory)
          Deprecated.  
 void updateServletSession()
          Deprecated.  
 void writeExternal(ObjectOutput output)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
Deprecated. 
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Deprecated. 

state

private HTTPState state
Deprecated. 

contextAction

private String contextAction
Deprecated. 

contextObj

private Object contextObj
Deprecated. 

contextClassName

private String contextClassName
Deprecated. 

contextProperties

private Properties contextProperties
Deprecated. 

responseExceptions

private Vector responseExceptions
Deprecated. 

responseFooters

private Vector responseFooters
Deprecated. 

responseHeaders

private Vector responseHeaders
Deprecated. 

responseMessages

private Vector responseMessages
Deprecated. 

responseString

private String responseString
Deprecated. 

status

private int status
Deprecated. 

formData

private Properties formData
Deprecated. 

formDataMultivalue

private Hashtable formDataMultivalue
Deprecated. 

queryData

private Properties queryData
Deprecated. 

updateCount

private int updateCount
Deprecated. 

serialVersionUID

static final long serialVersionUID
Deprecated. 
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
Deprecated. 
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
Deprecated. 
See Also:
Constant Field Values

PAGE

private static final String PAGE
Deprecated. 
See Also:
Constant Field Values

requestObj

private HTTPRequest requestObj
Deprecated. 

responseObj

private HTTPResponse responseObj
Deprecated. 

currenPage

private String currenPage
Deprecated. 

pagePreferences

private WTPreferences pagePreferences
Deprecated. 

userPreferences

private WTPreferences userPreferences
Deprecated. 

contextMask

private String[] contextMask
Deprecated. 

editMask

private String editMask
Deprecated. 

urlFactory

private URLFactory urlFactory
Deprecated. 

WEBAPP

private static String WEBAPP
Deprecated. 

url_state

private boolean url_state
Deprecated. 

ORIGINAL_CONTEXT_ACTION

public static final String ORIGINAL_CONTEXT_ACTION
Deprecated. 
See Also:
Constant Field Values

cookieManager

ServletSessionCookieManager cookieManager
Deprecated. 
Constructor Detail

HTTPState

public HTTPState()
Deprecated. 
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Deprecated.  

Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Deprecated.  

Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(HTTPState thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Deprecated.  

Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Deprecated. 
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getContextAction

public String getContextAction()
Deprecated. 
Gets the value of the attribute: contextAction. This value is required as a part of all HTTP GETs(the query string) and POSTs (as part of the Form Data). This value is required by all of the the Factories that are used in the processing an HTML Template.

Supported API: false

Specified by:
getContextAction in interface ContextHolder
Returns:
String

setContextAction

public void setContextAction(String a_ContextAction)
Deprecated.  

Sets the value of the attribute: contextAction.

Supported API: true

Specified by:
setContextAction in interface ContextHolder
Parameters:
a_ContextAction -

getContextObj

public Object getContextObj()
Deprecated. 
Gets the value of the attribute: contextObj.
The Context Object is the reference object of the current page page that is being generated. For example, if the current page being generated is the Object Properties page for a WTPart, then that WTPart of the current context object.
A context object is not required to be set. There are pages that actually cannot have a context object. For example, where you are creating a new Document via the HTML Client the document that you are creating does not currently exist. Yet, that non-existant document is the focus of your page. In such a case, you would reference the the context class.

Supported API: false

Specified by:
getContextObj in interface ContextHolder
Returns:
Object

setContextObj

public void setContextObj(Object a_ContextObj)
Deprecated.  

Sets the value of the attribute: contextObj.

Supported API: true

Specified by:
setContextObj in interface ContextHolder
Parameters:
a_ContextObj -

getContextClassName

public String getContextClassName()
Deprecated. 
Gets the value of the attribute: contextClassName.

The context class name refers to the class of that should be used by the factories when generating the page from an HTML Template.

This method is called by the factories if there is not a context object.

This field is not required and should be set to null if it is not to be used by the Factories.

Supported API: false

Specified by:
getContextClassName in interface ContextHolder
Returns:
String

setContextClassName

public void setContextClassName(String a_ContextClassName)
Deprecated.  

Sets the value of the attribute: contextClassName.

Supported API: true

Specified by:
setContextClassName in interface ContextHolder
Parameters:
a_ContextClassName -

getContextProperties

public Properties getContextProperties()
Deprecated. 
Gets the value of the attribute: contextProperties.

This field is a Convenience field for the processing of an HTML template. If there is information for generating a single page that should be passed between different template processors(sub-template processing) or between a FormTaskDelegate and a template processor (generating a response page) and is not either data from the query string or the Post data, then the contextProperties is the place to do this.

Supported API: false

Specified by:
getContextProperties in interface ContextHolder
Returns:
java.util.Properties

setContextProperties

public void setContextProperties(Properties a_ContextProperties)
Deprecated.  

Sets the value of the attribute: contextProperties.

Supported API: true

Specified by:
setContextProperties in interface ContextHolder
Parameters:
a_ContextProperties -

getResponseExceptions

public Vector getResponseExceptions()
Deprecated.  

Gets the value of the attribute: responseExceptions.

Supported API: true

Specified by:
getResponseExceptions in interface ContextHolder
Returns:
Vector

setResponseExceptions

public void setResponseExceptions(Vector a_ResponseExceptions)
Deprecated.  

Sets the value of the attribute: responseExceptions.

Supported API: true

Specified by:
setResponseExceptions in interface ContextHolder
Parameters:
a_ResponseExceptions -

getResponseFooters

public Vector getResponseFooters()
Deprecated.  

Gets the value of the attribute: responseFooters.

Supported API: true

Specified by:
getResponseFooters in interface ContextHolder
Returns:
Vector

setResponseFooters

public void setResponseFooters(Vector a_ResponseFooters)
Deprecated.  

Sets the value of the attribute: responseFooters.

Supported API: true

Specified by:
setResponseFooters in interface ContextHolder
Parameters:
a_ResponseFooters -

getResponseHeaders

public Vector getResponseHeaders()
Deprecated.  

Gets the value of the attribute: responseHeaders.

Supported API: true

Specified by:
getResponseHeaders in interface ContextHolder
Returns:
Vector

setResponseHeaders

public void setResponseHeaders(Vector a_ResponseHeaders)
Deprecated.  

Sets the value of the attribute: responseHeaders.

Supported API: true

Specified by:
setResponseHeaders in interface ContextHolder
Parameters:
a_ResponseHeaders -

getResponseMessages

public Vector getResponseMessages()
Deprecated.  

Gets the value of the attribute: responseMessages.

Supported API: true

Specified by:
getResponseMessages in interface ContextHolder
Returns:
Vector

setResponseMessages

public void setResponseMessages(Vector a_ResponseMessages)
Deprecated.  

Sets the value of the attribute: responseMessages.

Supported API: true

Specified by:
setResponseMessages in interface ContextHolder
Parameters:
a_ResponseMessages -

getResponseString

public String getResponseString()
Deprecated.  

Gets the value of the attribute: responseString.

Supported API: true

Specified by:
getResponseString in interface ContextHolder
Returns:
String

setResponseString

public void setResponseString(String a_ResponseString)
Deprecated.  

Sets the value of the attribute: responseString.

Supported API: true

Specified by:
setResponseString in interface ContextHolder
Parameters:
a_ResponseString -

getStatus

public int getStatus()
Deprecated.  

Gets the value of the attribute: status.

Supported API: true

Specified by:
getStatus in interface ContextHolder
Returns:
int

setStatus

public void setStatus(int a_Status)
Deprecated.  

Sets the value of the attribute: status.

Supported API: true

Specified by:
setStatus in interface ContextHolder
Parameters:
a_Status -

getFormData

public Properties getFormData()
Deprecated.  

Gets the value of the attribute: formData.

Supported API: true

Specified by:
getFormData in interface ContextHolder
Returns:
Properties

setFormData

public void setFormData(Properties a_FormData)
Deprecated.  

Sets the value of the attribute: formData.

Supported API: true

Specified by:
setFormData in interface ContextHolder
Parameters:
a_FormData -

getFormDataMultivalue

public Hashtable getFormDataMultivalue()
Deprecated.  

Gets the value of the attribute: formDataMultivalue.

Supported API: true

Returns:
Hashtable

setFormDataMultivalue

public void setFormDataMultivalue(Hashtable a_FormDataMultivalue)
Deprecated.  

Sets the value of the attribute: formDataMultivalue.

Supported API: true

Parameters:
a_FormDataMultivalue -

getQueryData

public Properties getQueryData()
Deprecated.  

Gets the value of the attribute: queryData.

Supported API: true

Specified by:
getQueryData in interface ContextHolder
Returns:
Properties

setQueryData

public void setQueryData(Properties a_QueryData)
Deprecated.  

Sets the value of the attribute: queryData.

Supported API: true

Specified by:
setQueryData in interface ContextHolder
Parameters:
a_QueryData -

getUpdateCount

public int getUpdateCount()
Deprecated.  

Gets the value of the attribute: updateCount.

Supported API: true

Returns:
int

setUpdateCount

public void setUpdateCount(int a_UpdateCount)
Deprecated.  

Sets the value of the attribute: updateCount.

Supported API: true

Parameters:
a_UpdateCount -

copyContextInto

public void copyContextInto(ContextHolder contextHolder)
Deprecated.  



Supported API: true

Parameters:
contextHolder -

copyStateFrom

public void copyStateFrom(HTTPState httpState)
Deprecated.  



Supported API: true

Parameters:
httpState -

addToResponseExceptions

public void addToResponseExceptions(Exception newException)
Deprecated.  

Adds a LocalizableMessage message to the list of stackTraces that can be presented with the Windchill Script call

showResponseExceptions

Supported API: true

Specified by:
addToResponseExceptions in interface ContextHolder
Parameters:
newException -

addToResponseMessages

public void addToResponseMessages(LocalizableMessage newMessage)
Deprecated.  

Adds a LocalizableMessage message to the list of localizable messages that can be presented with the Windchill Script call

showResponseMessages

Supported API: true

Specified by:
addToResponseMessages in interface ContextHolder
Parameters:
newMessage -

addToResponseHeaders

public void addToResponseHeaders(LocalizableMessage newHeader)
Deprecated.  

Adds a LocalizableMessage message to the list of localizable messages that can be presented with the Windchill Script call

showResponseHeaders

Supported API: true

Specified by:
addToResponseHeaders in interface ContextHolder
Parameters:
newHeader -

addToResponseFooters

public void addToResponseFooters(LocalizableMessage newFooter)
Deprecated.  

Adds a LocalizableMessage message to the list of localizable messages that can be presented with the Windchill Script call

showResponseFooters

Supported API: true

Specified by:
addToResponseFooters in interface ContextHolder
Parameters:
newFooter -

getState

private HTTPState getState()
Deprecated. 

setState

private void setState(HTTPState a_state)
Deprecated. 

getRequestObj

public HTTPRequest getRequestObj()
Deprecated. 
Returns the current wt.httpgw.HTTPRequest object for the current request from the client.

Supported API: true

Returns:
HTTPRequest

setRequestObj

public void setRequestObj(HTTPRequest a_request)
Deprecated. 
Sets wt.httpgw.HTTPResponse object for the current request. This is set in wt.enterprise.URLProcessor.

This should not be reset in general.

Supported API: true


getResponseObj

public HTTPResponse getResponseObj()
Deprecated. 
Returns the current wt.httpgw.HTTPResponse object for the current request from the client.

Supported API: true

Returns:
HTTPResponse

setResponseObj

public void setResponseObj(HTTPResponse a_response)
Deprecated. 
Sets wt.httpgw.HTTPResponse object for the current request. This is set in wt.enterprise.URLProcessor.

This should not be reset in general.

Supported API: true


setCookieManager

public void setCookieManager(ServletSessionCookieManager cookieManager)
Deprecated. 

getCookieManager

public ServletSessionCookieManager getCookieManager()
Deprecated. 

getServletSessionCookie

public ServletSessionCookie getServletSessionCookie(String id)
Deprecated. 

createServletSessionCookie

public ServletSessionCookie createServletSessionCookie(String id)
Deprecated. 

updateServletSession

public void updateServletSession()
Deprecated. 

setCurrentPage

public void setCurrentPage(String currentPage)
Deprecated. 

getCurrentPage

public String getCurrentPage()
Deprecated. 

getUserPreferences

public Preferences getUserPreferences()
Deprecated. 

getContextMask

public String[] getContextMask()
Deprecated. 

getEditMask

public String getEditMask()
Deprecated. 

getPagePreferences

public WTPreferences getPagePreferences()
Deprecated. 

refreshPreferences

public void refreshPreferences()
Deprecated. 

setFullyQualifiedURLFactory

public void setFullyQualifiedURLFactory(boolean state)
Deprecated. 

isFullyQualifiedURLFactory

public boolean isFullyQualifiedURLFactory()
Deprecated. 

setURLFactory

public void setURLFactory(URLFactory urlFactory)
Deprecated. 

getURLFactory

public URLFactory getURLFactory()
Deprecated.