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

java.lang.Object
  extended bycom.ptc.windchill.enterprise.doc.server.WTDocumentDelegate
      extended bycom.ptc.windchill.enterprise.doc.server.WTDocumentProjectDelegate
All Implemented Interfaces:
DocumentDelegate, Serializable

public class WTDocumentProjectDelegate
extends WTDocumentDelegate
implements Serializable

ProjectLink style implementation of the delegate. Also used at the site and org level for PDMLink so needs to be in a centralized location.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CHECKIN
           
private static String CLASSNAME
           
private static String CREATE
           
private static String DISPLAY
           
private static String RESOURCE
           
private static boolean SHOWORG
           
private static String UPDATE
           
private static boolean VERBOSE
           
 
Fields inherited from class com.ptc.windchill.enterprise.doc.server.WTDocumentDelegate
 
Constructor Summary
WTDocumentProjectDelegate()
           
 
Method Summary
 WTDocument createDocument(TypeIdentifier objType, HashMap nameValueData, Locale locale)
          Create a document from the input provided.
 HashMap getCheckinDocumentAttributes(Persistable object, HashMap hashMap, Locale locale)
          Return a list of the modeled attributes that can be updated along with their present values.
 HashMap getCreateDocumentAttributes(WTContainer context, TypeIdentifier objType, HashMap hashMap, Locale locale)
          Return a list of the modeled attributes that need to be populated for a create.
 HashMap getDetailsDocumentAttributes(Persistable object, HashMap hashMap, ClientConfiguration clientInfo, Locale locale)
          Return a list of the modeled/made up attributes that should be displayed on the details page.
private  String[] getProjectSpecificAttributes(String operation)
           
 HashMap getUpdateDocumentAttributes(Persistable object, HashMap hashMap, Locale locale)
          Return a list of the modeled attributes that can be updated along with their present values.
 WTDocument updateDocument(WTDocument document, HashMap nameValueData, Locale locale)
          Update a document from the input provided.
 
Methods inherited from class com.ptc.windchill.enterprise.doc.server.WTDocumentDelegate
getCheckinDocumentAttributes, getCreateDocumentAttributes, getDetailsDocumentAttributes, getDocumentType, getNewWTDocument, getUpdateDocumentAttributes, setStandardCreateAttributes, setStandardUpdateAttributes
 
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

CREATE

private static final String CREATE
See Also:
Constant Field Values

UPDATE

private static final String UPDATE
See Also:
Constant Field Values

DISPLAY

private static final String DISPLAY
See Also:
Constant Field Values

CHECKIN

private static final String CHECKIN
See Also:
Constant Field Values

VERBOSE

private static boolean VERBOSE

SHOWORG

private static final boolean SHOWORG
Constructor Detail

WTDocumentProjectDelegate

public WTDocumentProjectDelegate()
Method Detail

createDocument

public WTDocument createDocument(TypeIdentifier objType,
                                 HashMap nameValueData,
                                 Locale locale)
                          throws WTException
Create a document from the input provided. Override this method and add a properties entry for your new class and method to create new sub-classes of WTDocument.

Supported API: false

Specified by:
createDocument in interface DocumentDelegate
Overrides:
createDocument in class WTDocumentDelegate
Parameters:
objType - Soft type to use for the new document.
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:
WTDocument
Throws:
WTException

updateDocument

public WTDocument updateDocument(WTDocument document,
                                 HashMap nameValueData,
                                 Locale locale)
                          throws WTException
Update a document from the input provided. Override this method and add a properties entry for your new class and method to create new sub-classes of WTDocument.

Supported API: false

Specified by:
updateDocument in interface DocumentDelegate
Overrides:
updateDocument in class WTDocumentDelegate
Parameters:
document - The document to be updated.
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:
WTDocument
Throws:
WTException

getCreateDocumentAttributes

public HashMap getCreateDocumentAttributes(WTContainer context,
                                           TypeIdentifier objType,
                                           HashMap hashMap,
                                           Locale locale)
                                    throws WTException
Return a list of the modeled attributes that need to be populated for a create.

Supported API: false

Specified by:
getCreateDocumentAttributes in interface DocumentDelegate
Overrides:
getCreateDocumentAttributes in class WTDocumentDelegate
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

getUpdateDocumentAttributes

public HashMap getUpdateDocumentAttributes(Persistable object,
                                           HashMap hashMap,
                                           Locale locale)
                                    throws WTException
Return a list of the modeled attributes that can be updated along with their present values.

Supported API: false

Specified by:
getUpdateDocumentAttributes in interface DocumentDelegate
Overrides:
getUpdateDocumentAttributes in class WTDocumentDelegate
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

public HashMap getDetailsDocumentAttributes(Persistable object,
                                            HashMap hashMap,
                                            ClientConfiguration clientInfo,
                                            Locale locale)
                                     throws WTException
Return a list of the modeled/made up attributes that should be displayed on the details page.

Supported API: false

Specified by:
getDetailsDocumentAttributes in interface DocumentDelegate
Overrides:
getDetailsDocumentAttributes in class WTDocumentDelegate
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

getCheckinDocumentAttributes

public HashMap getCheckinDocumentAttributes(Persistable object,
                                            HashMap hashMap,
                                            Locale locale)
                                     throws WTException
Return a list of the modeled attributes that can be updated along with their present values.

Supported API: false

Specified by:
getCheckinDocumentAttributes in interface DocumentDelegate
Overrides:
getCheckinDocumentAttributes in class WTDocumentDelegate
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

getProjectSpecificAttributes

private String[] getProjectSpecificAttributes(String operation)