wt.templateutil.processor
Class FormTaskDelegate

java.lang.Object
  extended bywt.templateutil.processor.FormTaskDelegate
All Implemented Interfaces:
ContextHolder
Direct Known Subclasses:
ActionFormTaskDelegate, ActionStatusTaskDelegate, AddChangeablesDelegate, AddChangeIssuesDelegate, AddEffTaskDelegate, AddSubjectProductsDelegate, AdHocActivitiesTaskDelegate, ApplyLayoutDelegate, AssociateFormTaskDelegate, AutoAssociateTaskDelegate, AutoPartFormTaskDelegate, CancelCheckoutTaskDelegate, CancelCheckoutTaskDelegate, CancelDocCloseWindowFormTaskDelegate, CancelFormTaskDelegate, ChangeUnitsTaskDelegate, CheckinFormTaskDelegate, CheckinFormTaskDelegate, CheckoutDownloadDelegateToOtherActions, CheckoutTaskDelegate, ClearConsoleFormTaskDelegate, CloseWindowFormTaskDelegate, CompareModelTaskDelegate, ConsolePrefFormTaskDelegate, CreateAlternateLinksTaskDelegate, CreateChangeDelegate, CreateSubFolderTaskDelegate, CreateSubstituteLinksTaskDelegate, CreateTemplateCADDocCloseWindowFormTaskDelegate, CreateTemplateCADDocumentFormTaskDelegate, CreateWSFormTaskDelegate, CreateWTDocumentTaskDelegate, CreateWTProductInstanceFormTaskDelegate, DefinePartAlternatesTaskDelegate, DefinePartSubstitutesTaskDelegate, DelegateToCommonActions, DeleteAnalysisActivityDelegate, DeleteChangeActivityDelegate, DeleteChangeInvestigationDelegate, DeleteChangeOrderDelegate, DeleteChangeProposalDelegate, DeleteDocumentDelegate, DeleteEventsTaskDelegate, DeleteWorkspaceFormTaskDelegate, DeleteWTProductInstanceFormTaskDelegate, DifferenceReportTaskDelegate, DisassociateFormTaskDelegate, EDACompareSearchTaskDelegate, EditAttributesFormTaskDelegate, EditPreferencesTaskDelegate, EditPreferencesTaskDelegate, FindNodeTaskDelegate, ForumNotificationDelegate, FuncEqChangeUnitsTaskDelegate, FuncEqSearchTaskDelegate, GenWsprefFormTaskDelegate, IBADisplayUnitsFormTaskDelegate, LifeCycleTaskCompleteDelegate, MoveDocumentDelegate, MultiEditAttrCheckoutTaskDelegate, MultiEditAttrFormTaskDelegate, MultiReviseFormTaskDelegate, NavigateFoldersTaskDelegate, NewCadDocFormTaskDelegate, NewPartFormTaskDelegate, OrgnizationPickerTaskDelegate, PickerTaskDelegate, PlaceHolderTaskDelegate, PrimaryContentDataDelegate, ProcessWsSelFormTaskDelegate, ReassignDelegate, RedirectUpdateFormTaskDelegate, RemoveFormTaskDelegate, RenameDocumentDelegate, RenameFormTaskDelegate, ReportTemplateExecuteFormTaskDelegate, ReviseAllFormTaskDelegate, ReviseDocumentDelegate, ReviseFormTaskDelegate, RulesSectionTaskDelegate, SaveAsFormTaskDelegate, SearchTaskDelegate, SetIncorporatedFormTaskDelegate, SetPlannedIncorporationFormTaskDelegate, SubmitChangeObjectDelegate, SubscriptionTaskDelegate, TableViewManagerFormTaskDelegate, TaskCompleteDelegate, UndoCheckoutDocumentDelegate, UpdateChangeDelegate, UpdateDueDateDelegate, UpdateWSFormTaskDelegate, UpdateWTProductInstanceFormTaskDelegate, WizardFormTaskDelegate, WorkListActionDelegate, WsConfigSpecPrefFormTaskDelegate, WTDocumentFormTaskDelegate, WTDocumentRedirectTaskDelegate, WTDocumentTemplateFormTaskDelegate

public abstract class FormTaskDelegate
extends Object
implements ContextHolder

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 the parent class of all classes that will be used to process an action back on the server for an HTTP Request ( URL with a query string) or an HTTP POST ( HTML page with an HTML Form in it).

This class implements the ContextHolder interface and is passed the current HTTPState object to allow processing of the current HTTP Request or HTTP POST, as the case may be. During processing of the current action, the HTTPState object should be modified to reflect the current state. In particular, upon exit of this method processForm the HTTPState object should reflect the state required to locate the correct TemplateProcessor subclass and the correct HTML Template to generate the desired response page. If there are any message to pass back to the response page, the addToResponse methods can be used for this.

The FormTaskDelegateFactory is used by wt.enterprise.URLProcessor to locate the correct FormTaskDelegate subclass based on the current state as specified in either the query String or the HTTP POST data.

Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private  HTTPState theState
          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
FormTaskDelegate()
          Deprecated.  
 
