com.ptc.windchill.cadx.wsoption
Class WsConfigSpecPrefFormTaskDelegate

java.lang.Object
  extended bywt.templateutil.processor.FormTaskDelegate
      extended bycom.ptc.windchill.cadx.wsoption.WsConfigSpecPrefFormTaskDelegate
All Implemented Interfaces:
ContextHolder

public class WsConfigSpecPrefFormTaskDelegate
extends FormTaskDelegate

This is used for both the doc & part config spec options editing.

Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
private static boolean VERBOSE
           
 
Fields inherited from class wt.templateutil.processor.FormTaskDelegate
 
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
WsConfigSpecPrefFormTaskDelegate()
           
 
Method Summary
private  Properties createInterTabParameters(WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Create a Propeties object to be passed from one tab to other tab as hidden form field for the trequired data which other tab needs to be aware of.
private  Properties createPickerHiddenProperties(String pickerOperation)
          Set up all the required key/value pairs for the Picker page.
private  boolean getAndvalidateBaseline1PanelData(Properties formData, WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Get the user specified form values for Baseline radio button & set these values to the WsConfigSpecEditUtilities bean.
private  boolean getAndvalidateBaseline2PanelData(Properties formData, WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Get the user specified form values for 'Baseline for Iterm' & set these values to the WsConfigSpecEditUtilities bean.
private  boolean getAndvalidateEffectivityPanelData(Properties formData, WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Get the user specified form values for effectivity & set these values to the WsConfigSpecEditUtilities bean.
private  boolean getAndvalidateStandardPanelData(Properties formData, WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Get the user specified form values for Standard radio button & set these values to the WsConfigSpecEditUtilities bean.
 EPMWorkspace getEPMWorkspace()
           
private  Properties getParametersForRefererPage()
          Get the properties object used for passing back params to the referer page.
private  boolean modifyConfigSpec(WsConfigSpecEditUtilities wsConfigSpecEditUtilities, String buttonSelected, EPMWorkspace workspace, String identicalForOther)
          Update the doc & part (if requested) config spec of the workspace
private  boolean modifyDocOrPartConfigSpec(WsConfigSpecEditUtilities wsConfigSpecEditUtilities, String buttonSelected, EPMWorkspace workspace)
          update the doc or part config spec of the workspace.
 void processAction(ContentHTTPStream contentStream)
          Deprecated.  
private  void redirectToPickerPage(String pickerOperation)
          Re-direct to the picker page.
private  void redirectToRefererPage(String refUrl, boolean cancelPressed)
           
private  boolean saveCsChangeToWs(WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
          Check whther user has indicated to save the config spec changes to the workspace.
 void setKeyValuePairForRefererPage(String key, String value)
          Set the specified key/value pair into the properties file which would be later included as hidden fields to the referer page.
private  void setPickerQueryAndTypeList(Properties hiddenProperties, String pickerOperation)
           
 
Methods inherited from class wt.templateutil.processor.FormTaskDelegate
addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, deleteFormDataFromSession, getContextAction, getContextClassName, getContextObj, getContextProperties, getFormData, getQueryData, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getState, getStatus, saveFormDataInSession, setContextAction, setContextClassName, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setState, setStatus, switchPages
 
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
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

VERBOSE

private static boolean VERBOSE
Constructor Detail

WsConfigSpecPrefFormTaskDelegate

public WsConfigSpecPrefFormTaskDelegate()
Method Detail

processAction

public 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

Specified by:
processAction in class FormTaskDelegate
Parameters:
contentStream -
Throws:
Exception

modifyConfigSpec

private boolean modifyConfigSpec(WsConfigSpecEditUtilities wsConfigSpecEditUtilities,
                                 String buttonSelected,
                                 EPMWorkspace workspace,
                                 String identicalForOther)
Update the doc & part (if requested) config spec of the workspace


modifyDocOrPartConfigSpec

private boolean modifyDocOrPartConfigSpec(WsConfigSpecEditUtilities wsConfigSpecEditUtilities,
                                          String buttonSelected,
                                          EPMWorkspace workspace)
update the doc or part config spec of the workspace.


getEPMWorkspace

public EPMWorkspace getEPMWorkspace()

getAndvalidateStandardPanelData

private boolean getAndvalidateStandardPanelData(Properties formData,
                                                WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Get the user specified form values for Standard radio button & set these values to the WsConfigSpecEditUtilities bean. Also validate these values.


getAndvalidateBaseline1PanelData

private boolean getAndvalidateBaseline1PanelData(Properties formData,
                                                 WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Get the user specified form values for Baseline radio button & set these values to the WsConfigSpecEditUtilities bean. Also validate these values.


getAndvalidateBaseline2PanelData

private boolean getAndvalidateBaseline2PanelData(Properties formData,
                                                 WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Get the user specified form values for 'Baseline for Iterm' & set these values to the WsConfigSpecEditUtilities bean. Also validate these values.


getAndvalidateEffectivityPanelData

private boolean getAndvalidateEffectivityPanelData(Properties formData,
                                                   WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Get the user specified form values for effectivity & set these values to the WsConfigSpecEditUtilities bean. Also validate these values.


setKeyValuePairForRefererPage

public void setKeyValuePairForRefererPage(String key,
                                          String value)
Set the specified key/value pair into the properties file which would be later included as hidden fields to the referer page. Add only those params which are expected by the referer page. Since user might be navigating among tabs, the best way to save these is through session state.


getParametersForRefererPage

private Properties getParametersForRefererPage()
Get the properties object used for passing back params to the referer page.


redirectToRefererPage

private void redirectToRefererPage(String refUrl,
                                   boolean cancelPressed)

redirectToPickerPage

private void redirectToPickerPage(String pickerOperation)
Re-direct to the picker page.


createPickerHiddenProperties

private Properties createPickerHiddenProperties(String pickerOperation)
Set up all the required key/value pairs for the Picker page.


setPickerQueryAndTypeList

private void setPickerQueryAndTypeList(Properties hiddenProperties,
                                       String pickerOperation)

createInterTabParameters

private Properties createInterTabParameters(WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Create a Propeties object to be passed from one tab to other tab as hidden form field for the trequired data which other tab needs to be aware of.


saveCsChangeToWs

private boolean saveCsChangeToWs(WsConfigSpecEditUtilities wsConfigSpecEditUtilities)
Check whther user has indicated to save the config spec changes to the workspace.