com.ptc.windchill.enterprise.doc.server
Class WTDocumentTemplateDelegate

java.lang.Object
  extended bycom.ptc.windchill.enterprise.doc.server.WTDocumentTemplateDelegate
All Implemented Interfaces:
TemplateObjectDelegate
Direct Known Subclasses:
WTDocumentTemplateProjectDelegate

public class WTDocumentTemplateDelegate
extends Object
implements TemplateObjectDelegate

Document template processing specific to Windchill PDM or common to all.

Supported API: false

Extendable: false


Field Summary
private static String CHECKIN_TEMPLATE
          Deprecated.  
private static String CLASSNAME
          Deprecated.  
private static String CREATE_FROM_TEMPLATE
          Deprecated.  
private static String CREATE_TEMPLATE
          Deprecated.  
private static String DISPLAY_TEMPLATE
          Deprecated.  
private static String DOC_TYPES
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private static boolean SHOWORG
          Deprecated.  
private static String UPDATE_TEMPLATE
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
Constructor Summary
WTDocumentTemplateDelegate()
          Deprecated.  
 
Method Summary
 Templateable createFromTemplate(Templateable objTemplate, HashMap nameValueData, Locale locale, String applicationName)
          Deprecated.  
 Templateable createTemplate(TypeIdentifier objType, HashMap nameValueData, Locale locale)
          Deprecated.  
protected  HashMap getCheckinDocumentAttributes(String[] solutionList, Persistable object, HashMap hashMap, Locale locale)
          Deprecated.  
 HashMap getCheckinTemplateAttributes(Templateable object, HashMap hashMap, Locale locale)
          Deprecated.  
protected  HashMap getCreateFromTemplateAttributes(String[] solutionList, WTContainer context, Templateable template, HashMap hashMap, boolean autoNumber, Locale locale)
          Deprecated.  
 HashMap getCreateFromTemplateAttributes(WTContainer context, Templateable objTemplate, HashMap hashMap, Locale locale)
          Deprecated.  
protected  HashMap getCreateTemplateAttributes(String[] solutionList, WTContainer context, TypeIdentifier objType, HashMap hashMap, boolean autoNumber, Locale locale)
          Deprecated.  
 HashMap getCreateTemplateAttributes(WTContainer context, TypeIdentifier objType, HashMap hashMap, Locale locale)
          Deprecated.  
protected  HashMap getDetailsDocumentAttributes(String[] solutionList, Persistable object, HashMap hashMap, ClientConfiguration clientInfo, Locale locale)
          Deprecated.  
 HashMap getDetailsTemplateAttributes(Templateable object, HashMap hashMap, ClientConfiguration clientInfo, Locale locale)
          Deprecated.  
private  String[] getPDMSpecificAttributes(String operation)
          Deprecated.  
 Persistable[] getTemplates(Class objClass, String context, Locale locale)
          Deprecated.  
 TypeIdentifier[] getTemplateTypes(Class objClass, String context, Locale locale)
          Deprecated.  
private  TypeInstanceIdentifier getTypeInstanceIdentifier(HashMap hashMap)
          Deprecated.  
protected  WTDocument getUnpersistedDocumentFromTemplate(WTDocument template, HashMap nameValueData, String solution, Locale locale)
          Deprecated.  
protected  WTDocument getUnpersistedTemplate(HashMap nameValueData, TypeIdentifier objType, String solution, Locale locale)
          Deprecated.  
protected  HashMap getUpdateDocumentAttributes(String[] solutionList, Persistable object, HashMap hashMap, Locale locale)
          Deprecated.  
 HashMap getUpdateTemplateAttributes(Templateable object, HashMap hashMap, Locale locale)
          Deprecated.  
protected  WTDocument persistDocumentFromTemplate(WTDocument template, WTDocument document, HashMap nameValueData, HashMap postCreateInfo, String solution, Locale locale)
          Deprecated.  
protected  WTDocument persistDocumentTemplate(WTDocument document, HashMap postCreateInfo, String solution, Locale locale)
          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. 

CREATE_FROM_TEMPLATE

private static final String CREATE_FROM_TEMPLATE
Deprecated. 
See Also:
Constant Field Values

CREATE_TEMPLATE

private static final String CREATE_TEMPLATE
Deprecated. 
See Also:
Constant Field Values

UPDATE_TEMPLATE

private static final String UPDATE_TEMPLATE
Deprecated. 
See Also:
Constant Field Values

DISPLAY_TEMPLATE

private static final String DISPLAY_TEMPLATE
Deprecated. 
See Also:
Constant Field Values

CHECKIN_TEMPLATE

private static final String CHECKIN_TEMPLATE
Deprecated. 
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE
Deprecated. 

SHOWORG

private static final boolean SHOWORG
Deprecated. 

DOC_TYPES

private static final String DOC_TYPES
Deprecated. 
Constructor Detail

WTDocumentTemplateDelegate

public WTDocumentTemplateDelegate()
Deprecated. 
Method Detail

createFromTemplate

public Templateable createFromTemplate(Templateable objTemplate,
                                       HashMap nameValueData,
                                       Locale locale,
                                       String applicationName)
                                throws WTException
Deprecated.  

Create an object from a template object and persist it. Uses the copy or save as functionality to execute the copy and then uses the download to download the template content from the original object if it is a FormatContentHolder.

Supported API: false

Specified by:
createFromTemplate in interface TemplateObjectDelegate
Parameters:
objTemplate - The template to create the object from.
nameValueData - Name value pairs from the UI.
locale - The locale of the client, used to return some of the strings in the locale of the client.
applicationName - Name of application to branch on to the different delegates for the checkout of the document. This is not used to branch on for any of the template objects.
Returns:
Templateable
Throws:
WTException

createTemplate

public Templateable createTemplate(TypeIdentifier objType,
                                   HashMap nameValueData,
                                   Locale locale)
                            throws WTException
Deprecated.  

Create an object that will be used as a template object and persist it. This new object will be stored in a cabinet based on the context that this operation is started in. A file should be uploaded into this object to form the template content after this api returns the object if it is a FormatContentHolder.

Supported API: false

Specified by:
createTemplate in interface TemplateObjectDelegate
Parameters:
objType - Soft type to use for the new template.
nameValueData - Name value pairs of data from the UI.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Templateable
Throws:
WTException

getTemplates

public Persistable[] getTemplates(Class objClass,
                                  String context,
                                  Locale locale)
                           throws WTException
Deprecated.  

Return a vector to represent the template list.

Supported API: false

Specified by:
getTemplates in interface TemplateObjectDelegate
Parameters:
objClass - The class of the object that the template list is requested for.
context - The product or repository that this is requested from.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Persistable[]
Throws:
WTException

getTemplateTypes

public TypeIdentifier[] getTemplateTypes(Class objClass,
                                         String context,
                                         Locale locale)
                                  throws WTException
Deprecated.  

Return an array of the types of document that a template can be created with. For create template.

Supported API: false

Specified by:
getTemplateTypes in interface TemplateObjectDelegate
Parameters:
objClass - The class of the object that the template list is requested for.
context - The product or repository that this is requested from.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
TypeIdentifier[]
Throws:
WTException

getCreateTemplateAttributes

public HashMap getCreateTemplateAttributes(WTContainer context,
                                           TypeIdentifier objType,
                                           HashMap hashMap,
                                           Locale locale)
                                    throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for a create.

Supported API: false

Specified by:
getCreateTemplateAttributes in interface TemplateObjectDelegate
Parameters:
context - Container to create the document in.
objType - Soft type to use for the new document.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getCreateFromTemplateAttributes

public HashMap getCreateFromTemplateAttributes(WTContainer context,
                                               Templateable objTemplate,
                                               HashMap hashMap,
                                               Locale locale)
                                        throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for a create.

Supported API: false

Specified by:
getCreateFromTemplateAttributes in interface TemplateObjectDelegate
Parameters:
context - Container to create the document in.
objTemplate - The template to create the object from.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getUpdateTemplateAttributes

public HashMap getUpdateTemplateAttributes(Templateable object,
                                           HashMap hashMap,
                                           Locale locale)
                                    throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for an update document template.

Supported API: false

Specified by:
getUpdateTemplateAttributes in interface TemplateObjectDelegate
Parameters:
object - The template to be updated.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getDetailsTemplateAttributes

public HashMap getDetailsTemplateAttributes(Templateable object,
                                            HashMap hashMap,
                                            ClientConfiguration clientInfo,
                                            Locale locale)
                                     throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for the details page of a document template.

Supported API: false

Specified by:
getDetailsTemplateAttributes in interface TemplateObjectDelegate
Parameters:
object - The template to be displayed.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
clientInfo - Information from the client application.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getCheckinTemplateAttributes

public HashMap getCheckinTemplateAttributes(Templateable object,
                                            HashMap hashMap,
                                            Locale locale)
                                     throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for a checkin document template.

Supported API: false

Specified by:
getCheckinTemplateAttributes in interface TemplateObjectDelegate
Parameters:
object - The template to be checked in.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getUnpersistedDocumentFromTemplate

