Class DefaultTemplateProcessor
- All Implemented Interfaces:
Externalizable,Serializable,TemplateProcessor,ContextHolder,ContextTranslator,Evolvable
- Direct Known Subclasses:
ContainerTemplateProcessor,ExpandCollapseSectionProcessor,GenerateFormProcessor,com.ptc.windchill.cadx.common.HelpGenerationProcessor,ObjectPropertiesTableProcessor,PartReplacementsProcessor,WsPrefCommonTemplateProcessor
Once you have subclassed this class and added the proper entries in an .properties file to that you subclass and the corresponding HTML Template can be found, you only need to implement the methods to support the Windchill script calls in the HTML Template.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
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, STATUSFields inherited from interface wt.templateutil.processor.ContextTranslator
CONTEXT_LIST_IN, CONTEXT_LIST_OUT -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplayAttributeLabel(Properties parameters, Locale locale, OutputStream os) Deprecated.voiddisplayAttributeVal(Properties parameters, Locale locale, OutputStream os) Deprecated.voidgetAttributes(Properties parameters, Locale locale, OutputStream os) Deprecated.getContextPropertyValue(String token) Deprecated.Deprecated.Gets the object for the association that plays role: htmlTemplateFactory.intDeprecated.Deprecated.wt.htmlutil.HTMLTemplategetTemplate(HTTPRequest req) Deprecated.voidsetContextPropertyValue(String propertyName, String propertyValue) Deprecated.voidsetNameProcessor(TemplateNameProcessor a_NameProcessor) Deprecated.voidsetPAGE_EXPIRATION(int a_PAGE_EXPIRATION) Deprecated.voidsetPageExpirationResource(String a_PageExpirationResource) Deprecated.Methods inherited from class wt.enterprise.BasicTemplateProcessor
addHTMLHelpLink, addToResponseExceptions, addToResponseFooters, addToResponseHeaders, addToResponseMessages, createActionsBar, createGlobalNavigationBar, createNavigationBar, currentTimestamp, getContextAction, getContextClassName, getContextListIn, getContextListOut, getContextObj, getContextProperties, getEncoding, getFormData, getHTMLHelpURL, getHTMLTableService, getLocalizedPrintWriter, getObjectIcon, getPrintWriter, getQueryData, getResourceString, getResponseExceptions, getResponseFooters, getResponseHeaders, getResponseMessages, getResponseString, getStatus, getURLProcessorLink, getWCColor, getWCColorDec, getWCFontFamily, objectActionLink, objectBackground, objectIdentification, objectPropertyName, objectPropertyValue, processSubTemplate, setContextAction, setContextClassName, setContextListIn, setContextListOut, setContextObj, setContextProperties, setFormData, setQueryData, setResponseExceptions, setResponseFooters, setResponseHeaders, setResponseMessages, setResponseString, setStatus, showResponseExceptions, tableService
-
Method Details
-
getPageExpirationResource
Deprecated.Gets the value of the attribute: pageExpirationResource.
Supported API: true- Returns:
- String
-
setPageExpirationResource
Deprecated.Sets the value of the attribute: pageExpirationResource.
Supported API: true- Parameters:
a_PageExpirationResource-
-
getPAGE_EXPIRATION
public int getPAGE_EXPIRATION()Deprecated.Gets the value of the attribute: PAGE_EXPIRATION.
Supported API: true- Returns:
- int
-
setPAGE_EXPIRATION
public void setPAGE_EXPIRATION(int a_PAGE_EXPIRATION) Deprecated.Sets the value of the attribute: PAGE_EXPIRATION.
Supported API: true- Parameters:
a_PAGE_EXPIRATION-
-
getHtmlTemplateFactory
Deprecated.Gets the object for the association that plays role: htmlTemplateFactory.Returns the current implementation of an AbstractHTMLTemplateFactory that will be used to locate the HTML Template to be used. The default implementation of an AbstractHTMLTemplateFactory to be used is the DefaultHTMLTemplateFactory. However, any implementation of an AbstractHTMLTemplateFactory is valid.
Supported API: true- Returns:
- AbstractHTMLTemplateFactory
- Throws:
WTException
-
getTemplate
Deprecated.Returns the HTML Template to be processed using the current implementation of an AbstractHTMLTemplateFactory returned by the getHtmlTemplateFactory method.The current "state" and locale is used to find the correct HTML template.
Supported API: true- Parameters:
req-- Returns:
- HTMLTemplate
- Throws:
WTException
-
setNameProcessor
Deprecated.
Supported API: true- Parameters:
a_NameProcessor-- Throws:
WTException
-
setContextPropertyValue
Deprecated.
Supported API: true- Parameters:
propertyName-propertyValue-
-
getContextPropertyValue
Deprecated.
Supported API: true- Parameters:
token-- Returns:
- String
-
displayAttributeLabel
public void displayAttributeLabel(Properties parameters, Locale locale, OutputStream os) throws WTException Deprecated.Displays the the localized label for a given soft or modeled attribute of the current context object. For a soft attribute, this requires a database query unless the data was previously requested via a script call to getAttributes(). For a modeled attribute this method is equivalent to calling BasicTemplateProcessor.objectPropertyName() and no query is needed.
For better performance, if more than one call is to be made to displayAttributeLabel() for soft attributes from the same HTML template, first call getAttributes() to retrieve the data for all the soft attributes before calling displayAttributeLabel().
Supported API: true- Parameters:
parameters-- attributeName - External form of the attribute type identifer for
the attribute whose label is desired. Modeled attributes
should have the protocol prefix "MBA|" and soft attributes
should have the protocol prefix "IBA|".
Examples:- "IBA|booleanIBA" for the soft attribute named booleanIBA
- "MBA|partType" for the modeled attribute named partType
- attributeName - External form of the attribute type identifer for
the attribute whose label is desired. Modeled attributes
should have the protocol prefix "MBA|" and soft attributes
should have the protocol prefix "IBA|".
locale- Locale to use for localizing the attribute labelos- HTTP output stream- Throws:
WTException
-
displayAttributeVal
public void displayAttributeVal(Properties parameters, Locale locale, OutputStream os) throws WTException Deprecated.Displays the the value for a given soft or modeled attribute of the current context object. For a soft attribute, this requires a database query unless the data was previously requested via a script call to getAttributes(). For a modeled attribute, this method is equivalent to calling BasicTemplateProcessor.objectPropertyValue() and no query is needed.
If a soft attribute has more than one value, the values will be comma-separated in one string.
For better performance, if more than one call is to be made to displayAttributeVal() for soft attributes from the same HTML template, first call getAttributes() to retrieve the data for all the soft attributes to be displayed before calling displayAttributeVal().
Supported API: true- Parameters:
parameters-- attributeName - External form of the attribute type identifer for
the attribute whose value is desired. Modeled attribute names
should have the protocol prefix "MBA|" and soft attribute names
should have the protocol prefix "IBA|".
Examples:- "IBA|booleanIBA" for the soft attribute named booleanIBA
- "MBA|partType" for the modeled attribute named partType
- attributeName - External form of the attribute type identifer for
the attribute whose value is desired. Modeled attribute names
should have the protocol prefix "MBA|" and soft attribute names
should have the protocol prefix "IBA|".
locale- Locale to use for localizing the attribute valueos- HTTP output stream- Throws:
WTException
-
getAttributes
Deprecated.Retrieves the display name and value(s) for one or more given soft attributes of the current context object and stores them in the contextProperties attribute of the HTTPState object for later use by the displayAttributeLabel() and/or displayAttributeVal() methods. The purpose of this method is to make multiple calls to displayAttributeLabel() and/or displayAttributeVal() more efficient by retrieving all the required attribute data in one query.
Supported API: true- Parameters:
parameters-- attributeNames - Comma-separated list of the external form of the attribute type identifers for
the desired attributes. Modeled attribute names should have the protocol prefix
"MBA|" and soft attribute names should have the protocol prefix "IBA|".
For example, to retrieve the data for the soft attributes booleanIBA and stringIBA and the modeled attribute partType you would use the following value: "IBA|booleanIBA, IBA|stringIBA, MBA|partType"
- attributeNames - Comma-separated list of the external form of the attribute type identifers for
the desired attributes. Modeled attribute names should have the protocol prefix
"MBA|" and soft attribute names should have the protocol prefix "IBA|".
locale- Locale to use for localizing the attribute labels and valuesos- Output stream- Throws:
WTException
-