com.ptc.windchill.cadx.caddoc
Class PVXTemplateProcessor

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

public class PVXTemplateProcessor
extends DefaultTemplateProcessor

Generates browser specific PVX html output when property page is run in wildfire (embedded browser in ProE) mode. The following arguments can be passed on the renderPVX to configure the generated PVX. These arguments have been added so the PVX can be customized solely thru the template file without modifiying this template processor class. The following parameters are supported: (Template Processor parameters are case sensitive so make sure to use correct case when specifying parameters] WIDTH HEIGHT showCopyright showToolbar showTitleBar Work stil to do: 1)Add additional arguments in generated code per Michael K. 2)Add check to only generated PVX if object is in active workspace - if this is necessary.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private  String activeWorkspaceName
           
private  boolean addPVXWindowsCodebase
           
private static String cadxpvxInstallerLocation
           
private static String CLASSNAME
           
private  String currentEndTag
           
private  String currentPVXWindowsInstaller
           
private  String currentStartTag
           
private static String disablePVX
           
private  boolean displayPVX
           
static long EXTERNALIZATION_VERSION_UID
           
private  String fromWS
           
private  String height
           
private  String IEClassId
           
private  String localCacheUGCFileName
           
private  String localCacheWTWSURI
           
private  String modelname
           
private  String modelnumber
           
private  boolean newlf
           
private  String oid
           
protected static long OLD_FORMAT_VERSION_UID
           
private static boolean placeholderdoc
           
private  String pvxdriverJarLocationOnUnix
           
private static String pvxdriverJarRelativeLocation
           
private static String pvxInstallerLocation
           
private static String PVXRESOURCE
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  String serverName
           
private  String serverURL
           
private  String showCopyright
           
private  String showTitleBar
           
private  String showToolbar
           
private  String userAgent
           
private static boolean VERBOSE
           
private  String version
           
private  String wclocation
           
private  String width
           
private  String workspaceNames
           
private  String wsNameFromURL
           
private static String wtpubProtocolString
           
private static String wtwsProtocolString
           
 
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.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
PVXTemplateProcessor()
           
 
Method Summary
private  boolean containsDocument(EPMWorkspace ws, EPMDocument doc)
           
private  void determineBrowserTags(Properties parameters, Locale locale, OutputStream os)
           
private  boolean determineControls(EPMDocument doc)
           
private  boolean determineControls(NewEPMDocument doc)
           
 void generatePVXToolTips(Properties parameters, Locale locale, OutputStream os)
           
 void generateUsePVXFlags(Properties parameters, Locale locale, OutputStream os)
           
private  String getAdapterMethod()
           
private  String getAnyEPMWorkspaceNameForCurrentUser()
           
private  String getAssociatedWorkspaceName(EPMDocument target)
           
private  boolean isLegalPVXUserAgent()
           
private  boolean isProECADDocument(EPMDocument doc)
           
private  String printIEInstallerLocation()
           
