com.ptc.windchill.enterprise.nativeapp.server
Interface ApplicationTaskDelegate

All Known Implementing Classes:
DefaultApplicationTaskDelegate

public interface ApplicationTaskDelegate

Delegate that implements the methods for the specific application. Allows different applications like the Microsoft Office Integration to have different behavior. Can also use different delegates base on either class or type, but most of the methods in this class that might need to do that call other factory/delegates that should be used for that purpose because they are also used in other clients.

Supported API: false

Extendable: false


Method Summary
 Workable checkin(Workable workingCopy, HashMap nameValueData, String note, boolean keepCheckedOut, Locale locale)
          Checkin and possibly checkout a workable object.
 Workable checkout(Workable original, String note, Locale locale)
          Checkout a Workable object.
 WTDocument createDocument(TypeIdentifier objType, HashMap nameValueData, boolean keepCheckedOut, Locale locale)
          Create a document from the information input by the user.
 WTDocument createDocumentFromTemplate(WTDocument template, HashMap nameValueData, Locale locale, String applicationName)
          Create a document from a document template.
 WTDocument createDocumentTemplate(TypeIdentifier objType, HashMap nameValueData, Locale locale)
          Create a document template from the information input by the user.
 void delete(WTObject object, Locale locale)
          Delete an object.
 Persistable getCheckedOutObjectState(Class objClass, String fileName, Locale locale)
          Given a filename, check for that filename on the objects that the user has in their checked out folder.
 HashMap getCheckinTypeAttributes(WTDocument document, Locale locale)
          Returns a list of the both soft and modeled attributes required for checkin document/document template (either soft type or modeled type).
 Enumeration getContainers(boolean recentlyVisited, String containerName, String containerType, Locale locale)
          Returns a list of the containers that are available for this user, depending on the container type requested.
 HashMap getContainerTypes(TypeIdentifier objType, Locale locale)
          Return a HashMap to represent the container types that are available for this user.
 HashMap getCreateFromTemplateAttributes(Templateable objTemplate, WTContainer context, Locale locale)
          Returns a list of the both soft and modeled attributes required for a create document from template (soft type or modeled type).
 HashMap getCreateTemplateAttributes(WTContainer context, TypeIdentifier objType, Locale locale)
          Returns a list of the both soft and modeled attributes required for a create template document (soft type or modeled type).
 HashMap getCreateTypeAttributes(WTContainer context, TypeIdentifier objType, Locale locale)
          Returns a list of the both soft and modeled attributes required for a create document (soft type or modeled type).
 Persistable[] getDocumentTemplates(Class objClass, String context, Locale locale)
          Return an array to represent the template list.
 TypeIdentifier[] getDocumentType(Class objClass, String context, Locale locale)
          Return an array of the types that are available for this context.
 Object[] getFolderList(TypeIdentifier objType, boolean isTemplate, String container, Locale locale)
          Returns a list of the folders for this container in a hierarchical list with information about display and whether a user can create in that folder.
 HashMap getObjectMenuState(WTObject object, Locale locale)
          Return a HashMap listing the menus that can be executed against this object.
 Vector getOneLevelFolderList(TypeIdentifier objType, boolean isTemplate, WTContainer container, Locale locale)
          Returns a list of the first level of folders for this container suitable for a create dialog.
 Enumeration getOrganizations(String orgName, String orgId, Locale locale)
          Returns a list of the containers that are available for this user, depending on the container type requested.
 TypeIdentifier[] getTemplateTypes(Class objClass, String context, Locale locale)
          Return an array of the types of document that a template can be created with.
 HashMap getUpdateTypeAttributes(WTDocument document, Locale locale)
          Returns a list of the both soft and modeled attributes required for an update document (either soft type or modeled type).
 QueryResult queryForDocuments(HashMap criteria, HashMap displayAttributes, Locale locale)
          Perform an Integrated Search which is both the keyword search on Retrieval Ware and a database search in windchill.
 Identified rename(Identified object, String newName, Locale locale)
          Change the name on the Identified object.
 Versionable reviseAndCheckout(Versionable original_copy, boolean keepCheckedOut, Locale locale)
          Revise and checkout a versionable object.
 WTDocument setDownloadPath(WTDocument document, String downloadPath, String checksum, Locale locale)
          To be used after a document has been checked out and the content has been downloaded already.
 LifeCycleManaged submitToLifecycle(LifeCycleManaged object, Locale locale)
          Submit object to the lifecycle state that comes next.
 Workable undoCheckout(Workable workingCopy, Locale locale)
          Undo-Checkout of a workable object.
 WTDocument updateDocument(WTDocument document, HashMap nameValueData, Locale locale)
          Update a WTDocument from the information input by the user.
 

