wt.templateutil.processor
Class SubTemplateService

java.lang.Object
  extended bywt.templateutil.processor.SubTemplateService
All Implemented Interfaces:
ContextHolder, ProcessorService

public class SubTemplateService
extends Object
implements ProcessorService

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 implementor of the ProcessorService interface allows the componentization of HTML Pages by allowing the HTML Templates to be componentized. This allows reuse on two fronts. It allows the reuse of an HTML template as a sub-template in several HTML HTML pages and also allows the reuse of the Java code that processes the HTML template.

The purpose of this service is that if you have a certain section of HTML that is being used in several pages, you should factor out that section of HTML as a sub-template and then use this service to "import" the processed HTML template in the page.

The Windchill Script call to invoke the inplace processing of a subtemplate (This assumes your TemplateProcessor has wt.enterprise.BasicTemplateProcessor in its hierarchy) is

processSubTemplate action=<New Action>

Here, the value will be used by the SubTemplateService to locate the sub-Template to process and the TemplateProcessor subclass process the HTML template. The Context Class used to locate the sub-Template and the TemplateProcessor will be the same as the parent page.

Any name/value pairs passed in the Windchill Script call will be available in the sub-Template TemplateProcessor via the ContextProperties object.

Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
          Deprecated.  
private  HTMLTemplate htmlTemplate
          Deprecated.  
private  String htmlTemplateName
          Deprecated.  
private  Locale locale
          Deprecated.  
private  OutputStream os
          Deprecated.  
static String PROCESSOR
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private  Properties scriptProps
          Deprecated.  
static String TEMPLATE
          Deprecated.  
private  TemplateProcessor templateProcessor
          Deprecated.  
private  String templateProcessorName
          Deprecated.  
private  HTTPState theState
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
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
 
Constructor Summary
SubTemplateService(Properties parameters, Locale locale, OutputStream os)
          Deprecated.  
 
Method Summary
 void addToResponseExceptions(Exception newException)
          Deprecated.  
 void addToResponseFooters(LocalizableMessage newFooter)
          Deprecated.  
 void addToResponseHeaders(LocalizableMessage newHeader)
          Deprecated.  
 void addToResponseMessages(LocalizableMessage newMessage)
          Deprecated.  
 String getContextAction()
          Deprecated.  
 String getContextClassName()
          Deprecated.  
 Object getContextObj()
          Deprecated.  
 Properties getContextProperties()
          Deprecated.  
 Properties getFormData()
          Deprecated.  
 HTMLTemplate getHtmlTemplate()
          Deprecated. Returns the HTMLTemplate that is the sub-Template to process

Supported API: false
 String getHtmlTemplateName()
          Deprecated.  
 Locale getLocale()
          Deprecated. Returns the current value of Locale.
 OutputStream getOs()
          Deprecated.  
 Properties getQueryData()
          Deprecated.  
 Vector getResponseExceptions()
          Deprecated.  
 Vector getResponseFooters()
          Deprecated.  
 Vector getResponseHeaders()
          Deprecated.  
 Vector getResponseMessages()
          Deprecated.  
 String getResponseString()
          Deprecated.  
 Properties getScriptProps()
          Deprecated. Gets the Property object that has the name/value pairs from the Windchill Script call used to invoke the sub-Template.
 HTTPState getState()
          Deprecated.  
 int getStatus()
          Deprecated.  
 TemplateProcessor getTemplateProcessor()
          Deprecated. Gets the TemplateProcessor implementation what will be used to process the sub-Template.
 String getTemplateProcessorName()
          Deprecated.  
private  void processTemplate()
          Deprecated. Processes the selected sub-Template using the selected TemplateProcessor.
 void processTemplate(HTTPState templateState)
          Deprecated.  
 void processTemplate(String action, Object contextObj)
          Deprecated.  
 void processTemplate(String action, String className)
          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 setHtmlTemplate(HTMLTemplate a_HtmlTemplate)
          Deprecated. Sets HTMLTemplate that is the sub-Template

Supported API: false
 void setHtmlTemplateName(String a_HtmlTemplateName)
          Deprecated.  
 void setLocale(Locale a_Locale)
          Deprecated. Sets the value of the Locale to be used to select the sub-Template

Supported API: false
 void setOs(OutputStream a_Os)
          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 setScriptProps(Properties a_ScriptProps)
          Deprecated. Sets the Property object that has the name/value pairs from the Windchill Script call used to invoke the sub-Template.
 void setState(HTTPState a_State)
          Deprecated.  
 void setStatus(int a_Status)
          Deprecated.  
 void setTemplateProcessor(TemplateProcessor a_TemplateProcessor)
          Deprecated. Sets TemplateProcessor implementation that will be used to process the sub-Template.
 void setTemplateProcessorName(String a_TemplateProcessorName)
          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. 

htmlTemplate

private HTMLTemplate htmlTemplate
Deprecated. 

locale

private Locale locale
Deprecated. 

os

private OutputStream os
Deprecated. 

scriptProps

private Properties scriptProps
Deprecated. 

templateProcessorName

private String templateProcessorName
Deprecated. 

htmlTemplateName

private String htmlTemplateName
Deprecated. 

PROCESSOR

public static final String PROCESSOR
Deprecated.  



Supported API: true

See Also:
Constant Field Values

