com.ptc.windchill.cadx.wsoption
Class WsPrefCommonTemplateProcessor

java.lang.Object
  extended bywt.enterprise.BasicTemplateProcessor
      extended bywt.templateutil.processor.DefaultTemplateProcessor
          extended bycom.ptc.windchill.cadx.wsoption.WsPrefCommonTemplateProcessor
All Implemented Interfaces:
ContextHolder, ContextTranslator, Evolvable, Externalizable, ProcessorService, Serializable, TemplateProcessor

public class WsPrefCommonTemplateProcessor
extends DefaultTemplateProcessor
implements ProcessorService

This ProcessorService has the common methods useful to all the workspace preferences tab. For example, getTitle() method is common to all the General, Part Config Spec & Doc Config Spec option tabs.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String BG_TAB_OFF
           
private static String BG_TAB_ON
           
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  HTTPState theState
           
private static boolean VERBOSE
           
static String WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_ACTION
          This is the action as specified in the service.properties file for the template or sub-template.
static String WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_PAGE_ACTION
           
static String WORKSPACE_GENERAL_OPTIONS_ACTION
          This is the action as specified in the service.properties file.
static String WORKSPACE_OPTIONS_COOKIE
           
static String WORKSPACE_PART_CONFIG_SPEC_OPTIONS_ACTION
          This is the action as specified in the service.properties file for the template or sub-template.
static String WORKSPACE_PART_CONFIG_SPEC_OPTIONS_PAGE_ACTION
           
 
Fields inherited from class wt.templateutil.processor.DefaultTemplateProcessor
ACTION, CLASS, CODEBASE, LINE_FEED_DELIMITER, MESSAGE_SEPARATOR, OID
 
Fields inherited from class wt.enterprise.BasicTemplateProcessor
ADD_HELP_ICON, ALL_CABINETS, BLANK_SPACE, BREAK_SEPARATOR, BREAK_TAG, componentFactory, CONTAINER_NAME, CONTENT_RESOURCE, contextClass, DEFAULT_CHARSET, DEFAULT_HELP_ICON_SELECTOR, DEFAULT_HELP_LABEL, DEFAULT_PREFERENCE_CONTEXT, DOCFROMTEMPLATE, ENABLE_HELP_ICON_PROPERTY_NAME, ENTERPRISE_SEARCH, FEDERATION_SEARCH, GLOBAL_NAVIGATION_ENABLE_HELP_ICON, globalNavBarHelpIconEnabledDefault, HELP_CONTEXT, HELP_ICON_POSITION, HELP_ICON_SELECTOR, HELP_LABEL, HELP_LABEL_RESOURCE, HELP_WINDOW_NAME, helpContext, helpIconEnabled, helpIconEnabledDefault, HOMEPAGE, IDPREFIX, IMPORT, INTEGRATED_SEARCH, isDndMicroAppletEnabled, isDndMicroAppletEnabledInitialized, LABEL_SEPARATOR, linkPrefix, LOCAL_SEARCH, pageContext, PDMLINK_INSTALL_KEY, PERSONAL_CABINET, PREF_WINDOW_NAME, PREFERENCE_CONTEXT, PRESENT_HELP_LABEL, PROJECTLINK_INSTALL_KEY, SEARCH, SHARE_ICON, TEXT_RESOURCE_BUNDLE, URL_RESOURCE, WORKLIST, wtAttribute, WTCORE_IMAGE_DIR
 
Fields inherited from interface wt.templateutil.processor.ProcessorService
STATE
 
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
 
Fields inherited from interface wt.templateutil.processor.ContextTranslator
CONTEXT_LIST_IN, CONTEXT_LIST_OUT
 