Method Detail

getObjectMenuState

public HashMap getObjectMenuState(WTObject object,
                                  Locale locale)
                           throws WTException
Return a HashMap listing the menus that can be executed against this object.

Supported API: false

Parameters:
object - Object to test menu availability. Will check which edit functions are available based on the interfaces the object implements and it's current state.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

queryForDocuments

public QueryResult queryForDocuments(HashMap criteria,
                                     HashMap displayAttributes,
                                     Locale locale)
                              throws WTException
Perform an Integrated Search which is both the keyword search on Retrieval Ware and a database search in windchill.

Supported API: false

Parameters:
criteria - Name value pairs for the criteria. Names that are either "keyword" for Retrieval Ware or the names that from the object that can be seen through introspection.
displayAttributes - A list of the attributes that must be returned to the client and so should be fully expanded and included in the results. The value of each attribute in the HashMap is either ascending, descending, or null. Where the number means the order of this attribute as a sort key starting with 0. The null value means that this attribute should not be sorted on at all.
locale -
Returns:
QueryResult
Throws:
WTException

createDocument

public WTDocument createDocument(TypeIdentifier objType,
                                 HashMap nameValueData,
                                 boolean keepCheckedOut,
                                 Locale locale)
                          throws WTException
Create a document from the information input by the user. Since this method calls a factory/delegate to create the document if customization or new document types are required that have different attributes then a new delegate is added and nothing changes in this class. Will handle soft types that don't add new attributes.

Supported API: false

Parameters:
objType - Soft type to use for the new document.
nameValueData - Name value pairs of input data.
keepCheckedOut - If true, then after the document is created it is checked out. If false, then the document is not checked out.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
WTDocument
Throws:
WTException

createDocumentFromTemplate

public WTDocument createDocumentFromTemplate(WTDocument template,
                                             HashMap nameValueData,
                                             Locale locale,
                                             String applicationName)
                                      throws WTException
Create a document from a document template. Will handle soft types that don't add new attributes.

Supported API: false

Parameters:
template - The document template to be used to create the new document with.
nameValueData - Name value pairs of input data..
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.
Returns:
WTDocument
Throws:
WTException

createDocumentTemplate

public WTDocument createDocumentTemplate(TypeIdentifier objType,
                                         HashMap nameValueData,
                                         Locale locale)
                                  throws WTException
Create a document template from the information input by the user. Since this method calls a factory/delegate to create the document if customization or new document types are required that have different attributes then a new delegate is added and nothing changes in this class. Will handle soft types that don't add new attributes.

Supported API: false

Parameters:
objType - Soft type to use for the new template.
nameValueData - Name value pairs of input data.
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 WTDocument from the information input by the user. Since this method calls a factory/delegate to update the document if customization or new document types are required that have different attributes then a new delegate is added and nothing changes in this class. Will handle soft types that don't add new attributes.

Supported API: false

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

checkout

public Workable checkout(Workable original,
                         String note,
                         Locale locale)
                  throws WTException
Checkout a Workable object.

Supported API: false

Parameters:
original - The object to be checked out.
note - The note to add to the checkout. Usually null.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Workable
Throws:
WTException

checkin

public Workable checkin(Workable workingCopy,
                        HashMap nameValueData,
                        String note,
                        boolean keepCheckedOut,
                        Locale locale)
                 throws WTException
Checkin and possibly checkout a workable object.

Supported API: false