private  void processParameters(Properties parameters)
           
 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(PVXTemplateProcessor thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
private  void renderBlankImage(Properties parameters, Locale locale, OutputStream os)
           
 void renderPVX(Properties parameters, Locale locale, OutputStream os)
          

Supported API: false
private  void renderPVXHtml(Properties parameters, Locale locale, OutputStream os)
           
 void renderVisualData(Properties parameters, Locale locale, OutputStream os)
           
private  void resetDefaults()
           
private  void setLocalCacheWorkspace(EPMDocument currentDoc, String assocWS)
           
private  void setLocalCacheWTWSURI(EPMDocument currentDoc, String docLocation)
           
private  void setLocalCacheWTWSURI(NewEPMDocument currentDoc)
           
private  boolean usePVX()
           
static boolean usePVX(Object obj, HTTPRequest req)
           
private  boolean useSheetControls(String name)
           
 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, 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, 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
 
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

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

serverName

private String serverName

serverURL

private String serverURL

activeWorkspaceName

private String activeWorkspaceName

workspaceNames

private String workspaceNames

wsNameFromURL

private String wsNameFromURL

modelname

private String modelname

modelnumber

private String modelnumber

wclocation

private String wclocation

version

private String version

oid

private String oid

pvxdriverJarLocationOnUnix

private String pvxdriverJarLocationOnUnix

wtwsProtocolString

private static String wtwsProtocolString

wtpubProtocolString

private static String wtpubProtocolString

disablePVX

private static String disablePVX

localCacheUGCFileName

private String localCacheUGCFileName

localCacheWTWSURI

private String localCacheWTWSURI

width

private String width

height

private String height

showCopyright

private String showCopyright

showToolbar

private String showToolbar

showTitleBar

private String showTitleBar

fromWS

private String fromWS

userAgent

private String userAgent

currentStartTag

private String currentStartTag

currentPVXWindowsInstaller

private String currentPVXWindowsInstaller

currentEndTag

private String currentEndTag

IEClassId

private final String IEClassId
See Also:
Constant Field Values

newlf

private boolean newlf

displayPVX

private boolean displayPVX

addPVXWindowsCodebase

private boolean addPVXWindowsCodebase

PVXRESOURCE

private static final String PVXRESOURCE
See Also:
Constant Field Values

pvxInstallerLocation

private static String pvxInstallerLocation

cadxpvxInstallerLocation

private static String cadxpvxInstallerLocation

pvxdriverJarRelativeLocation

private static String pvxdriverJarRelativeLocation

placeholderdoc

private static boolean placeholderdoc

VERBOSE

private static boolean VERBOSE
Constructor Detail

PVXTemplateProcessor

public PVXTemplateProcessor()
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(PVXTemplateProcessor 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

renderPVX

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


Supported API: false

Parameters:
parameters -
locale -
os -

renderBlankImage

private void renderBlankImage(Properties parameters,
                              Locale locale,
                              OutputStream os)
Parameters:
parameters -
locale -
os -

renderPVXHtml

private void renderPVXHtml(Properties parameters,
                           Locale locale,
                           OutputStream os)
Parameters:
parameters -
locale -
os -

determineBrowserTags

private void determineBrowserTags(Properties parameters,
                                  Locale locale,
                                  OutputStream os)
Parameters:
parameters -
locale -
os -

isLegalPVXUserAgent

private boolean isLegalPVXUserAgent()

processParameters

private void processParameters(Properties parameters)

resetDefaults

private void resetDefaults()

isProECADDocument

private boolean isProECADDocument(EPMDocument doc)

generatePVXToolTips

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

generateUsePVXFlags

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

getAdapterMethod

private String getAdapterMethod()

containsDocument

private boolean containsDocument(EPMWorkspace ws,
                                 EPMDocument doc)
                          throws WTException
Throws:
WTException

getAssociatedWorkspaceName

private String getAssociatedWorkspaceName(EPMDocument target)
                                   throws WTException
Throws:
WTException

setLocalCacheWorkspace

private void setLocalCacheWorkspace(EPMDocument currentDoc,
                                    String assocWS)
                             throws WTException
Throws:
WTException

setLocalCacheWTWSURI

private void setLocalCacheWTWSURI(NewEPMDocument currentDoc)

setLocalCacheWTWSURI

private void setLocalCacheWTWSURI(EPMDocument currentDoc,
                                  String docLocation)
                           throws WTException
Throws:
WTException

determineControls

private boolean determineControls(EPMDocument doc)

determineControls

private boolean determineControls(NewEPMDocument doc)

useSheetControls

private boolean useSheetControls(String name)

getAnyEPMWorkspaceNameForCurrentUser

private String getAnyEPMWorkspaceNameForCurrentUser()

printIEInstallerLocation

private String printIEInstallerLocation()

renderVisualData

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

usePVX

private boolean usePVX()

usePVX

public static boolean usePVX(Object obj,
                             HTTPRequest req)