Constructor Summary
WsPrefCommonTemplateProcessor()
           
 
Method Summary
 void getDefaultOrFormDataValue(Properties parameters, Locale locale, OutputStream os)
          For the specified name attribute, get either the default or the user entered (before the page refresh) value from the form data.
 void getDocConfigSpecPrefLink(Properties parameters, Locale locale, OutputStream os)
          Get URL link in the anchor format for the Workspace CAD Doc Config Spec Preference tab.
 void getDocConfigSpecPrefLinkColor(Properties parameters, Locale locale, OutputStream os)
          Get URL link color for the Workspace Doc Config Spec Preference tab.
 void getEditWorkspaceOptionsURL(Properties parameters, Locale locale, OutputStream os)
          Create the Edit Workspace Options (General) page URL.
 void getEditWsConfigSpecOptionsURL(Properties parameters, Locale locale, OutputStream os)
          Create the Edit Workspace Config Spec Options page URL.
 void getGeneralPrefLink(Properties parameters, Locale locale, OutputStream os)
          Get URL link in the anchor format for the Workspace General Preference tab.
 void getGeneralPrefLinkColor(Properties parameters, Locale locale, OutputStream os)
          Get URL link color for the Workspace General Preference tab.
 void getHelpContext(Properties parameters, Locale locale, OutputStream os)
          Return help context key based editOnlyConficSpec flag.
 void getPageTitle(Properties parameters, Locale locale, OutputStream os)
          Provides page title which also includes workspace name.
 void getPartConfigSpecPrefLink(Properties parameters, Locale locale, OutputStream os)
          Get URL link in the anchor format for the Workspace Part Config Spec Preference tab.
 void getPartConfigSpecPrefLinkColor(Properties parameters, Locale locale, OutputStream os)
          Get URL link color for the Workspace Part Config Spec Preference tab.
private  void getPrefLink(Properties parameters, Locale locale, OutputStream os, String action, String label, boolean saveRefURL)
           
