wt.epm.structure
Class RelatedDrawings

java.lang.Object
  extended bywt.epm.structure.RelatedDrawings
All Implemented Interfaces:
Serializable

public class RelatedDrawings
extends Object
implements Serializable

The RelatedDrawings is a class that finds the CAD drawings related to a given collection of CAD documents.

Supported API: false

Extendable: false

See Also:
Serialized Form

Nested Class Summary
static class RelatedDrawings.Rule
           
 
Field Summary
private  EPMCache.IterationCache drawingCache
           
private  EPMCache.ObjectCache drawingObjectCache
           
private  HashMap modelsToDrawings
           
private  RelatedDrawings.Rule rule
           
 
Constructor Summary
RelatedDrawings(ConfigSpec configSpec)
           
RelatedDrawings(RelatedDrawings.Rule rule)
           
 
Method Summary
private  void add(EPMDocument document, Persistable drawing)
           
private  List filterOnDrawings(List referencesTo)
           
 List find(Collection documents)
          Finds all of the related CAD drawings for the CAD documents in the given collection.
private  void findAsStoredDrawings(List documents)
          Finds the related drawings for the given documents.
private  List findAsStoredReferencesTo(List documents)
           
private  void findMissingAssociation(Map documentMap, Map drawingMasterMap, List links, List asStoredLinks)
          Adds a list of missing association to the cache.
private  List findReferencedBy(List documents)
           
private  void findRelatedDrawings(List documents)
           
private  List getDrawings(Collection documents)
           
private  Set getMasterIds(Collection iterationIds, Map masterMap)
           
private  ObjectIdentifier getObjectId(Persistable object)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelsToDrawings

private HashMap modelsToDrawings

rule

private RelatedDrawings.Rule rule

drawingCache

private EPMCache.IterationCache drawingCache

drawingObjectCache

private EPMCache.ObjectCache drawingObjectCache
Constructor Detail

RelatedDrawings

public RelatedDrawings(ConfigSpec configSpec)

RelatedDrawings

public RelatedDrawings(RelatedDrawings.Rule rule)
Method Detail

find

public List find(Collection documents)
          throws WTException
Finds all of the related CAD drawings for the CAD documents in the given collection.

Supported API: false

Returns:
List of related CAD drawings
Throws:
WTException

getDrawings

private List getDrawings(Collection documents)
                  throws WTException
Throws:
WTException

add

private void add(EPMDocument document,
                 Persistable drawing)

findRelatedDrawings

private void findRelatedDrawings(List documents)
                          throws WTException
Throws:
WTException

findAsStoredDrawings

private void findAsStoredDrawings(List documents)
                           throws WTException
Finds the related drawings for the given documents. For models that are not in the cache already, finds the appropriate drawings from the database and caches them. Please note that it's not a valid use case to have more than one model of the same master passed to documents.

Throws:
WTException

findReferencedBy

private List findReferencedBy(List documents)
                       throws WTException
Throws:
WTException

filterOnDrawings

private List filterOnDrawings(List referencesTo)
                       throws WTException
Throws:
WTException

getObjectId

private ObjectIdentifier getObjectId(Persistable object)

findAsStoredReferencesTo

private List findAsStoredReferencesTo(List documents)
                               throws WTException
Throws:
WTException

findMissingAssociation

private void findMissingAssociation(Map documentMap,
                                    Map drawingMasterMap,
                                    List links,
                                    List asStoredLinks)
                             throws WTException
Adds a list of missing association to the cache. Missing association is the links between the master of Role A and Role B in LinkProxy.

Throws:
WTException

getMasterIds

private Set getMasterIds(Collection iterationIds,
                         Map masterMap)
                  throws WTException
Throws:
WTException