Parameters:
workingCopy - The object to be checked in and possiblly checked out. The upload of the file contents must take place before calling this method.
nameValueData - Name value pairs of data from the UI.
note - The note to add to the checkout. Usually null.
keepCheckedOut - If true, then after the document is checked in it is checked out. If false, then the document is not checked out.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Workable
Throws:
WTException

undoCheckout

public Workable undoCheckout(Workable workingCopy,
                             Locale locale)
                      throws WTException
Undo-Checkout of a workable object.

Supported API: false

Parameters:
workingCopy - The object to have the checkout undone on.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Workable
Throws:
WTException

reviseAndCheckout

public Versionable reviseAndCheckout(Versionable original_copy,
                                     boolean keepCheckedOut,
                                     Locale locale)
                              throws WTException
Revise and checkout a versionable object.

Supported API: false

Parameters:
original_copy - The object to be revised and then checked out.
keepCheckedOut - If true, then after the document is revised it is checked out. If false, then the document is not checked out.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Versionable
Throws:
WTException

delete

public void delete(WTObject object,
                   Locale locale)
            throws WTException
Delete an object.

Supported API: false

Parameters:
object - The object to be deleted.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Throws:
WTException

rename

public Identified rename(Identified object,
                         String newName,
                         Locale locale)
                  throws WTException
Change the name on the Identified object.

Supported API: false

Parameters:
object -
newName - The new name to change the object to.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Identified
Throws:
WTException

submitToLifecycle

public LifeCycleManaged submitToLifecycle(LifeCycleManaged object,
                                          Locale locale)
                                   throws WTException
Submit object to the lifecycle state that comes next.

Supported API: false

Parameters:
object -
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
LifeCycleManaged
Throws:
WTException

getDocumentType

public TypeIdentifier[] getDocumentType(Class objClass,
                                        String context,
                                        Locale locale)
                                 throws WTException
Return an array of the types that are available for this context. If there are no soft types defined then null is returned. This should allow basic creates to still take place with a default of a null soft type.

Supported API: false

Parameters:
objClass - The class of the object that the type list is requested for.
context - The library, product, project, site, or org that this is requested from. The format of this is the object reference of the container like OR:wt.inf.library.WTLibrary:3182.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
TypeIdentifier[]
Throws:
WTException

getDocumentTemplates

public Persistable[] getDocumentTemplates(Class objClass,
                                          String context,
                                          Locale locale)
                                   throws WTException
Return an array to represent the template list. This list is returned more like a search list return because these are documents that are returned.

Supported API: false

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
Return an array of the types of document that a template can be created with. For create template.

Supported API: false

Parameters:
objClass - The class of the object that the template type 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

getCheckedOutObjectState

public Persistable getCheckedOutObjectState(Class objClass,
                                            String fileName,
                                            Locale locale)
                                     throws WTException
Given a filename, check for that filename on the objects that the user has in their checked out folder.

Supported API: false

Parameters:
objClass - Class to check for in the checked out folder.
fileName - The file name to be searched in checkedout folder is passed in as a string.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Persistable
Throws:
WTException

setDownloadPath

public WTDocument setDownloadPath(WTDocument document,
                                  String downloadPath,
                                  String checksum,
                                  Locale locale)
                           throws WTException
To be used after a document has been checked out and the content has been downloaded already. This will update the application data to record the download path and optionally the checksum (probably not used at this time). Returns the object and status in an I*E Group container.

Supported API: false

Parameters:
document - The document that has the primary content to be updated with the path that the file was downloaded to.
downloadPath - Path that the file was downloaded to on the checkout.
checksum - Optional to set the checksum of the file downloaded. Probably won't be used.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
WTDocument
Throws:
WTException

getCreateTypeAttributes

public HashMap getCreateTypeAttributes(WTContainer context,
                                       TypeIdentifier objType,
                                       Locale locale)
                                throws WTException
Returns a list of the both soft and modeled attributes required for a create document (soft type or modeled type).

Supported API: false

Parameters:
context - Container to create the document in.
objType - Soft type to use for the new document.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getUpdateTypeAttributes

