wt.epm.structure
Class AssociatedObjects
java.lang.Object
wt.epm.structure.AssociatedObjects
- public class AssociatedObjects
- extends Object
The AssociatedObjects class finds objects associated with CAD Documents
and Parts and caches the objects it finds.
CAD Documents are associated to WTParts via EPMBuildRule, EPMBuildHistory
and EPMDescribeLink while WT Documents are associated to WTParts via
WTPartDescribeLink.
The default filter in AssociatedObjects is a combination of PreferredSolution and Latest.
The preferred solution is set to
a. Project if the given list contains one or more objects in Project, or
b. PDM if all objects in the given list are in PDM.
As a result, when two or more related objects are found, AssociatedObjects
would return the one in the preferred solution. When none of the related objects
is in the preferred solution, all related objects are returned.
Supported API: false
Extendable: false
Method Summary |
private void |
addAssociations(LinkProxy.Role role,
List buildRules,
EPMCache.VersionCache versionCache)
|
private List |
filterOnLatest(List objects,
boolean keepLatest)
|
private List |
filterProject(Collection objects)
|
private void |
findBuildRuleRelatedObjects(List objects,
LinkProxy.Role otherSideRole)
|
List |
findEPMRelated(Collection objects,
boolean buildOnly)
For all WTParts and EPMDocuments in the given collection, find their
associated EPMDocuments and WTParts. |
private void |
findEPMRelatedObjects(List objects)
|
private void |
findRelatedObjects(List iterations,
Class linkClass,
ConfigSpec configSpec)
|
private void |
findRelatedObjects(List objects,
Class linkClass,
LinkProxy.Role otherSideRole)
|
private void |
findRelatedWTDocuments(List objects)
|
private void |
findWTDocumentsInClassic(List parts)
|
private void |
findWTDocumentsInPDMLink(List parts)
|
private void |
findWTDocumentsInProject(List parts)
|
List |
findWTRelated(Collection objects)
For all WTParts and WTDocuments in the given collection, find their
associated WTDocuments and Parts. |
private void |
findWTRelatedObjects(List objects)
|
private List |
getAssociatedObjects(List associations)
|
private List |
getAssociations(Collection objects,
int type)
|
private ObjectIdentifier |
getObjectId(Persistable object)
|
private void |
setDefaultFilter(Collection objects)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
private AssociatedObjects.AssociationCache cache
objectCache
private EPMCache.ObjectCache objectCache
filter
private EPMFilter filter
useDefaultFilter
private boolean useDefaultFilter
AssociatedObjects
public AssociatedObjects()
AssociatedObjects
public AssociatedObjects(EPMFilter filter)
findEPMRelated
public List findEPMRelated(Collection objects,
boolean buildOnly)
throws WTException
- For all WTParts and EPMDocuments in the given collection, find their
associated EPMDocuments and WTParts. EPMDocuments are associated to
WTParts via EPMBuildRule, EPMBuildHistory and EPMDescribeLink.
Supported API: false
- Returns:
- List of associated WTParts and EPMDocuments
- Throws:
WTException
findWTRelated
public List findWTRelated(Collection objects)
throws WTException
- For all WTParts and WTDocuments in the given collection, find their
associated WTDocuments and Parts. WTDocuments are associated to
WTParts via WTPartDescribeLink.
Supported API: false
- Returns:
- List of associated WTParts and WTDocuments
- Throws:
WTException
getAssociations
private List getAssociations(Collection objects,
int type)
findEPMRelatedObjects
private void findEPMRelatedObjects(List objects)
throws WTException
- Throws:
WTException
findWTRelatedObjects
private void findWTRelatedObjects(List objects)
throws WTException
- Throws:
WTException
findBuildRuleRelatedObjects
private void findBuildRuleRelatedObjects(List objects,
LinkProxy.Role otherSideRole)
throws WTException
- Throws:
WTException
addAssociations
private void addAssociations(LinkProxy.Role role,
List buildRules,
EPMCache.VersionCache versionCache)
throws WTException
- Throws:
WTException
findRelatedObjects
private void findRelatedObjects(List objects,
Class linkClass,
LinkProxy.Role otherSideRole)
throws WTException
- Throws:
WTException
findRelatedWTDocuments
private void findRelatedWTDocuments(List objects)
throws WTException
- Throws:
WTException
findRelatedObjects
private void findRelatedObjects(List iterations,
Class linkClass,
ConfigSpec configSpec)
throws WTException
- Throws:
WTException
findWTDocumentsInPDMLink
private void findWTDocumentsInPDMLink(List parts)
throws WTException
- Throws:
WTException
findWTDocumentsInProject
private void findWTDocumentsInProject(List parts)
throws WTException
- Throws:
WTException
findWTDocumentsInClassic
private void findWTDocumentsInClassic(List parts)
throws WTException
- Throws:
WTException
filterOnLatest
private List filterOnLatest(List objects,
boolean keepLatest)
throws WTException
- Throws:
WTException
getAssociatedObjects
private List getAssociatedObjects(List associations)
throws WTException
- Throws:
WTException
getObjectId
private ObjectIdentifier getObjectId(Persistable object)
setDefaultFilter
private void setDefaultFilter(Collection objects)
throws WTException
- Throws:
WTException
filterProject
private List filterProject(Collection objects)
throws WTException
- Throws:
WTException