|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.enterprise.BasicTemplateProcessor
wt.templateutil.processor.DefaultTemplateProcessor
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 represents the base Template Processor that should be subclassed for the Template Processors that will be used to generate an HTML page that purely present information, i.e., there is not an HTML Form in the page. By subclassing this Template Processor, all of set up to process an HTML template is done for you. One of the most important default services is finding and initializing the HTML Template. The DefaultHTMLTemplateFactory is used behind the scenes to do this based on the current settings in the the HTTPState object.
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
Field Summary | |
protected static String |
ACTION
Deprecated. |
protected static String |
CLASS
Deprecated. |
private static String |
CLASSNAME
Deprecated. |
protected static String |
CODEBASE
Deprecated. |
static long |
EXTERNALIZATION_VERSION_UID
Deprecated. |
private static String |
FEEDBACK_COOKIE_EXCEPTIONS_KEY
Deprecated. |
private static String |
FEEDBACK_COOKIE_MESSAGES_KEY
Deprecated. |
private static String |
FEEDBACK_COOKIE_NAME
Deprecated. |
private AbstractHTMLTemplateFactory |
htmlTemplateFactory
Deprecated. |
static String |
LINE_FEED_DELIMITER
Deprecated. |
static String |
MESSAGE_SEPARATOR
Deprecated. |
protected static String |
OID
Deprecated. |
protected static long |
OLD_FORMAT_VERSION_UID
Deprecated. |
private int |
PAGE_EXPIRATION
Deprecated. |
private String |
pageExpirationResource
Deprecated. |
private static String |
RESOURCE
Deprecated. |
(package private) static long |
serialVersionUID
Deprecated. |
protected static boolean |
VERBOSE
Deprecated. |
Fields inherited from interface wt.templateutil.processor.ContextTranslator |
CONTEXT_LIST_IN, CONTEXT_LIST_OUT |
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 | |
DefaultTemplateProcessor()
Deprecated. |
Method Summary | |
void |
addHiddenProperty(Properties parameters,
Locale locale,
OutputStream os)
Deprecated. Windchill Script method used to present an HTML Form element that is of type=hidden using the name="name" and the value="value". |
static void |
addToFeedbackCookie(Exception newException,
HTTPState state)
Deprecated. Adds an exception to the session cookie storing feedback from server to client |
static void |
addToFeedbackCookie(LocalizableMessage newMessage,
HTTPState state)
Deprecated. Adds a message to the session cookie storing feedback from server to client |
String |
getContextPropertyValue(String token)
Deprecated. |
void |
getCurrentUrl(Properties parameters,
Locale locale,
OutputStream os)
Deprecated. Prints the url of the current page |
static Vector |
getFeedbackCookieExceptions(boolean deleteFromCookie,
HTTPState state)
Deprecated. Gets exceptions stored in the session cookie holding feedback from server to client |
static Vector |
getFeedbackCookieMessages(boolean deleteFromCookie,
HTTPState state)
Deprecated. Gets messages stored in the session cookie holding feedback from server to client |
AbstractHTMLTemplateFactory |
getHtmlTemplateFactory()
Deprecated. Gets the object for the association that plays role: htmlTemplateFactory. |
void |
getMessageSeparator(Properties params,
Locale locale,
OutputStream os)
Deprecated. Method to provide DefaultTemplateProcessor.MESSAGE_SEPARATOR string to page, typically for use as a variable within a Javascript method for concatenating or parsing. |
int |
getPAGE_EXPIRATION()
Deprecated. |
String |
getPageExpirationResource()
Deprecated. |
HTMLTemplate |
getTemplate(HTTPRequest req)
Deprecated. |
void |
getTemplateDisplay(Properties properties,
Locale locale,
OutputStream os)
Deprecated. Method to display the template property of an object along with its availability for use. |
void |
handleRequest(HTTPRequest req,
HTTPResponse resp)
Deprecated. Does the processing of the HTML Template. |
String |
hiddenContextString(String name,
String value)
Deprecated. Generates a String for an HTML Form element that is of type=hidden using the name="name" and the value="value" |
void |
readExternal(ObjectInput input)
Deprecated. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Deprecated. Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(DefaultTemplateProcessor thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Deprecated. |
void |
setContextPropertyValue(String propertyName,
String propertyValue)
Deprecated. |
void |
setHtmlTemplateFactory(AbstractHTMLTemplateFactory a_HtmlTemplateFactory)
Deprecated. Sets the object for the association that plays role: htmlTemplateFactory. |
static void |
setMethodContextProperty(Properties parameters,
Locale locale,
OutputStream os)
Deprecated. This method will set a property(s) within the Method Context as defined in the method call. |
void |
setNameProcessor(TemplateNameProcessor a_NameProcessor)
Deprecated. |
void |
setPAGE_EXPIRATION(int a_PAGE_EXPIRATION)
Deprecated. |
void |
setPageExpirationResource(String a_PageExpirationResource)
Deprecated. |
void |
writeExternal(ObjectOutput output)
Deprecated. |
void |
writeHiddenContext(Properties parameters,
Locale locale,
OutputStream os)
Deprecated. Windchill Script method used to generate a sequence of HTML hidden input fields that pass the current context of the page, namely the contextAction and either the contextObj(if it is set) or the contextClass(if it is set). |
String |
writeQueryStringContext()
Deprecated. Windchill Script method used to generate part of a query string that passes the current context of the page, namely the contextAction and either the contextObj(if it is set) or the contextClass(if it is set). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String pageExpirationResource
private int PAGE_EXPIRATION
private AbstractHTMLTemplateFactory htmlTemplateFactory
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
protected static boolean VERBOSE
protected static String CODEBASE
protected static String ACTION
protected static String CLASS
protected static String OID
private static final String FEEDBACK_COOKIE_NAME
private static final String FEEDBACK_COOKIE_MESSAGES_KEY
private static final String FEEDBACK_COOKIE_EXCEPTIONS_KEY
public static final String MESSAGE_SEPARATOR
public static final String LINE_FEED_DELIMITER
Constructor Detail |
public DefaultTemplateProcessor()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class BasicTemplateProcessor
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class BasicTemplateProcessor
input
-
IOException
ClassNotFoundException
protected boolean readVersion(DefaultTemplateProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public String getPageExpirationResource()
public void setPageExpirationResource(String a_PageExpirationResource)
a_PageExpirationResource
- public int getPAGE_EXPIRATION()
public void setPAGE_EXPIRATION(int a_PAGE_EXPIRATION)
a_PAGE_EXPIRATION
- public AbstractHTMLTemplateFactory getHtmlTemplateFactory() throws WTException
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
WTException
public void setHtmlTemplateFactory(AbstractHTMLTemplateFactory a_HtmlTemplateFactory)
Sets the current implementation of an AbstractHTMLTemplateFactory to
be used to retrieve an HTML Template to be processed.
Supported API: false
a_HtmlTemplateFactory
- public HTMLTemplate getTemplate(HTTPRequest req) throws WTException
The current "state" and locale is used to find the correct HTML
template.
Supported API: true
req
-
WTException
public void setNameProcessor(TemplateNameProcessor a_NameProcessor) throws WTException
a_NameProcessor
-
WTException
public void setContextPropertyValue(String propertyName, String propertyValue)
propertyName
- propertyValue
- public String getContextPropertyValue(String token)
token
-
public void handleRequest(HTTPRequest req, HTTPResponse resp) throws WTException
req
- resp
-
WTException
public void writeHiddenContext(Properties parameters, Locale locale, OutputStream os)
writeHiddenContext
in interface ContextTranslator
writeHiddenContext
in class BasicTemplateProcessor
parameters
- locale
- os
- public String writeQueryStringContext()
writeQueryStringContext
in interface ContextTranslator
writeQueryStringContext
in class BasicTemplateProcessor
public String hiddenContextString(String name, String value)
hiddenContextString
in class BasicTemplateProcessor
name
- The name value for the HTML input fieldvalue
- The value value for the HMTL input field
public void addHiddenProperty(Properties parameters, Locale locale, OutputStream os) throws WTException
addHiddenProperty
in class BasicTemplateProcessor
parameters
- locale
- os
-
WTException
- Description of the Exceptionpublic void getCurrentUrl(Properties parameters, Locale locale, OutputStream os)
public static void setMethodContextProperty(Properties parameters, Locale locale, OutputStream os)
<script language="Windchill">setMethodContextProperty key1=value1 key2="value 2 with space"
</script>
parameters
- List of properties to add to the Method Contextlocale
- The locale to useos
- OutputStream for writing (if applicable)public static void addToFeedbackCookie(Exception newException, HTTPState state)
newException
- exception to be storedstate
- state object of template processor or other callerpublic static void addToFeedbackCookie(LocalizableMessage newMessage, HTTPState state)
newMessage
- message to be storedstate
- state object of template processor or other callerpublic static Vector getFeedbackCookieExceptions(boolean deleteFromCookie, HTTPState state)
deleteFromCookie
- true if exceptions should be deleted from cookie after retrievalstate
- state object of template processor or other caller
public static Vector getFeedbackCookieMessages(boolean deleteFromCookie, HTTPState state)
deleteFromCookie
- true if exceptions should be deleted from cookie after retrievalstate
- state object of template processor or other caller
public void getTemplateDisplay(Properties properties, Locale locale, OutputStream os) throws WTException
locale
- os
-
WTException
public void getMessageSeparator(Properties params, Locale locale, OutputStream os)
locale
- os
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |