wt.workflow.engine
Class WfTemplateProcessor

java.lang.Object
  extended bywt.enterprise.BasicTemplateProcessor
      extended bywt.workflow.engine.WfTemplateProcessor
All Implemented Interfaces:
ContextHolder, ContextTranslator, Evolvable, Externalizable, Serializable, TemplateProcessor

public class WfTemplateProcessor
extends BasicTemplateProcessor
implements Externalizable

WfTemplateProcessor provides support for the generation of execution time notification. These notification are the following:



Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String ABORT_NOTIFICATION
           
private static String APPROACHING_DEADLINE_NOTIFICATION
           
private static String CLASSNAME
           
private static String COMPLETE_NOTIFICATION
           
private static String DEFAULT_NOTIFICATION
           
private  String eventMessage
           
private  ObjectIdentifier eventSourceId
           
private  ObjectIdentifier eventSourceParentId
           
private  Timestamp eventTime
           
private static String EXCEPTION_NOTIFICATION
           
static long EXTERNALIZATION_VERSION_UID
           
static long EXTERNALIZATION_VERSION_UID_62602
           
private static String NOTIFICATION_TYPE
           
protected static long OLD_FORMAT_VERSION_UID
           
private static String OVERDUE_NOTIFICATION
           
private  WfState previousState
           
private  boolean projectLinkStyle
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String titleKey
           
private  ObjectIdentifier workItemId
           
 
Fields inherited from class wt.enterprise.BasicTemplateProcessor
ACTION, ADD_HELP_ICON, ALL_CABINETS, BLANK_SPACE, BREAK_SEPARATOR, BREAK_TAG, CLASS, 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, LINE_FEED_DELIMITER, linkPrefix, LOCAL_SEARCH, OID, 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.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
WfTemplateProcessor()
           
 
Method Summary
 void getDeadline(Properties properties, Locale locale, OutputStream os)
          Inserts source object deadline in notification body.
 String getEventMessage()
          Gets the value of the attribute: eventMessage; Event's associated message (e.g.
 ObjectIdentifier getEventSourceId()
          Gets the value of the attribute: eventSourceId; Object identifier of the execution object that generated the event.
 ObjectIdentifier getEventSourceParentId()
          Gets the value of the attribute: eventSourceParentId; Object identifier of the parent of execution object that generated the event.
 Timestamp getEventTime()
          Gets the value of the attribute: eventTime; Time event occurred.
 void getMessage(Properties properties, Locale locale, OutputStream os)
          Inserts event message in notification body.
 void getOverdueTaskRow(Properties properties, Locale locale, OutputStream os)
          It the notification is generated for an overdue activity, a row is inserted in the notification with a link to the overdue task.
 void getOverdueTaskRowNoLink(Properties properties, Locale locale, OutputStream os)
           
 void getOverdueTaskURL(Properties properties, Locale locale, OutputStream os)
          Writes the URL to the overdue or approaching deadline task.
 void getOwnerRole(Properties properties, Locale locale, OutputStream os)
           
 void getParentProcess(Properties properties, Locale locale, OutputStream os)
          Inserts source object parent process name in notification body.
 void getParentProcessRow(Properties properties, Locale locale, OutputStream os)
          This method is intended to be used in notifications which are shared by ProjectLink and Windchill.
 void getParentProcessRowNoLink(Properties properties, Locale locale, OutputStream os)
           
 void getPJLNotificationTitleRow(Properties properties, Locale locale, OutputStream os)
          This method is intended to be used in notifications which are shared by ProjectLink and Windchill.
 WfState getPreviousState()
          Gets the value of the attribute: previousState; State of the obejct prior to the event.
private  WfProcess getProcess()
           
 void getProcessManagerURL(Properties properties, Locale locale, OutputStream os)
          Returns the URL to the process manager.
 void getProcessManagerURLPlain(Properties properties, Locale locale, OutputStream os)
          Returns the URL to the process manager without HTML tags.
 void getState(Properties properties, Locale locale, OutputStream os)
          Inserts source object previous state in notification body.
 void getTaskOwnerRow(Properties properties, Locale locale, OutputStream os)
           
 void getTime(Properties properties, Locale locale, OutputStream os)
          Inserts event time in notification body.
 String getTitleKey()
          Gets the value of the attribute: titleKey; Key value to localize a ProjectLink style title bar in the body of the notification

Supported API: false
 ObjectIdentifier getWorkItemId()
          Gets the value of the attribute: workItemId; Object identifier of the overdue or approaching deadline workitem.
 void handleRequest(HTTPRequest req, HTTPResponse resp)
          This method required to implement TemplateProcessor interface.
 boolean isProjectLinkStyle()
          Gets the value of the attribute: projectLinkStyle; Key to indicate if this should be a ProjectLink style notification

