Package com.ptc.windchill.esi.delegate
Class DocumentQueryDelegate
java.lang.Object
com.ptc.windchill.esi.delegate.DocumentQueryDelegate
- All Implemented Interfaces:
InfDocumentQueryDelegate
Represents document information identified for export by the retrievePartDocInformation and
retrievePartDocDifferences methods of the WTPartService.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddBuildHistoryPDI(RevisionControlled revisionControlled, Hashtable hash) Fetches built by (or BuildHistory) document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.booleanaddBuildHistoryPDI(RevisionControlled revisionControlled, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) Fetches built by (or BuildHistory) document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.voidaddCalculatedDrawings(Collection<EPMDocument> dwgs, Hashtable table) Adds the drawings in the input collection to the input Hashtable as appropriate.voidaddCalculatedDrawings(Collection<EPMDocument> dwgs, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) Adds the drawings in the input Collection to the input Map as appropriate.voidaddCalculatedDrawings(RevisionControlled rcObj, Hashtable table) Fetches the calculated drawings for the input RevisionControlled object and adds these to the input Hashtable as appropriate.voidaddCalculatedDrawings(RevisionControlled rcObj, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) Fetches the calculated drawings for the input RevisionControlled object and adds these to the input Map as appropriate.booleanaddDescribeDocumentPDI(RevisionControlled revisionControlled, Hashtable hash, boolean workingIncluded) Fetches described by document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.booleanaddDescribeDocumentPDI(RevisionControlled revisionControlled, Map<Object, PartDocInfo> documentInfoMap, boolean workingIncluded, boolean isEnterpriseDataMergeWithPart) Fetches described by document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.voidaddReferenceDocPDI(RevisionControlled part, Hashtable hash, boolean workingIncluded) Fetches reference document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.voidaddReferenceDocPDI(RevisionControlled revControlledObj, Map<Object, PartDocInfo> documentInfoMap, boolean workingIncluded, boolean isEnterpriseDataMergeWithPart) Fetches reference document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input HashMap.If the preference "Reference Document Configuration Specification State" is set to multiple LCS values, and this results in multiple versions of the same document being fetched, only the latest version of the document is added to the HashMap
Supported API: truestatic voidcheckAndAddToCollection(Map map, Persistable epmDoc, Collection dwgs) Deprecated.Use checkAndAddToCollection(Map, Persistable, Collection, Boolean) instead.static voidcheckAndAddToCollection(Map map, Persistable epmDoc, Collection dwgs, Boolean isEnterpriseDataMergeWithPart) Adds the input Persistable to the input Collection after performing certain checks as appropriate.getCADDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) Returns Map of CAD Document Links associated with EnterpriseData objects.static Collection<EPMDocument> getCalculatedDrawings(RevisionControlled rcObj, Hashtable table) Fetches the calculated drawings for the input RevisionControlled object, stores them in a collection and returns it to the caller.static Collection<EPMDocument> getCalculatedDrawings(RevisionControlled rcObj, Map inputMap, boolean isEnterpriseDataMergeWithPart) Fetches the calculated drawings for the input RevisionControlled object, stores them in a collection and returns it to the caller.getDescribeDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) Returns Map of Describe Document Links associated with EnterpriseData objects.Gets the value of the attribute primaryBusinessObject.getRefDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) Returns Map of Reference Document Links associated with EnterpriseData objects.static Map<WTDocumentMaster, WTDocument> getRefDocuments(Set<ObjectReference> enterpriseDatas, WTPart part, ConfigSpec config_spec) Returns Map of Document Links associated with EnterpriseData objects with are associated with part.Returns the ESITarget object for the association
Supported API: truebooleanLets the caller know if Enterprise Data merge with Part group or not
Returns 'true' when if Enterprise Data is not merge with part
Supported API: truevoidsetEnterpriseDataMergeWithPart(boolean isEnterpriseDataMergeWithPart) Sets if enterprise data object is merged with part or rendered separately.voidSets the attribute primaryBusinessObject to the input object.voidsetTarget(Collection<ESITarget> tgts) Sets the ESITarget object for the association Supported API: true
-
Method Details
-
addReferenceDocPDI
public void addReferenceDocPDI(RevisionControlled part, Hashtable hash, boolean workingIncluded) throws WTException, ConfigException Fetches reference document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.
Supported API: true- Specified by:
addReferenceDocPDIin interfaceInfDocumentQueryDelegate- Parameters:
part- Input RevisionControlled object for which to fetch reference document associations.hash- Input Hashtable to add the created PartDocInfo objects to.workingIncluded- Determines whether or not working copies are to be included in the output; this is simply passed in to the initialize() API.- Throws:
WTExceptionConfigException
-
addDescribeDocumentPDI
public boolean addDescribeDocumentPDI(RevisionControlled revisionControlled, Hashtable hash, boolean workingIncluded) throws WTException Fetches described by document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.
Supported API: true- Specified by:
addDescribeDocumentPDIin interfaceInfDocumentQueryDelegate- Parameters:
revisionControlled- Input RevisionControlled object for which to fetch described by document associations.hash- Input Hashtable to add the created PartDocInfo objects to.workingIncluded- Determines whether or not working copies are to be included in the output; this is simply passed in to the initialize() API.- Returns:
- A true, if the input object has at least one CAD document associated to it; a false, otherwise.
- Throws:
WTException
-
addBuildHistoryPDI
public boolean addBuildHistoryPDI(RevisionControlled revisionControlled, Hashtable hash) throws WTException Fetches built by (or BuildHistory) document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.
Supported API: true- Specified by:
addBuildHistoryPDIin interfaceInfDocumentQueryDelegate- Parameters:
revisionControlled- Input RevisionControlled object for which to fetch BuildHistory document associations.hash- Input Hashtable to add the created PartDocInfo objects to.- Returns:
- return A true, if the input object has at least one CAD document associated to it, via a BuildHistory association; a false, otherwise.
- Throws:
WTException
-
addCalculatedDrawings
Fetches the calculated drawings for the input RevisionControlled object and adds these to the input Hashtable as appropriate.
Supported API: true- Specified by:
addCalculatedDrawingsin interfaceInfDocumentQueryDelegate- Parameters:
rcObj- RevisionControlled object (such as a WTPart) for which to add calculated drawings.table- Hashtable to which to add the calculated drawings. See the Javadoc for getCalculatedDrawings() for more information on its contents.- Throws:
WTException- if any of the invoked methods throws an exception.
-
getCalculatedDrawings
public static Collection<EPMDocument> getCalculatedDrawings(RevisionControlled rcObj, Hashtable table) throws WTException Fetches the calculated drawings for the input RevisionControlled object, stores them in a collection and returns it to the caller.
Supported API: true- Parameters:
rcObj- RevisionControlled object (such as a WTPart) for which to fetch calculated drawings.table- Hashtable of keys and values, where each key is a string holding the object ID of a given document, and each value is the corresponding PartDocInfo object. Only those drawings that do not already exist in this Hashtable are returned.- Returns:
- Collection of EPMDocuments that represent calculated drawings. A calculated drawing is one that is not directly associated to a RevisionControlled object, but to a CAD model which in turn is associated to the RevisionControlled object.
- Throws:
WTException- if any of the invoked methods throws an exception.
-
addCalculatedDrawings
Adds the drawings in the input collection to the input Hashtable as appropriate.
Supported API: true- Specified by:
addCalculatedDrawingsin interfaceInfDocumentQueryDelegate- Parameters:
dwgs- Input collection of calculated drawings.table- Hashtable to which to add the drawings. Only those drawings for which an associated CAD model exists in the Hashtable are added.- Throws:
WTException- if any of the invoked methods throws an exception.
-
addReferenceDocPDI
public void addReferenceDocPDI(RevisionControlled revControlledObj, Map<Object, PartDocInfo> documentInfoMap, boolean workingIncluded, boolean isEnterpriseDataMergeWithPart) throws WTException, ConfigExceptionFetches reference document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input HashMap.If the preference "Reference Document Configuration Specification State" is set to multiple LCS values, and this results in multiple versions of the same document being fetched, only the latest version of the document is added to the HashMap
Supported API: true- Specified by:
addReferenceDocPDIin interfaceInfDocumentQueryDelegate- Parameters:
revControlledObj- Input RevisionControlled object for which to fetch reference document associations.documentInfoMap- Input map to add the created PartDocInfo objects to.workingIncluded- Determines whether or not working copies are to be included in the output; this is simply passed in to the initialize() API.isEnterpriseDataMergeWithPart- Determines if enterprise data is merged with part in the ESI response.revControlledObjrevControlledObj- Input RevisionControlled object for which to fetch reference document associations.- Throws:
WTException- , ConfigExceptionConfigException
-
addDescribeDocumentPDI
public boolean addDescribeDocumentPDI(RevisionControlled revisionControlled, Map<Object, PartDocInfo> documentInfoMap, boolean workingIncluded, boolean isEnterpriseDataMergeWithPart) throws WTExceptionFetches described by document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.
Supported API: true- Specified by:
addDescribeDocumentPDIin interfaceInfDocumentQueryDelegate- Parameters:
revisionControlled- Input RevisionControlled object for which to fetch described by document associations.documentInfoMap- Input map to add the created PartDocInfo objects to.workingIncluded- Determines whether or not working copies are to be included in the output; this is simply passed in to the initialize() API.- Returns:
- A true, if the input object has at least one CAD document associated to it; a false, otherwise.
- Throws:
WTException
-
addBuildHistoryPDI
public boolean addBuildHistoryPDI(RevisionControlled revisionControlled, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) throws WTExceptionFetches built by (or BuildHistory) document associations for the input object, creates a PartDocInfo instance for each such association and adds them to the input Hashtable.
Supported API: true- Specified by:
addBuildHistoryPDIin interfaceInfDocumentQueryDelegate- Parameters:
revisionControlled- Input RevisionControlled object for which to fetch BuildHistory document associations.documentInfoMap- Input map to add the created PartDocInfo objects to.- Returns:
- return A true, if the input object has at least one CAD document associated to it, via a BuildHistory association; a false, otherwise.
- Throws:
WTException
-
addCalculatedDrawings
public void addCalculatedDrawings(RevisionControlled rcObj, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) throws WTExceptionFetches the calculated drawings for the input RevisionControlled object and adds these to the input Map as appropriate.
Supported API: true- Specified by:
addCalculatedDrawingsin interfaceInfDocumentQueryDelegate- Parameters:
rcObj- RevisionControlled object (such as a WTPart) for which to add calculated drawings.documentInfoMap- Input Map to which to add the calculated drawings. See the Javadoc for getCalculatedDrawings() for more information on its contents.isEnterpriseDataMergeWithPart- Specifies whether or not to send EnterpriseData and Part information together. It is simply passed in to the downstream APIs.- Throws:
WTException- if any of the invoked methods throws an exception.
-
addCalculatedDrawings
public void addCalculatedDrawings(Collection<EPMDocument> dwgs, Map<Object, PartDocInfo> documentInfoMap, boolean isEnterpriseDataMergeWithPart) throws WTExceptionAdds the drawings in the input Collection to the input Map as appropriate.
Supported API: true- Specified by:
addCalculatedDrawingsin interfaceInfDocumentQueryDelegate- Parameters:
dwgs- Input Collection of calculated drawings.documentInfoMap- Input Map to which to add the drawings. Only those drawings for which an associated CAD model exists in the Map are added.isEnterpriseDataMergeWithPart- Specifies whether or not to send EnterpriseData and Part information together. It is currently not used.- Throws:
WTException- if any of the invoked methods throws an exception.
-
checkAndAddToCollection
@Deprecated public static void checkAndAddToCollection(Map map, Persistable epmDoc, Collection dwgs) throws WTException Deprecated.Use checkAndAddToCollection(Map, Persistable, Collection, Boolean) instead.Adds the input Persistable to the input Collection after performing certain checks as appropriate.
Supported API: true- Parameters:
map- Input Map whose contents are used in performing certain checks.epmDoc- Input Persistable to be added to the Collection. It is added provided it is an EPMDocument object, and it does not already figure in the input Map.dwgs- Input Collection to add the input Persistable to.- Throws:
WTException- if the input Persistable is not an EPMDocument object.
-
checkAndAddToCollection
public static void checkAndAddToCollection(Map map, Persistable epmDoc, Collection dwgs, Boolean isEnterpriseDataMergeWithPart) throws WTException Adds the input Persistable to the input Collection after performing certain checks as appropriate.
Supported API: true- Parameters:
map- Input Map whose contents are used in performing certain checks.epmDoc- Input Persistable to be added to the Collection. It is added provided it is an EPMDocument object, and it does not already figure in the input Map.dwgs- Input Collection to add the input Persistable to.isEnterpriseDataMergeWithPart- Is true if Part and EnterpriseData elements are to be sent separately in the ESI response; is false otherwise. Can be null. The argument is simply passed to a downstream API. A better name has to be chosen for this parameter considering that the current name is completely misleading.- Throws:
WTException- if the input Persistable is not an EPMDocument object.
-
getCalculatedDrawings
public static Collection<EPMDocument> getCalculatedDrawings(RevisionControlled rcObj, Map inputMap, boolean isEnterpriseDataMergeWithPart) throws WTException Fetches the calculated drawings for the input RevisionControlled object, stores them in a collection and returns it to the caller.
Supported API: true- Parameters:
rcObj- RevisionControlled object (such as a WTPart) for which to fetch calculated drawings.inputMap- Input Map of keys and values, where each key is a string holding the object ID of a given document, and each value is the corresponding PartDocInfo object. Only those drawings that do not already exist in this Map are returned.isEnterpriseDataMergeWithPart- Specifies whether or not to send EnterpriseData and Part information together. The argument is simply passed to a downstream API.- Returns:
- Collection of EPMDocuments that represent calculated drawings. A calculated drawing is one that is not directly associated to a RevisionControlled object, but to a CAD model which in turn is associated to the RevisionControlled object.
- Throws:
WTException- if any of the invoked methods throws an exception.
-
getRefDocumentLinks
public Map<Object,PartDocInfo> getRefDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) throws WTException Returns Map of Reference Document Links associated with EnterpriseData objects.
Supported API: true- Specified by:
getRefDocumentLinksin interfaceInfDocumentQueryDelegate- Parameters:
enterpriseDatas- - Set of Enterprise data objects associated with partpart- - The part with which EnterpriseData objects are associated.isEnterpriseDataMergeWithPart- - Flag that indicates whether enterprise data object is rendered in separate element or merged in part eleement. When value is 'true' then enterprise data object will be rendered in separate eleemnt in part group in response file otherwise enterprise data attributes will be merged with part element.- Returns:
- - The map of Document Links associated with EnterpriseData objects.
- Throws:
WTException
-
getRefDocuments
public static Map<WTDocumentMaster,WTDocument> getRefDocuments(Set<ObjectReference> enterpriseDatas, WTPart part, ConfigSpec config_spec) throws WTException Returns Map of Document Links associated with EnterpriseData objects with are associated with part. DocumentMaster is the key and Document iteration is value in the map.
Supported API: true- Parameters:
part- - The part with which EnterpriseData objects are associated.enterpriseDataRef- - Set of Enterprise data object reference associated with which Referenced document objects may be associated.- Returns:
- - The map of Documents associated with EnterpriseData objects.
- Throws:
WTException
-
getDescribeDocumentLinks
public Map<Object,PartDocInfo> getDescribeDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) throws WTException Returns Map of Describe Document Links associated with EnterpriseData objects.
Supported API: true- Specified by:
getDescribeDocumentLinksin interfaceInfDocumentQueryDelegate- Parameters:
enterpriseDatas- - Set of Enterprise data objects associated with partpart- - The part with which EnterpriseData objects are associated.isEnterpriseDataMergeWithPart- - Flag that indicates whether enterprise data object is rendered in separate element or merged in part eleement. When value is 'true' then enterprise data object will be rendered in separate eleemnt in part group in response file otherwise enterprise data attributes will be merged with part element.- Returns:
- - Map of Document Links associated with EnterpriseData objects.
- Throws:
WTException
-
getCADDocumentLinks
public Map<Object,PartDocInfo> getCADDocumentLinks(Set<ObjectReference> enterpriseDatas, WTPart part, boolean isEnterpriseDataMergeWithPart) throws WTException Returns Map of CAD Document Links associated with EnterpriseData objects.
Supported API: true- Specified by:
getCADDocumentLinksin interfaceInfDocumentQueryDelegate- Parameters:
enterpriseDatas- - Set of Enterprise data objects associated with partpart- - The part with which EnterpriseData objects are associated.isEnterpriseDataMergeWithPart- - Flag that indicates whether enterprise data object is rendered in separate element or merged in part eleement. When value is 'true' then enterprise data object will be rendered in separate eleemnt in part group in response file otherwise enterprise data attributes will be merged with part element.- Returns:
- - The map of Document Links associated with EnterpriseData objects.
- Throws:
WTException
-
isEnterpriseDataMergeWithPart
public boolean isEnterpriseDataMergeWithPart()Lets the caller know if Enterprise Data merge with Part group or not
Returns 'true' when if Enterprise Data is not merge with part
Supported API: true- Specified by:
isEnterpriseDataMergeWithPartin interfaceInfDocumentQueryDelegate- Returns:
- - Returns 'true' if Enterprise Data is not merge with part *
-
setEnterpriseDataMergeWithPart
public void setEnterpriseDataMergeWithPart(boolean isEnterpriseDataMergeWithPart) Sets if enterprise data object is merged with part or rendered separately. Supported API: true- Specified by:
setEnterpriseDataMergeWithPartin interfaceInfDocumentQueryDelegate- Parameters:
isEnterpriseDataMergeWithPart- - When value is 'true' then enterprise data object will be rendered in separate eleemnt in part group in response file otherwise enterprise data attributes will be merged with part element.
-
getTarget
Returns the ESITarget object for the association
Supported API: true- Specified by:
getTargetin interfaceInfDocumentQueryDelegate- Returns:
- ESITarget
-
setTarget
Sets the ESITarget object for the association Supported API: true- Specified by:
setTargetin interfaceInfDocumentQueryDelegate
-
getPrimaryBusinessObject
Gets the value of the attribute primaryBusinessObject. This is the object that was released by the user, or the Change Notice that was automatically associated to the released object when the preference "Automatically Generate Change Notice" has a value "Yes".
Supported API: true- Specified by:
getPrimaryBusinessObjectin interfaceInfDocumentQueryDelegate- Returns:
- A Releasable object that represents the primary business object in the given release.
-
setPrimaryBusinessObject
Sets the attribute primaryBusinessObject to the input object. Supported API: true- Specified by:
setPrimaryBusinessObjectin interfaceInfDocumentQueryDelegate- Parameters:
obj- - Releasable object to set the attribute to.
-