private  String getPrefLinkStyleClass(String action)
          If the specified action is same as the current context action, return the 'bg-tab-on' style class.
 HTTPState getState()
          Gets the object for the association that plays role: theState.
 void getWsRefUrl(Properties parameters, Locale locale, OutputStream os)
          Get URL for the referer page.
 void isInvokedFromCheckoutDownloadPage(Properties parameters, Locale locale, OutputStream os)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(WsPrefCommonTemplateProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setState(HTTPState a_State)
          Sets the object for the association that plays role: theState.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.templateutil.processor.DefaultTemplateProcessor
addHiddenProperty, addToFeedbackCookie, addToFeedbackCookie, getContextPropertyValue, getCurrentUrl, getFeedbackCookieExceptions, getFeedbackCookieMessages, getHtmlTemplateFactory, getMessageSeparator, getPAGE_EXPIRATION, getPageExpirationResource, getTemplate, getTemplateDisplay, handleRequest, hiddenContextString, readVersion, setContextPropertyValue, setHtmlTemplateFactory, setMethodContextProperty, setNameProcessor, setPAGE_EXPIRATION, setPageExpirationResource, writeHiddenContext, writeQueryStringContext
 
Methods inherited from class wt.enterprise.BasicTemplateProcessor
AccessOK, addHTMLHelpLink, addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, allVersions, bcwti, buildFormProcessorURL, buildFormProcessorURL, comment, createActionsBar, createFederationNavigationBar, createGlobalNavigationBar, createNavigationBar, createParentFolderLink, currentTimestamp, displayAllCabinets, displayAttributeName, displayAttributesTable, displayAttributeValue, displayFolderContents, displayFolderObject, displayFolderTrail, displayGoToLatestLink, displayOrganizationIdentifier, displayPendingChangeIndicator, displayStyleSheetAttributesTable, displayVisualData, formatDate, getActionPairs, getAllCabinetsURL, getBaselineItems, getCharsetEncoding, getCheckedOutFolderURL, getClassIcon, getClassInfo, getContextAction, getContextClass, getContextClassName, getContextListIn, getContextListOut, getContextObj, getContextProperties, getContextServiceName, getDisplayName, getDomainPath, getEnabledVersion, getEncoding, getFederationSearchURL, getFolderLocation, getFolderPath, getFormData, getGenericInstanceIconImgTag, getGlyphImageTag, getGlyphsArray, getGlyphTagsNoDnD, getHelpContext, getHomepageURL, getHTMLComponentFactory, getHTMLHelpLink, getHTMLHelpURL, getHTMLHelpURL, getHTMLTableService, getIconResource, getIconResource, getIconResource, getIconSelector, getId, getJavaScriptManager, getLocalizedDateFormatMessage, getLocalizedMessage, getLocalizedPrintWriter, getLocalizedString, getObjectDnDIcon, getObjectIcon, getObjectIconDnDTag, getObjectIconGlyphs, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectIconImgTag, getObjectPropertyValueString, getObjectPropertyValueString, getPageContext, getParentFolderLink, getPersonalCabinet, getPersonalCabinetURL, getPreferenceValue, getPrincipalEmailLink, getPrincipalEmailLink, getPrintWriter, getPropertyFromPropertyFile, getQuery, getQueryData, getReferenceString, getReferenceString, getResourceString, getResourceString, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getSearchCriteriaURL, getSearchCriteriaURL, getSearchResultsURL, getShareImage, getShareImage, getStatus, getStringFromResourceBundle, getStringFromResourceBundle, getTemplateDisplayGeneral, getTrailId, getTrlIdAttribute, getURLActions, getURLActions, getURLActions, getURLActions, getURLActionsString, getURLActionsString, getURLFactory, getURLFromDelegate, getURLProcessorLink, getURLProcessorLink, getURLProcessorLink, getURLProcessorLinkWithLabel, getUsedByLinks, getWCColor, getWCColor, getWCColorDec, getWCColorDec, getWCFontFamily, getWCFontFamily, getWorklistURL, getWTAttribute, getWTContainerByName, getWTContainerRef, handleExceptionTP, handleExceptionTP, handleProcessorException, include, initJavaScriptManager, isDndMicroAppletEnabled, isEqual, listContent, objectActionLink, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectActionLinkAux, objectBackground, objectIdentification, objectIdentifier, objectProperties, objectPropertyName, objectPropertyNameAux, objectPropertyNameAux2, objectPropertyValue, objectPropertyValueAux, objectPropertyValueAux2, objectPropertyValueString, outputLink, outputPropertyFromPropertyFile, parameterValue, partUsedBy, PDMLinkIsInstalled, printQueryTable, printTable, printTextArea, processSubTemplate, readContext, readVersion, setColumnProperties, setContextAction, setContextClass, setContextClassName, setContextListIn, setContextListOut, setContextObj, setContextProperties, setFormData, setHelpContext, setHTMLTableService, setJavaScriptManager, setPageContext, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus, showResponseExceptions, showResponseFooters, showResponseHeaders, showResponseMessage, showResponseMessages, showVersions, sortQueryResult, splitStringIntoTokens, tableService, translateToHtml, useProcessorService, visualizationIsEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface wt.templateutil.processor.ContextHolder
addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, getContextAction, getContextClassName, getContextObj, getContextProperties, getFormData, getQueryData, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getStatus, setContextAction, setContextClassName, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

WORKSPACE_GENERAL_OPTIONS_ACTION

public static final String WORKSPACE_GENERAL_OPTIONS_ACTION
This is the action as specified in the service.properties file. Needs to be changed as action name gets modifed.

Supported API: false

See Also:
Constant Field Values

WORKSPACE_PART_CONFIG_SPEC_OPTIONS_ACTION

public static final String WORKSPACE_PART_CONFIG_SPEC_OPTIONS_ACTION
This is the action as specified in the service.properties file for the template or sub-template. Needs to be changed as action name gets modifed.

Supported API: false

See Also:
Constant Field Values

WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_ACTION

public static final String WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_ACTION
This is the action as specified in the service.properties file for the template or sub-template. Needs to be changed as action name gets modifed.

Supported API: false

See Also:
Constant Field Values

theState

private HTTPState theState

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

WORKSPACE_PART_CONFIG_SPEC_OPTIONS_PAGE_ACTION

public static final String WORKSPACE_PART_CONFIG_SPEC_OPTIONS_PAGE_ACTION
See Also:
Constant Field Values

WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_PAGE_ACTION

public static final String WORKSPACE_DOC_CONFIG_SPEC_OPTIONS_PAGE_ACTION
See Also:
Constant Field Values

BG_TAB_OFF

private static final String BG_TAB_OFF
See Also:
Constant Field Values

BG_TAB_ON

private static final String BG_TAB_ON
See Also:
Constant Field Values

WORKSPACE_OPTIONS_COOKIE

public static final String WORKSPACE_OPTIONS_COOKIE
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE
Constructor Detail

WsPrefCommonTemplateProcessor

public WsPrefCommonTemplateProcessor()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

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

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

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

readVersion

protected boolean readVersion(WsPrefCommonTemplateProcessor thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
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
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

getPageTitle

public void getPageTitle(Properties parameters,
                         Locale locale,
                         OutputStream os)
                  throws WTException
Provides page title which also includes workspace name.

Supported API: false

Parameters:
parameters -
locale -
os -
Throws:
WTException

getGeneralPrefLink

public void getGeneralPrefLink(Properties parameters,
                               Locale locale,
                               OutputStream os)
Get URL link in the anchor format for the Workspace General Preference tab.

Supported API: false

Parameters:
parameters -
locale -
os -

getPartConfigSpecPrefLink

public void getPartConfigSpecPrefLink(Properties parameters,
                                      Locale locale,
                                      OutputStream os)
Get URL link in the anchor format for the Workspace Part Config Spec Preference tab.

Supported API: false

Parameters:
parameters -
locale -
os -

getDocConfigSpecPrefLink

public void getDocConfigSpecPrefLink(Properties parameters,
                                     Locale locale,
                                     OutputStream os)
Get URL link in the anchor format for the Workspace CAD Doc Config Spec Preference tab.

Supported API: false

Parameters:
parameters -
locale -
os -

getDefaultOrFormDataValue

public void getDefaultOrFormDataValue(Properties parameters,
                                      Locale locale,
                                      OutputStream os)
For the specified name attribute, get either the default or the user entered (before the page refresh) value from the form data. Mostly the default value would be blank string. The returned value should be used for the value attribute of a tag. For example, to get a value for an input text field, the HTML code would be something like this: "

Supported API: false

Parameters:
parameters -
locale -
os -

getWsRefUrl

public void getWsRefUrl(Properties parameters,
                        Locale locale,
                        OutputStream os)
Get URL for the referer page.

Supported API: false

Parameters:
parameters -
locale -
os -

getGeneralPrefLinkColor

public void getGeneralPrefLinkColor(Properties parameters,
                                    Locale locale,
                                    OutputStream os)
                             throws WTException
Get URL link color for the Workspace General Preference tab. The tab bgcolor would be either on or off based upon the action context.

Supported API: false

Parameters:
parameters -
locale -
os -
Throws:
WTException

getPartConfigSpecPrefLinkColor

public void getPartConfigSpecPrefLinkColor(Properties parameters,
                                           Locale locale,
                                           OutputStream os)
                                    throws WTException
Get URL link color for the Workspace Part Config Spec Preference tab. The tab bgcolor would be either on or off based upon the action context.

Supported API: false

Parameters:
parameters -
locale -
os -
Throws:
WTException

getDocConfigSpecPrefLinkColor

public void getDocConfigSpecPrefLinkColor(Properties parameters,
                                          Locale locale,
                                          OutputStream os)
                                   throws WTException
Get URL link color for the Workspace Doc Config Spec Preference tab. The tab bgcolor would be either on or off based upon the action context.

Supported API: false

Parameters:
parameters -
locale -
os -
Throws:
WTException

getState

public HTTPState getState()
Gets the object for the association that plays role: theState.

Supported API: true

Specified by:
getState in interface ProcessorService
Overrides:
getState in class BasicTemplateProcessor
Returns:
HTTPState

setState

public void setState(HTTPState a_State)
Sets the object for the association that plays role: theState.

Supported API: true

Specified by:
setState in interface ProcessorService
Overrides:
setState in class BasicTemplateProcessor
Parameters:
a_State -

getPrefLink

private void getPrefLink(Properties parameters,
                         Locale locale,
                         OutputStream os,
                         String action,
                         String label,
                         boolean saveRefURL)

getPrefLinkStyleClass

private String getPrefLinkStyleClass(String action)
If the specified action is same as the current context action, return the 'bg-tab-on' style class. Else, return 'bg-tab-off'.


getEditWorkspaceOptionsURL

public void getEditWorkspaceOptionsURL(Properties parameters,
                                       Locale locale,
                                       OutputStream os)
                                throws WTException
Create the Edit Workspace Options (General) page URL. The wsoid is supposed to be passed as name/value pair thru parameters. Also make sure to indicate that the Referer URL should to saved so that control could come back to the launch page once the Edit task is all done. Expected attributes for this script are: wsoid=...workspace oid... label=...label for the link...

Throws:
WTException

getEditWsConfigSpecOptionsURL

public void getEditWsConfigSpecOptionsURL(Properties parameters,
                                          Locale locale,
                                          OutputStream os)
Create the Edit Workspace Config Spec Options page URL.


getHelpContext

public void getHelpContext(Properties parameters,
                           Locale locale,
                           OutputStream os)
                    throws WTException
Return help context key based editOnlyConficSpec flag. The key's format is:

if editOnlyConficSpec is set to true.

if editOnlyConficSpec is set to false.

Throws:
WTException

isInvokedFromCheckoutDownloadPage

public void isInvokedFromCheckoutDownloadPage(Properties parameters,
                                              Locale locale,
                                              OutputStream os)