Supported API: false
 void projectLinkAttributes(Properties properties, Locale locale, OutputStream os)
          If this is a notification from a ProjectLink object, print the ProjectLink attributesInserts event message in notification body.
 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(WfTemplateProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setEventMessage(String a_EventMessage)
          Sets the value of the attribute: eventMessage; Event's associated message (e.g.
 void setEventSourceId(ObjectIdentifier a_EventSourceId)
          Sets the value of the attribute: eventSourceId; Object identifier of the execution object that generated the event.
 void setEventSourceParentId(ObjectIdentifier a_EventSourceParentId)
          Sets the value of the attribute: eventSourceParentId; Object identifier of the parent of execution object that generated the event.
 void setEventTime(Timestamp a_EventTime)
          Sets the value of the attribute: eventTime; Time event occurred.
 void setPreviousState(WfState a_PreviousState)
          Sets the value of the attribute: previousState; State of the obejct prior to the event.
 void setProjectLinkStyle(boolean a_ProjectLinkStyle)
          Sets the value of the attribute: projectLinkStyle; Key to indicate if this should be a ProjectLink style notification

Supported API: false
 void setTitleKey(String a_TitleKey)
          Sets the value of the attribute: titleKey; Key value to localize a ProjectLink style title bar in the body of the notification

Supported API: false
 void setWorkItemId(ObjectIdentifier a_WorkItemId)
          Sets the value of the attribute: workItemId; Object identifier of the overdue or approaching deadline workitem.
private  String stripHtmlFormat(String urlRef)
           
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
Methods inherited from class wt.enterprise.BasicTemplateProcessor
AccessOK, addHiddenProperty, 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, getState, 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, hiddenContextString, 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, setState, setStatus, showResponseExceptions, showResponseFooters, showResponseHeaders, showResponseMessage, showResponseMessages, showVersions, sortQueryResult, splitStringIntoTokens, tableService, translateToHtml, useProcessorService, visualizationIsEnabled, writeHiddenContext, writeQueryStringContext
 
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

eventMessage

private String eventMessage

eventTime

private Timestamp eventTime

previousState

private WfState previousState

eventSourceId

private ObjectIdentifier eventSourceId

eventSourceParentId

private ObjectIdentifier eventSourceParentId

titleKey

private String titleKey

projectLinkStyle

private boolean projectLinkStyle

workItemId

private ObjectIdentifier workItemId

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

EXTERNALIZATION_VERSION_UID_62602

public static final long EXTERNALIZATION_VERSION_UID_62602
See Also:
Constant Field Values

NOTIFICATION_TYPE

private static final String NOTIFICATION_TYPE
See Also:
Constant Field Values

ABORT_NOTIFICATION

private static final String ABORT_NOTIFICATION
See Also:
Constant Field Values

APPROACHING_DEADLINE_NOTIFICATION

private static final String APPROACHING_DEADLINE_NOTIFICATION
See Also:
Constant Field Values

COMPLETE_NOTIFICATION

private static final String COMPLETE_NOTIFICATION
See Also:
Constant Field Values

EXCEPTION_NOTIFICATION

private static final String EXCEPTION_NOTIFICATION
See Also:
Constant Field Values

OVERDUE_NOTIFICATION

private static final String OVERDUE_NOTIFICATION
See Also:
Constant Field Values

DEFAULT_NOTIFICATION

private static final String DEFAULT_NOTIFICATION
See Also:
Constant Field Values
Constructor Detail

WfTemplateProcessor

public WfTemplateProcessor()
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 BasicTemplateProcessor
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 BasicTemplateProcessor
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WfTemplateProcessor 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

getEventMessage

public String getEventMessage()
Gets the value of the attribute: eventMessage; Event's associated message (e.g. error message in exception events).

Supported API: false

Returns:
String

setEventMessage

public void setEventMessage(String a_EventMessage)
Sets the value of the attribute: eventMessage; Event's associated message (e.g. error message in exception events).

Supported API: false

Parameters:
a_EventMessage -

getEventTime

public Timestamp getEventTime()
Gets the value of the attribute: eventTime; Time event occurred.

Supported API: false

Returns:
Timestamp

setEventTime

public void setEventTime(Timestamp a_EventTime)
Sets the value of the attribute: eventTime; Time event occurred.

Supported API: false

Parameters:
a_EventTime -

getPreviousState

public WfState getPreviousState()
Gets the value of the attribute: previousState; State of the obejct prior to the event.

Supported API: false

Returns:
WfState

setPreviousState

public void setPreviousState(WfState a_PreviousState)
Sets the value of the attribute: previousState; State of the obejct prior to the event.

Supported API: false

Parameters:
a_PreviousState -

getEventSourceId

public ObjectIdentifier getEventSourceId()
Gets the value of the attribute: eventSourceId; Object identifier of the execution object that generated the event.

Supported API: false

Returns:
ObjectIdentifier

setEventSourceId

public void setEventSourceId(ObjectIdentifier a_EventSourceId)
Sets the value of the attribute: eventSourceId; Object identifier of the execution object that generated the event.

Supported API: false

Parameters:
a_EventSourceId -

getEventSourceParentId

public ObjectIdentifier getEventSourceParentId()
Gets the value of the attribute: eventSourceParentId; Object identifier of the parent of execution object that generated the event. Null if event source has no parent.

Supported API: false

Returns:
ObjectIdentifier

setEventSourceParentId

public void setEventSourceParentId(ObjectIdentifier a_EventSourceParentId)
Sets the value of the attribute: eventSourceParentId; Object identifier of the parent of execution object that generated the event. Null if event source has no parent.

Supported API: false

Parameters:
a_EventSourceParentId -

getTitleKey

public String getTitleKey()
Gets the value of the attribute: titleKey; Key value to localize a ProjectLink style title bar in the body of the notification

Supported API: false

Returns:
String

setTitleKey

public void setTitleKey(String a_TitleKey)
Sets the value of the attribute: titleKey; Key value to localize a ProjectLink style title bar in the body of the notification

Supported API: false

Parameters:
a_TitleKey -

isProjectLinkStyle

public boolean isProjectLinkStyle()
Gets the value of the attribute: projectLinkStyle; Key to indicate if this should be a ProjectLink style notification

Supported API: false

Returns:
boolean

setProjectLinkStyle

public void setProjectLinkStyle(boolean a_ProjectLinkStyle)
Sets the value of the attribute: projectLinkStyle; Key to indicate if this should be a ProjectLink style notification

Supported API: false

Parameters:
a_ProjectLinkStyle -

getWorkItemId

public ObjectIdentifier getWorkItemId()
Gets the value of the attribute: workItemId; Object identifier of the overdue or approaching deadline workitem.

Supported API: false

Returns:
ObjectIdentifier

setWorkItemId

public void setWorkItemId(ObjectIdentifier a_WorkItemId)
Sets the value of the attribute: workItemId; Object identifier of the overdue or approaching deadline workitem.

Supported API: false

Parameters:
a_WorkItemId -

handleRequest

public void handleRequest(HTTPRequest req,
                          HTTPResponse resp)
This method required to implement TemplateProcessor interface.

Supported API: false

Specified by:
handleRequest in interface TemplateProcessor
Parameters:
req -
resp -

getMessage

public void getMessage(Properties properties,
                       Locale locale,
                       OutputStream os)
Inserts event message in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getTime

public void getTime(Properties properties,
                    Locale locale,
                    OutputStream os)
Inserts event time in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getState

public void getState(Properties properties,
                     Locale locale,
                     OutputStream os)
Inserts source object previous state in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getParentProcess

public void getParentProcess(Properties properties,
                             Locale locale,
                             OutputStream os)
Inserts source object parent process name in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getDeadline

public void getDeadline(Properties properties,
                        Locale locale,
                        OutputStream os)
Inserts source object deadline in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getProcessManagerURL

public void getProcessManagerURL(Properties properties,
                                 Locale locale,
                                 OutputStream os)
Returns the URL to the process manager.

Supported API: false

Parameters:
properties -
locale -
os -

getProcessManagerURLPlain

public void getProcessManagerURLPlain(Properties properties,
                                      Locale locale,
                                      OutputStream os)
Returns the URL to the process manager without HTML tags.

Supported API: false

Parameters:
properties -
locale -
os -

getParentProcessRow

public void getParentProcessRow(Properties properties,
                                Locale locale,
                                OutputStream os)
This method is intended to be used in notifications which are shared by ProjectLink and Windchill. Used from a ProjectLink object, nothing will be written to the notification. Otherwise it inserts HTML to construct a row in an existing table with two cells. The first is a localized name for "process" the second is the source object's parent process name.

Supported API: false

Parameters:
properties -
locale -
os -

getPJLNotificationTitleRow

public void getPJLNotificationTitleRow(Properties properties,
                                       Locale locale,
                                       OutputStream os)
This method is intended to be used in notifications which are shared by ProjectLink and Windchill. Used from a ProjectLink object,a formatted tabel row is constructed to display a localized notification title. If the context is not a ProjectLink object, nothing is done.

Supported API: false

Parameters:
properties -
locale -
os -

getOverdueTaskRow

public void getOverdueTaskRow(Properties properties,
                              Locale locale,
                              OutputStream os)
It the notification is generated for an overdue activity, a row is inserted in the notification with a link to the overdue task.

Supported API: false

Parameters:
properties -
locale -
os -

getOverdueTaskURL

public void getOverdueTaskURL(Properties properties,
                              Locale locale,
                              OutputStream os)
Writes the URL to the overdue or approaching deadline task.

Supported API: false

Parameters:
properties -
locale -
os -

getProcess

private WfProcess getProcess()

stripHtmlFormat

private String stripHtmlFormat(String urlRef)

projectLinkAttributes

public void projectLinkAttributes(Properties properties,
                                  Locale locale,
                                  OutputStream os)
If this is a notification from a ProjectLink object, print the ProjectLink attributesInserts event message in notification body.

Supported API: false

Parameters:
properties -
locale -
os -

getTaskOwnerRow

public void getTaskOwnerRow(Properties properties,
                            Locale locale,
                            OutputStream os)

getOverdueTaskRowNoLink

public void getOverdueTaskRowNoLink(Properties properties,
                                    Locale locale,
                                    OutputStream os)

getOwnerRole

public void getOwnerRole(Properties properties,
                         Locale locale,
                         OutputStream os)

getParentProcessRowNoLink

public void getParentProcessRowNoLink(Properties properties,
                                      Locale locale,
                                      OutputStream os)