com.ptc.windchill.uwgm.common.autoassociate
Class AssociationUtilities

java.lang.Object
  extended bycom.ptc.windchill.uwgm.common.autoassociate.AssociationUtilities

public class AssociationUtilities
extends Object

Misc EPMDoc<->WTPart association utilities


Field Summary
private static Log log
          logging
private static Class[] SEED_CLASSES
           
 
Constructor Summary
AssociationUtilities()
           
 
Method Summary
static WTKeyedMap getAssociatedMap(WTCollection seeds, boolean includePassive, EPMWorkspace ws, boolean onlyFromWorkspace, boolean processSeedsFromWorkspace)
          returns WTKeyedMap of associated with the given collection of seeds and workspace, where a key is a seed which has the associated, a value is WTCollection of its associated
static ResultGraph getAssociatedResultGraph(WTCollection seeds, boolean includePassive, EPMWorkspace ws, boolean onlyFromWorkspace, boolean processSeedsFromWorkspace)
          returns ResultGraph of associated with the given seeds and workspace
static ResultGraph getAssociatedWithWorkspaceResultGraph(WTCollection seeds, boolean includePassive, EPMWorkspace ws)
          returns ResultGraph of associated with the given seeds and workspace
static WTCollection getAssociatedWTParts(WTCollection epmDocuments, boolean includePassive)
          returns WTCollection of WTPart associated with collection of EPMDocuments
static WTCollection getAssociatedWTParts(WTCollection epmDocuments, boolean includePassive, EPMWorkspace ws, boolean onlyFromWorkspace, boolean processSeedsFromWorkspace)
          returns WTCollection of WTPart associated with collection of EPMDocuments
static WTCollection getAssociatedWTPartsFromWorkspace(WTCollection epmDocuments, boolean includePassive, EPMWorkspace ws)
          returns WTCollection of WTPart from the given workspace associated with collection of EPMDocuments
static ResultGraph getRawAssociatedResultGraph(WTCollection seeds, boolean includePassive, EPMWorkspace ws, boolean onlyFromWorkspace, boolean processSeedsFromWorkspace)
          Returns ResultGraph of associated with the given seeds and workspace.
private static EPMRetrieverCache retrieveAssociated(WTCollection seeds, boolean includePassive, EPMWorkspace ws, boolean onlyFromWorkspace, boolean processSeedsFromWorkspace)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SEED_CLASSES

private static final Class[] SEED_CLASSES

log

private static Log log
logging

Constructor Detail

AssociationUtilities

public AssociationUtilities()
Method Detail

getAssociatedWTParts

public static WTCollection getAssociatedWTParts(WTCollection epmDocuments,
                                                boolean includePassive)
                                         throws WTException
returns WTCollection of WTPart associated with collection of EPMDocuments

Parameters:
epmDocuments - WTCollection
includePassive - boolean
Returns:
WTCollection
Throws:
WTException

getAssociatedWTPartsFromWorkspace

public static WTCollection getAssociatedWTPartsFromWorkspace(WTCollection epmDocuments,
                                                             boolean includePassive,
                                                             EPMWorkspace ws)
                                                      throws WTException
returns WTCollection of WTPart from the given workspace associated with collection of EPMDocuments

Parameters:
epmDocuments - WTCollection
includePassive - boolean
ws - EPMWorkspace
Returns:
WTCollection
Throws:
WTException

getAssociatedWTParts

public static WTCollection getAssociatedWTParts(WTCollection epmDocuments,
                                                boolean includePassive,
                                                EPMWorkspace ws,
                                                boolean onlyFromWorkspace,
                                                boolean processSeedsFromWorkspace)
                                         throws WTException
returns WTCollection of WTPart associated with collection of EPMDocuments

Parameters:
epmDocuments - WTCollection
includePassive - boolean
ws - EPMWorkspace
onlyFromWorkspace - boolean
processSeedsFromWorkspace - boolean
Returns:
WTCollection
Throws:
WTException

getAssociatedWithWorkspaceResultGraph

public static ResultGraph getAssociatedWithWorkspaceResultGraph(WTCollection seeds,
                                                                boolean includePassive,
                                                                EPMWorkspace ws)
                                                         throws WTException
returns ResultGraph of associated with the given seeds and workspace

Parameters:
seeds - WTCollection
includePassive - boolean
ws - EPMWorkspace
Returns:
ResultGraph
Throws:
WTException

getAssociatedResultGraph

public static ResultGraph getAssociatedResultGraph(WTCollection seeds,
                                                   boolean includePassive,
                                                   EPMWorkspace ws,
                                                   boolean onlyFromWorkspace,
                                                   boolean processSeedsFromWorkspace)
                                            throws WTException
returns ResultGraph of associated with the given seeds and workspace

Parameters:
seeds - WTCollection
includePassive - boolean
ws - EPMWorkspace
onlyFromWorkspace - boolean
processSeedsFromWorkspace - boolean
Returns:
ResultGraph
Throws:
WTException

getRawAssociatedResultGraph

public static ResultGraph getRawAssociatedResultGraph(WTCollection seeds,
                                                      boolean includePassive,
                                                      EPMWorkspace ws,
                                                      boolean onlyFromWorkspace,
                                                      boolean processSeedsFromWorkspace)
                                               throws WTException
Returns ResultGraph of associated with the given seeds and workspace. DependencyRetrieverHelper is fairly smart trying to associate together seed objects of different versions. This method prevents such behavior by issuing two separate requests for EPMDocs and WTParts respectively and merging the results.

For example, if seeds collection contains EPMDoc A.2 and WTPart A.1, this method will return two links: EPMDoc A.2 --- WTPart A.2 EPMDoc A.1 --- WTPart A.1 instead of linking seeds EPMDoc A.2 and WTPart A.1 together.

Parameters:
seeds - WTCollection of EPMDocuments and WTParts.
includePassive - boolean
ws - Current EPMWorkspace
onlyFromWorkspace - All seeds are from given workspace?
processSeedsFromWorkspace - boolean
Returns:
ResultGraph
Throws:
WTException

getAssociatedMap

public static WTKeyedMap getAssociatedMap(WTCollection seeds,
                                          boolean includePassive,
                                          EPMWorkspace ws,
                                          boolean onlyFromWorkspace,
                                          boolean processSeedsFromWorkspace)
                                   throws WTException
returns WTKeyedMap of associated with the given collection of seeds and workspace, where a key is a seed which has the associated, a value is WTCollection of its associated

Parameters:
seeds - WTCollection
includePassive - boolean
ws - EPMWorkspace
onlyFromWorkspace - boolean
processSeedsFromWorkspace - boolean
Returns:
WTKeyedMap
Throws:
WTException

retrieveAssociated

private static EPMRetrieverCache retrieveAssociated(WTCollection seeds,
                                                    boolean includePassive,
                                                    EPMWorkspace ws,
                                                    boolean onlyFromWorkspace,
                                                    boolean processSeedsFromWorkspace)
                                             throws WTException
Throws:
WTException