public HashMap getUpdateTypeAttributes(WTDocument document,
                                       Locale locale)
                                throws WTException
Returns a list of the both soft and modeled attributes required for an update document (either soft type or modeled type).

Supported API: false

Parameters:
document - This is the document to be updated.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getContainerTypes

public HashMap getContainerTypes(TypeIdentifier objType,
                                 Locale locale)
                          throws WTException
Return a HashMap to represent the container types that are available for this user. The key is the internal description and the value is the displayable value (localized) for the user to select from.

Supported API: false

Parameters:
objType - Type identifier to identity which object type to get the list of containers that the object might be able to be created in.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getContainers

public Enumeration getContainers(boolean recentlyVisited,
                                 String containerName,
                                 String containerType,
                                 Locale locale)
                          throws WTException
Returns a list of the containers that are available for this user, depending on the container type requested.

Supported API: false

Parameters:
recentlyVisited - Flag if only recently visited containers should be returned or all containers.
containerName - Search criteria for the name of the container. This criteria is used only when the recentlyVisited is set to false.
containerType - String that is either product, library, project, classic, site, or org.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Enumeration
Throws:
WTException

getFolderList

public Object[] getFolderList(TypeIdentifier objType,
                              boolean isTemplate,
                              String container,
                              Locale locale)
                       throws WTException
Returns a list of the folders for this container in a hierarchical list with information about display and whether a user can create in that folder.

Supported API: false

Parameters:
objType - Type identifier string to identity which object type to get the list of folders that the object might be able to be created in. Of the form wt.doc.WTDocument|SoftType, if this is null or empty the default will be wt.doc.WTDocument.
isTemplate - Indicates if the folder list is being retrieved for a template object.
container - The container that the folder list should be from.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Object[]
Throws:
WTException

getCreateTemplateAttributes

public HashMap getCreateTemplateAttributes(WTContainer context,
                                           TypeIdentifier objType,
                                           Locale locale)
                                    throws WTException
Returns a list of the both soft and modeled attributes required for a create template document (soft type or modeled type).

Supported API: false

Parameters:
context - Container to create the document in.
objType - Soft type to use for the new document.
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(Templateable objTemplate,
                                               WTContainer context,
                                               Locale locale)
                                        throws WTException
Returns a list of the both soft and modeled attributes required for a create document from template (soft type or modeled type).

Supported API: false

Parameters:
objTemplate - The template to create the object from.
context - Container to create the document in.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException

getOrganizations

public Enumeration getOrganizations(String orgName,
                                    String orgId,
                                    Locale locale)
                             throws WTException
Returns a list of the containers that are available for this user, depending on the container type requested.

Supported API: false

Parameters:
orgName - Search criteria for the name of the organization.
orgId - Search criteria for the id of the organization.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Enumeration
Throws:
WTException

getOneLevelFolderList

public Vector getOneLevelFolderList(TypeIdentifier objType,
                                    boolean isTemplate,
                                    WTContainer container,
                                    Locale locale)
                             throws WTException
Returns a list of the first level of folders for this container suitable for a create dialog. The list includes a display string for the default cabinet for the container and then any folders that are in the first level of folders. The return Vector containers the internal values in the first element of the Vector as a string that uses | as a delimiter between values. The return Vector has the display values in the second element of the Vector as a string that also uses | as a delimiters. The values match up between the two strings. The default cabinet does not have an internal value.

Supported API: false

Parameters:
objType - Type identifier to identity which object type to get the list of folders that the object might be able to be created in.
isTemplate - Indicates if the folder list is being retrieved for a template object.
container - The container that the folder list should be from.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
Vector
Throws:
WTException

getCheckinTypeAttributes

public HashMap getCheckinTypeAttributes(WTDocument document,
                                        Locale locale)
                                 throws WTException
Returns a list of the both soft and modeled attributes required for checkin document/document template (either soft type or modeled type).

Supported API: false

Parameters:
document - This is the document to be checked in.
locale - The locale of the client, used to return some of the strings in the locale of the client.
Returns:
HashMap
Throws:
WTException