TEMPLATE

public static final String TEMPLATE
Deprecated.  



Supported API: true

See Also:
Constant Field Values

templateProcessor

private TemplateProcessor templateProcessor
Deprecated. 

theState

private HTTPState theState
Deprecated. 

VERBOSE

private static boolean VERBOSE
Deprecated. 
Constructor Detail

SubTemplateService

public SubTemplateService(Properties parameters,
                          Locale locale,
                          OutputStream os)
Deprecated.  

Contructor that passes in the information from the Windchill script call so that the sub-Template can be processed.

Supported API: true

Parameters:
parameters -
locale -
os -
Method Detail

getHtmlTemplate

public HTMLTemplate getHtmlTemplate()
Deprecated. 
Returns the HTMLTemplate that is the sub-Template to process

Supported API: false

Returns:
wt.htmlutil.HTMLTemplate

setHtmlTemplate

public void setHtmlTemplate(HTMLTemplate a_HtmlTemplate)
Deprecated. 
Sets HTMLTemplate that is the sub-Template

Supported API: false

Parameters:
a_HtmlTemplate -

getLocale

public Locale getLocale()
Deprecated. 
Returns the current value of Locale. This it the Locale used to select the sub-Template

Supported API: false

Returns:
Locale

setLocale

public void setLocale(Locale a_Locale)
Deprecated. 
Sets the value of the Locale to be used to select the sub-Template

Supported API: false

Parameters:
a_Locale -

getOs

public OutputStream getOs()
Deprecated.  

Gets the value of the attribute: os.

Supported API: true

Returns:
OutputStream

setOs

public void setOs(OutputStream a_Os)
Deprecated.  

Sets the value of the attribute: os.

Supported API: true

Parameters:
a_Os -

getScriptProps

public Properties getScriptProps()
Deprecated. 
Gets the Property object that has the name/value pairs from the Windchill Script call used to invoke the sub-Template.

Supported API: false

Returns:
Properties

setScriptProps

public void setScriptProps(Properties a_ScriptProps)
Deprecated. 
Sets the Property object that has the name/value pairs from the Windchill Script call used to invoke the sub-Template.

Supported API: false

Parameters:
a_ScriptProps -

getTemplateProcessorName

public String getTemplateProcessorName()
Deprecated.  

Gets the value of the attribute: templateProcessorName.

Supported API: true

Returns:
String

setTemplateProcessorName

public void setTemplateProcessorName(String a_TemplateProcessorName)
Deprecated.  

Sets the value of the attribute: templateProcessorName.

Supported API: true

Parameters:
a_TemplateProcessorName -

getHtmlTemplateName

public String getHtmlTemplateName()
Deprecated.  

Gets the value of the attribute: htmlTemplateName.

Supported API: true

Returns:
String

setHtmlTemplateName

public void setHtmlTemplateName(String a_HtmlTemplateName)
Deprecated.  

Sets the value of the attribute: htmlTemplateName.

Supported API: true

Parameters:
a_HtmlTemplateName -

getTemplateProcessor

public TemplateProcessor getTemplateProcessor()
Deprecated. 
Gets the TemplateProcessor implementation what will be used to process the sub-Template.

Supported API: false

Returns:
TemplateProcessor

setTemplateProcessor

public void setTemplateProcessor(TemplateProcessor a_TemplateProcessor)
Deprecated. 
Sets TemplateProcessor implementation that will be used to process the sub-Template.

Supported API: false

Parameters:
a_TemplateProcessor -

processTemplate

public void processTemplate(String action,
                            String className)
Deprecated.  

Selects and processes the the sub-Template using the TemplateProcessor that are selected from an entry in a service.properties type properties file. The action and the className define the Context Action and the Context Class to be used by the ApplicationContextServices to find the desired entry for both the sub-Template and the TemplateProcessor.

Supported API: true

Parameters:
action -
className -

processTemplate

public void processTemplate(String action,
                            Object contextObj)
Deprecated.  

Selects and processes the the sub-Template using the TemplateProcessor that are selected from an entry in a service.properties type properties file. The action and the contextObj define the Context Action and the Context Class to be used by the ApplicationContextServices to find the desired entry for both the sub-Template and the TemplateProcessor.

Supported API: true

Parameters:
action -
contextObj -

processTemplate

public void processTemplate(HTTPState templateState)
Deprecated.  

Selects and processes the the sub-Template using the TemplateProcessor that are selected from an entry in a service.properties type properties file. The HTTPState object defines the Context Action and the Context Class to be used by the ApplicationContextServices to find the desired entry for both the sub-Template and the TemplateProcessor.

The advantage of this method is that more information can be passed into to TemplateProcessor for the sub-Template by using the HTTPState object.

Supported API: true

Parameters:
templateState -

getState

public HTTPState getState()
Deprecated.  

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

Supported API: true

Specified by:
getState in interface ProcessorService
Returns:
HTTPState

setState

public void setState(HTTPState a_State)
Deprecated.  

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

Supported API: true

Specified by:
setState in interface ProcessorService
Parameters:
a_State -

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 -

processTemplate

private void processTemplate()
Deprecated. 
Processes the selected sub-Template using the selected TemplateProcessor. The sub-Template and the TemplateProcessor selected based on the current State as passed or set by the other processTemplate methods.