Method Summary
 void addToResponseExceptions(Exception newException)
          Deprecated.  
 void addToResponseFooters(LocalizableMessage newFooter)
          Deprecated.  
 void addToResponseHeaders(LocalizableMessage newHeader)
          Deprecated.  
 void addToResponseMessages(LocalizableMessage newMessage)
          Deprecated.  
 void deleteFormDataFromSession(String formName)
          Deprecated.  
 String getContextAction()
          Deprecated.  
 String getContextClassName()
          Deprecated.  
 Object getContextObj()
          Deprecated.  
 Properties getContextProperties()
          Deprecated.  
 Properties getFormData()
          Deprecated.  
 Properties getQueryData()
          Deprecated.  
 Vector getResponseExceptions()
          Deprecated.  
 Vector getResponseFooters()
          Deprecated.  
 Vector getResponseHeaders()
          Deprecated.  
 Vector getResponseMessages()
          Deprecated.  
 String getResponseString()
          Deprecated.  
 HTTPState getState()
          Deprecated.  
 int getStatus()
          Deprecated.  
abstract  void processAction(ContentHTTPStream contentStream)
          Deprecated.  
 void saveFormDataInSession(String formName, Properties formData)
          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 setFormData(Properties a_FormData)
          Deprecated.  
 void setQueryData(Properties a_QueryData)
          Deprecated.  
 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 setResponseString(String a_ResponseString)
          Deprecated.  
 void setState(HTTPState a_State)
          Deprecated.  
 void setStatus(int a_Status)
          Deprecated.  
 void switchPages(String nextContextAction, Object nextContextObj, String nextContextClass)
          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. 

theState

private HTTPState theState
Deprecated. 
Constructor Detail

FormTaskDelegate

public FormTaskDelegate()
Deprecated. 
Method Detail

getState

public HTTPState getState()
Deprecated.  

Gets the object for the association that plays role: theState.

Supported API: false

Returns:
HTTPState

setState

public void setState(HTTPState a_State)
Deprecated.  

Sets the object for the association that plays role: theState.

Supported API: false

Parameters:
a_State -

processAction

public abstract void processAction(ContentHTTPStream contentStream)
                            throws Exception
Deprecated.  

Processed the desired action and then updates the state so that the desired response page can be generated.

Use the addToResponse methods to pass back messages on the status/results of the action.

Supported API: true

Parameters:
contentStream -
Throws:
Exception

getContextAction

public String getContextAction()
Deprecated.  

Gets the value of the attribute: contextAction; Context Action is the name of the action of the current page

Supported API: true

Specified by:
getContextAction in interface ContextHolder
Returns:
String

setContextAction

public void setContextAction(String a_ContextAction)
Deprecated.  

Sets the value of the attribute: contextAction; Context Action is the name of the action of the current page

Supported API: true

Specified by:
setContextAction in interface ContextHolder
Parameters:
a_ContextAction -

getContextObj

public Object getContextObj()
Deprecated.  

Gets the value of the attribute: contextObj; Context Object is the reference object of the current page

Supported API: true

Specified by:
getContextObj in interface ContextHolder
Returns:
Object

setContextObj

public void setContextObj(Object a_ContextObj)
Deprecated.  

Sets the value of the attribute: contextObj; Context Object is the reference object of the current page

Supported API: true

Specified by:
setContextObj in interface ContextHolder
Parameters:
a_ContextObj -

getContextClassName

public String getContextClassName()
Deprecated.  

Gets the value of the attribute: contextClassName; Context Object Name is the name of the class of the current page

Supported API: true

Specified by:
getContextClassName in interface ContextHolder
Returns:
String

setContextClassName

public void setContextClassName(String a_ContextClassName)
Deprecated.  

Sets the value of the attribute: contextClassName; Context Object Name is the name of the class of the current page

Supported API: true

Specified by:
setContextClassName in interface ContextHolder
Parameters:
a_ContextClassName -

getContextProperties

public Properties getContextProperties()
Deprecated.  

Gets the value of the attribute: contextProperties.

Supported API: true

Specified by:
getContextProperties in interface ContextHolder
Returns:
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; Form Data is the data present in the form of the current HTML page.

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; Form Data is the data present in the form of the current HTML page.

Supported API: true

Specified by:
setFormData in interface ContextHolder
Parameters:
a_FormData -

getQueryData

public Properties getQueryData()
Deprecated.  

Gets the value of the attribute: queryData; Query Data is the information present after the "?" mark on the URL of the current page.

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; Query Data is the information present after the "?" mark on the URL of the current page.

Supported API: true

Specified by:
setQueryData in interface ContextHolder
Parameters:
a_QueryData -

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 -

saveFormDataInSession

public void saveFormDataInSession(String formName,
                                  Properties formData)
Deprecated.  

Saves the data of a form in session context

NOTE: This method should not be used for entity create update/forms that can contain nonmodeled attributes. Instead, use the method saveEntityFormDataInSession() in com.ptc.core.HTMLtemplateutil.server.processors.EntityTaskDelegate for such forms.

Supported API: false

Parameters:
formName - key used to identify the form data in session context
formData - form data to be saved

deleteFormDataFromSession

public void deleteFormDataFromSession(String formName)
Deprecated.  

Deletes the data of a form from session context

Supported API: false

Parameters:
formName - key used to identify the form data in session context

switchPages

public void switchPages(String nextContextAction,
                        Object nextContextObj,
                        String nextContextClass)
                 throws WTException
Deprecated.  

Checks whether a given action is enabled and, if so, switches the context action so that the current gateway URL will be replaced by one with the new action.

Supported API: false

Parameters:
nextContextAction - the name of the action for the next URL. Required.
nextContextObj - the object for the next URL. Optional.
nextContextClass - the class name for the next URL. Optional. nextContextObj and nextContextClass are mutually exclusive.
Throws:
WTException