protected WTDocument getUnpersistedDocumentFromTemplate(WTDocument template,
                                                        HashMap nameValueData,
                                                        String solution,
                                                        Locale locale)
                                                 throws WTException
Deprecated.  

Do the common pre-persistance activities for create from template across all solutions.

Supported API: false

Parameters:
template - The template to create the new document from.
nameValueData - The input from the UI.
solution - The solution key for the template processing.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
document The new unpersisted document.
Throws:
WTException

persistDocumentFromTemplate

protected WTDocument persistDocumentFromTemplate(WTDocument template,
                                                 WTDocument document,
                                                 HashMap nameValueData,
                                                 HashMap postCreateInfo,
                                                 String solution,
                                                 Locale locale)
                                          throws WTException
Deprecated.  

Do the common persistance activities for create from template across all solutions.

Supported API: false

Parameters:
template - The template to create the new document from.
document - The new unpersisted document.
nameValueData - The input from the UI.
postCreateInfo - The input from the UI.
solution - The solution key for the template processing.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
document The new persisted document.
Throws:
WTException

getUnpersistedTemplate

protected WTDocument getUnpersistedTemplate(HashMap nameValueData,
                                            TypeIdentifier objType,
                                            String solution,
                                            Locale locale)
                                     throws WTException
Deprecated.  

Do the common pre-persistance activities for create template across all solutions.

Supported API: false

Parameters:
nameValueData - The input from the UI.
solution - The solution key for the template processing.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
document The new unpersisted document.
Throws:
WTException

persistDocumentTemplate

protected WTDocument persistDocumentTemplate(WTDocument document,
                                             HashMap postCreateInfo,
                                             String solution,
                                             Locale locale)
                                      throws WTException
Deprecated.  

Do the common persistance activities for create template across all solutions.

Supported API: false

Parameters:
document - The new unpersisted document.
postCreateInfo - The input from the UI.
solution - The solution key for the template processing.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
document The new persisted document.
Throws:
WTException

getCreateTemplateAttributes

protected HashMap getCreateTemplateAttributes(String[] solutionList,
                                              WTContainer context,
                                              TypeIdentifier objType,
                                              HashMap hashMap,
                                              boolean autoNumber,
                                              Locale locale)
                                       throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for a create.

Supported API: false

Parameters:
solutionList - List of attributes for the solution.
context - Container to create the document in.
objType - Soft type to use for the new document.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
autoNumber - Should the document be autonumbered or manually numbered.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getCreateFromTemplateAttributes

protected HashMap getCreateFromTemplateAttributes(String[] solutionList,
                                                  WTContainer context,
                                                  Templateable template,
                                                  HashMap hashMap,
                                                  boolean autoNumber,
                                                  Locale locale)
                                           throws WTException
Deprecated.  

Return a list of the modeled attributes that need to be populated for a create.

Supported API: false

Parameters:
context - Container to create the document in.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getUpdateDocumentAttributes

protected HashMap getUpdateDocumentAttributes(String[] solutionList,
                                              Persistable object,
                                              HashMap hashMap,
                                              Locale locale)
                                       throws WTException
Deprecated.  

Return a list of the modeled attributes that can be updated along with their present values.

Supported API: false

Parameters:
object - The class of the object that the context list is requested for.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getCheckinDocumentAttributes

protected HashMap getCheckinDocumentAttributes(String[] solutionList,
                                               Persistable object,
                                               HashMap hashMap,
                                               Locale locale)
                                        throws WTException
Deprecated.  

Return a list of the modeled attributes that can be updated along with their present values during checkin.

Supported API: false

Parameters:
object - The class of the object that the context list is requested for.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getDetailsDocumentAttributes

protected HashMap getDetailsDocumentAttributes(String[] solutionList,
                                               Persistable object,
                                               HashMap hashMap,
                                               ClientConfiguration clientInfo,
                                               Locale locale)
                                        throws WTException
Deprecated.  

Return a list of the modeled/made up attributes that should be displayed on the details page.

Supported API: false

Parameters:
object - The class of the object that the context list is requested for.
hashMap - Either a started hash map for the data or null if one is to be created inside of this method.
clientInfo - Information from the client application.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getTypeInstanceIdentifier

private TypeInstanceIdentifier getTypeInstanceIdentifier(HashMap hashMap)
                                                  throws IllegalFormatException,
                                                         UnableToCreateServiceException
Deprecated. 
Throws:
IllegalFormatException
UnableToCreateServiceException

getPDMSpecificAttributes

private String[] getPDMSpecificAttributes(String operation)
Deprecated.