com.ptc.windchill.cadx.common.util
Class ObjectDependencyUtility

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.util.ObjectDependencyUtility

public class ObjectDependencyUtility
extends Object



Supported API: false

Extendable: false


Field Summary
static int ASSOC_OPTIONAL_DEPENDENT
           
static int ASSOC_REQUIRED_DEPENDENT
           
static int ASSOC_SELECTED
           
private static int CHUNK_SIZE
           
private static String CLASSNAME
           
static String CRITERIA_ADD
           
static String CRITERIA_NONE
           
static String CRITERIA_REMOVE
           
static Comparator DOCUMENT_NUMBER_COMPARATOR
           
private static int ND_DEP_T_EXTRASSY_COMP
           
private static int ND_DEP_T_EXTRASSY_PARTL_COMP
           
static int OPTIONAL_DEPENDENT
           
static Comparator PERSISTABLE_COMPARATOR
           
static int REQUIRED_DEPENDENT
           
private static String RESOURCE
           
static int SELECTED
           
private static boolean VERBOSE
           
 
Constructor Summary
ObjectDependencyUtility()
           
 
Method Summary
private static void addAssociatedDocs(EPMDocument[] assocDocs, Set[] objectSets, Set targetSet)
           
private static void addAssociatedParts(WTPart[] assocParts, Set[] objectSets, Set targetSet)
           
private static void addFamilyInstancesToInstanceSet(EPMDocument genericDoc, EPMDocument instanceDoc, ConfigSpec docConfigSpec, Set selectedAndDependentsSet, Set instanceSet, Set excludeSet, Set[] objectSets, boolean includeAssociated, ConfigSpec partConfigSpec, boolean isPartCentric)
           
private static void addObjectToSet(Object[] assocParts, Set[] objectSets, Set targetSet)
           
private static boolean canObjectBeRefreshed(Workable workable, EPMWorkspace workspace, ConfigSpec configSpec)
           
private static boolean contains(Vector dataHolderVector, Workable object)
           
static ArrayList filterObjects(List objects, Class classToKeep)
           
static WTPart[] getActiveAssociated(EPMDocument source)
           
static EPMDocument[] getActiveAssociated(WTPart target)
           
static Vector getActiveAssociatedDocsAndPartsWithParent(List selected)
           
static List[] getAllInstances(List selected, boolean includeAssociated, List dependents, List excludeObjects, ConfigSpec configSpec, boolean includeInstances, String criteria, boolean isCheckoutMetadata)
          Given an list of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns an array of lists.
static List[] getAllInstances(List selected, boolean includeAssociated, List dependents, List excludeObjects, ConfigSpec docConfigSpec, boolean includeInstances, String criteria, boolean isCheckoutMetadata, ConfigSpec partConfigSpec, boolean isPartCentric)
           
static List[] getAllInstances(Object[] selected, boolean includeAssociated, List dependents, List excludeObjects, ConfigSpec configSpec, boolean includeInstances, String criteria, boolean isCheckoutMetadata)
          Given an array of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns an array of lists.
static List[] getAllInstances(Object[] selected, boolean includeAssociated, List dependents, List excludeObjects, ConfigSpec docConfigSpec, boolean includeInstances, String criteria, boolean isCheckoutMetadata, ConfigSpec partConfigSpec, boolean isPartCentric)
           
static Vector getAllInstancesWithParent(List selected, boolean includeAssociated, List dependents, ConfigSpec configSpec, boolean includeInstances)
          Given an list of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns a Vector of Vectors.
static WTPart[] getAssociated(EPMDocument source)
          

Supported API: false
static EPMDocument[] getAssociated(WTPart target)
          

Supported API: false
static Object[] getAssociatedDocsAndParts(List selected)
          

Supported API: false
static Object[] getAssociatedDocsAndParts(Object[] selectedObj)
          

Supported API: false
static Vector getAssociatedDocsAndPartsWithParent(List selected)
          

Supported API: false
static EPMWorkspace getCheckoutWorkspace(Workable target)
          

Supported API: false
static EPMDocument[] getCompatibleFamilyInstances(EPMDocument genericDoc, ConfigSpec partConfigSpec, ConfigSpec docConfigSpec, boolean isPartCentric)
           
static EPMDocument[] getCompatibleFamilyInstances(EPMDocument genericDoc, ConfigSpec partConfigSpec, ConfigSpec docConfigSpec, boolean isPartCentric, WTContainer container)
          Obtains all the family instances for the given generic document, filtered using configSpec.
private static void getDependentsOfExternalSiplifiedReps(EPMWorkspace ws, ArrayList externSimpRepsToAdd, ArrayList toAddNonRecursively, ArrayList toAddRecursively, ConfigSpec docConfigSpec)
           
static EPMReferenceLink getEPMReferenceLink(EPMDocument srcDoc)
           
static EPMDocument[] getFamilyInstances(EPMDocument genericDoc, ConfigSpec configSpec)
           
static EPMDocument[] getFamilyInstances(EPMDocument genericDoc, ConfigSpec docConfigSpec, ConfigSpec partConfigSpec, boolean isPartCentric)
          Obtains all the family instances for the given generic document, filtered using configSpec.
protected static void getFilteredIterations(Class iterCl, List masters, ConfigSpec cs, Map filteredIters)
           
static Map getGenericDocumentsForInstances(List selected, ConfigSpec configSpec)
          Given a List containing selected objects this method returns a map containing instance documents from the array mapped against their corresponding generics.
static Map getGenericDocumentsForInstances(Object[] selected, ConfigSpec configSpec)
          Given an array containing selected objects this method returns a map containing instance documents from the array mapped against their corresponding generics.
private static String getKey(Object obj)
           
static QueryResult getMasters(QueryResult qr)
           
static Object[] getOptionalDependents(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List associatedObjects, List requiredDependentObjects)
          

Supported API: false
static Object[] getOptionalDependents(Object[] selectedObj, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List associatedObjects, List requiredDependentObjects)
          

Supported API: false
static Vector getOptionalDependentsWithParent(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List associatedObjects, List requiredDependentObjects)
          

Supported API: false
private static ArrayList getPartCentricAssocPartsAndDocs(ArrayList docs, ConfigSpec partConfigSpec, ArrayList partsToBeProcessed, ArrayList partsNotToBeProcessed)
           
static Object[] getPartCentricDependents(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, WTPartConfigSpec partConfigSpec, boolean includeAssociated)
           
static Map getPartCentricRefreshedObjects(List objectList, ConfigSpec partConfigSpec, ConfigSpec docConfigSpec, EPMWorkspace workspace)
           
static Vector getPartCentricRequiredDependentsWithParent(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated, WTPartConfigSpec partConfigSpec)
           
private static QueryResult getPartsAndDocs(EPMWorkspace workspace, EPMPopulateRule rule, List selected, EPMDocConfigSpec docConfigSpec, WTPartConfigSpec partConfigSpec)
           
private static QueryResult getPartsAndDocs(EPMWorkspace workspace, EPMPopulateRule rule, WTPart part, EPMDocConfigSpec docConfigSpec, WTPartConfigSpec partConfigSpec)
           
static WTPart[] getPassiveAssociated(EPMDocument source)
           
static EPMDocument[] getPassiveAssociated(WTPart target)
           
static Vector getPassiveAssociatedDocsAndPartsWithParent(List selected)
           
static Enumeration getReferedDocuments(EPMDocument a_Doc, ConfigSpec a_ConfigSpec)
          This method returns the documents refered by a drawing.
static Collection getRefreshedObjects(Collection objectsToBeRefreshed, ConfigSpec docConfigSpec, ConfigSpec partConfigSpec)
           
private static Map getRefreshedObjects(List objectList, ConfigSpec partConfigSpec, ConfigSpec docConfigSpec, EPMWorkspace workspace)
           
static boolean[] getRefreshedObjects(Object[] objectsToBeRefreshed, ConfigSpec docConfigSpec, ConfigSpec partConfigSpec)
           
static Map getRefreshedObjects(Object[] objectsToBeRefreshed, EPMWorkspace workspace, ConfigSpec docConfigSpec, ConfigSpec partConfigSpec)
          

Supported API: false
static Object[] getRelatedDrawings(List selected, boolean includeAssociated, List associatedObjects, List allDependents, ConfigSpec configSpec)
          

Supported API: false
static Object[] getRelatedDrawings(List selected, List associatedObjects, List oldDrawings, boolean includeAssociated, ConfigSpec configSpec)
          

Supported API: false
static Object[] getRelatedDrawings(List selected, List associatedObjects, List oldDrawings, boolean includeAssociated, ConfigSpec docConfigSpec, ConfigSpec partConfigSpec, boolean partCentric)
           
static Object[] getRelatedDrawings(Object[] selectedObj, boolean includeAssociated, List associatedObjects, List allDependents, ConfigSpec configSpec)
          

Supported API: false
static Vector getRelatedDrawingsWithParent(List selected, boolean includeAssociated, List allDependents, ConfigSpec configSpec)
          

Supported API: false
private static QueryResult getRelatedItems(EPMWorkspace workspace, EPMPopulateRule rule, EPMDocument object, EPMDocConfigSpec docConfigSpec)
           
private static QueryResult getRelatedItems(EPMWorkspace workspace, EPMPopulateRule rule, List selected, EPMDocConfigSpec docConfigSpec)
           
static Object[] getRequiredDependents(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated, List associatedObjects)
          

Supported API: false
static Object[] getRequiredDependents(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated, List associatedObjects, boolean includeRequiredGenerics)
           
static Object[] getRequiredDependents(Object[] selectedObj, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated, List associatedObjects)
          

Supported API: false
static Object[] getRequiredDependents(Object[] selectedObj, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated, List associatedObjects, boolean includeRequiredGenerics)
           
static Vector getRequiredDependentsWithParent(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, boolean includeAssociated)
          

Supported API: false
static Enumeration getRequiredReferedDocuments(EPMDocument a_Doc, ConfigSpec a_ConfigSpec)
          This method returns only the required documents refered by a drawing.
static Object[] getSecondaryDependents(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List associatedObjects, List requiredDependentObjects, List optionalDependentObjects, List drawingObjects)
          

Supported API: false
static Object[] getSecondaryDependents(Object[] selectedObj, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List associatedObjects, List requiredDependentObjects, List optionalDependentObjects, List drawingObjects)
          

Supported API: false
static Vector getSecondaryDependentsWithParent(List selected, EPMWorkspace workspace, EPMDocConfigSpec docConfigSpec, EPMPopulateRule rule, boolean includeAssociated, List drawingObjects)
          

Supported API: false
static Vector getUsedByWithParent(List selected, boolean includeAssociated, List allDependents, ConfigSpec configSpec)
           
static Workable getWorkspaceCopy(Workable inWorkable, EPMWorkspace workspace)
           
static Vector getWTDocumentsWithParent(List selected, List associated, boolean includeAssociated)
          

Supported API: false
private static boolean isAnyVersionCheckedOutByUser(RevisionControlled revisionControlled, ConfigSpec configSpec)
           
static boolean isCheckedOut(Workable object)
          

Supported API: false
static boolean isCheckedOut(Workable object, EPMWorkspace workspace)
          

Supported API: false
static boolean isCheckedOutToCurrentUser(Workable workable)
          

Supported API: false
private static boolean isLatestConfigSpec(ConfigSpec configSpec)
           
private static boolean setArrayContainsObject(Object obj, Set[] objectSets)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

PERSISTABLE_COMPARATOR

public static final Comparator PERSISTABLE_COMPARATOR

DOCUMENT_NUMBER_COMPARATOR

public static final Comparator DOCUMENT_NUMBER_COMPARATOR

CRITERIA_ADD

public static final String CRITERIA_ADD
See Also:
Constant Field Values

CRITERIA_REMOVE

public static final String CRITERIA_REMOVE
See Also:
Constant Field Values

CRITERIA_NONE

public static final String CRITERIA_NONE
See Also:
Constant Field Values

ND_DEP_T_EXTRASSY_COMP

private static final int ND_DEP_T_EXTRASSY_COMP
See Also:
Constant Field Values

ND_DEP_T_EXTRASSY_PARTL_COMP

private static final int ND_DEP_T_EXTRASSY_PARTL_COMP
See Also:
Constant Field Values

SELECTED

public static final int SELECTED
See Also:
Constant Field Values

ASSOC_REQUIRED_DEPENDENT

public static final int ASSOC_REQUIRED_DEPENDENT
See Also:
Constant Field Values

ASSOC_SELECTED

public static final int ASSOC_SELECTED
See Also:
Constant Field Values

ASSOC_OPTIONAL_DEPENDENT

public static final int ASSOC_OPTIONAL_DEPENDENT
See Also:
Constant Field Values

REQUIRED_DEPENDENT

public static final int REQUIRED_DEPENDENT
See Also:
Constant Field Values

OPTIONAL_DEPENDENT

public static final int OPTIONAL_DEPENDENT
See Also:
Constant Field Values

CHUNK_SIZE

private static int CHUNK_SIZE

VERBOSE

private static boolean VERBOSE
Constructor Detail

ObjectDependencyUtility

public ObjectDependencyUtility()
Method Detail

getAssociatedDocsAndParts

public static Object[] getAssociatedDocsAndParts(Object[] selectedObj)
                                          throws WTException


Supported API: false

Parameters:
selectedObj -
Returns:
Object[]
Throws:
WTException

getAssociatedDocsAndParts

public static Object[] getAssociatedDocsAndParts(List selected)
                                          throws WTException


Supported API: false

Parameters:
selected -
Returns:
Object[]
Throws:
WTException

getAssociatedDocsAndPartsWithParent

public static Vector getAssociatedDocsAndPartsWithParent(List selected)
                                                  throws WTException


Supported API: false

Parameters:
selected -
Returns:
Vector
Throws:
WTException

getRelatedDrawings

public static Object[] getRelatedDrawings(Object[] selectedObj,
                                          boolean includeAssociated,
                                          List associatedObjects,
                                          List allDependents,
                                          ConfigSpec configSpec)
                                   throws WTException


Supported API: false

Parameters:
selectedObj -
includeAssociated -
associatedObjects -
allDependents -
configSpec -
Returns:
Object[]
Throws:
WTException

getRelatedDrawings

public static Object[] getRelatedDrawings(List selected,
                                          boolean includeAssociated,
                                          List associatedObjects,
                                          List allDependents,
                                          ConfigSpec configSpec)
                                   throws WTException


Supported API: false

Parameters:
selected -
includeAssociated -
associatedObjects -
allDependents -
configSpec -
Returns:
Object[]
Throws:
WTException

getRelatedDrawingsWithParent

public static Vector getRelatedDrawingsWithParent(List selected,
                                                  boolean includeAssociated,
                                                  List allDependents,
                                                  ConfigSpec configSpec)
                                           throws WTException


Supported API: false

Parameters:
selected -
includeAssociated -
allDependents -
configSpec -
Returns:
Vector
Throws:
WTException

getRequiredDependents

public static Object[] getRequiredDependents(Object[] selectedObj,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             boolean includeAssociated,
                                             List associatedObjects)
                                      throws WTException,
                                             WTPropertyVetoException


Supported API: false

Parameters:
selectedObj -
workspace -
docConfigSpec -
includeAssociated -
associatedObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getRequiredDependents

public static Object[] getRequiredDependents(List selected,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             boolean includeAssociated,
                                             List associatedObjects)
                                      throws WTException,
                                             WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
includeAssociated -
associatedObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getRequiredDependentsWithParent

public static Vector getRequiredDependentsWithParent(List selected,
                                                     EPMWorkspace workspace,
                                                     EPMDocConfigSpec docConfigSpec,
                                                     boolean includeAssociated)
                                              throws WTException,
                                                     WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
includeAssociated -
Returns:
Vector
Throws:
WTException
WTPropertyVetoException

getOptionalDependents

public static Object[] getOptionalDependents(Object[] selectedObj,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             EPMPopulateRule rule,
                                             boolean includeAssociated,
                                             List associatedObjects,
                                             List requiredDependentObjects)
                                      throws WTException,
                                             WTPropertyVetoException


Supported API: false

Parameters:
selectedObj -
workspace -
docConfigSpec -
rule -
includeAssociated -
associatedObjects -
requiredDependentObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getOptionalDependents

public static Object[] getOptionalDependents(List selected,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             EPMPopulateRule rule,
                                             boolean includeAssociated,
                                             List associatedObjects,
                                             List requiredDependentObjects)
                                      throws WTException,
                                             WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
rule -
includeAssociated -
associatedObjects -
requiredDependentObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getOptionalDependentsWithParent

public static Vector getOptionalDependentsWithParent(List selected,
                                                     EPMWorkspace workspace,
                                                     EPMDocConfigSpec docConfigSpec,
                                                     EPMPopulateRule rule,
                                                     boolean includeAssociated,
                                                     List associatedObjects,
                                                     List requiredDependentObjects)
                                              throws WTException,
                                                     WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
rule -
includeAssociated -
associatedObjects -
requiredDependentObjects -
Returns:
Vector
Throws:
WTException
WTPropertyVetoException

getSecondaryDependents

public static Object[] getSecondaryDependents(Object[] selectedObj,
                                              EPMWorkspace workspace,
                                              EPMDocConfigSpec docConfigSpec,
                                              EPMPopulateRule rule,
                                              boolean includeAssociated,
                                              List associatedObjects,
                                              List requiredDependentObjects,
                                              List optionalDependentObjects,
                                              List drawingObjects)
                                       throws WTException,
                                              WTPropertyVetoException


Supported API: false

Parameters:
selectedObj -
workspace -
docConfigSpec -
rule -
includeAssociated -
associatedObjects -
requiredDependentObjects -
optionalDependentObjects -
drawingObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getSecondaryDependents

public static Object[] getSecondaryDependents(List selected,
                                              EPMWorkspace workspace,
                                              EPMDocConfigSpec docConfigSpec,
                                              EPMPopulateRule rule,
                                              boolean includeAssociated,
                                              List associatedObjects,
                                              List requiredDependentObjects,
                                              List optionalDependentObjects,
                                              List drawingObjects)
                                       throws WTException,
                                              WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
rule -
includeAssociated -
associatedObjects -
requiredDependentObjects -
optionalDependentObjects -
drawingObjects -
Returns:
Object[]
Throws:
WTException
WTPropertyVetoException

getSecondaryDependentsWithParent

public static Vector getSecondaryDependentsWithParent(List selected,
                                                      EPMWorkspace workspace,
                                                      EPMDocConfigSpec docConfigSpec,
                                                      EPMPopulateRule rule,
                                                      boolean includeAssociated,
                                                      List drawingObjects)
                                               throws WTException,
                                                      WTPropertyVetoException


Supported API: false

Parameters:
selected -
workspace -
docConfigSpec -
rule -
includeAssociated -
drawingObjects -
Returns:
Vector
Throws:
WTException
WTPropertyVetoException

getRefreshedObjects

public static Map getRefreshedObjects(Object[] objectsToBeRefreshed,
                                      EPMWorkspace workspace,
                                      ConfigSpec docConfigSpec,
                                      ConfigSpec partConfigSpec)
                               throws WTException,
                                      WTPropertyVetoException


Supported API: false

Parameters:
objectsToBeRefreshed -
workspace -
docConfigSpec -
partConfigSpec -
Returns:
Map
Throws:
WTException
WTPropertyVetoException

getAssociated

public static WTPart[] getAssociated(EPMDocument source)
                              throws WTException


Supported API: false

Parameters:
source -
Returns:
WTPart[]
Throws:
WTException

getAssociated

public static EPMDocument[] getAssociated(WTPart target)
                                   throws WTException


Supported API: false

Parameters:
target -
Returns:
EPMDocument[]
Throws:
WTException

isCheckedOut

public static boolean isCheckedOut(Workable object,
                                   EPMWorkspace workspace)
                            throws WTException


Supported API: false

Parameters:
object -
workspace -
Returns:
boolean
Throws:
WTException

isCheckedOut

public static boolean isCheckedOut(Workable object)
                            throws WTException


Supported API: false

Parameters:
object -
Returns:
boolean
Throws:
WTException

getCheckoutWorkspace

public static EPMWorkspace getCheckoutWorkspace(Workable target)
                                         throws WTException


Supported API: false

Parameters:
target -
Returns:
EPMWorkspace
Throws:
WTException

isCheckedOutToCurrentUser

public static boolean isCheckedOutToCurrentUser(Workable workable)
                                         throws WTException


Supported API: false

Parameters:
workable -
Returns:
boolean
Throws:
WTException

getReferedDocuments

public static Enumeration getReferedDocuments(EPMDocument a_Doc,
                                              ConfigSpec a_ConfigSpec)
This method returns the documents refered by a drawing. If the config spec passed to this method is null, LatestConfigSpec will be used to retrive the refered documents.

Supported API: false

Parameters:
a_Doc -
a_ConfigSpec -
Returns:
Enumeration

getAllInstances

public static List[] getAllInstances(Object[] selected,
                                     boolean includeAssociated,
                                     List dependents,
                                     List excludeObjects,
                                     ConfigSpec configSpec,
                                     boolean includeInstances,
                                     String criteria,
                                     boolean isCheckoutMetadata)
                              throws WTException
Given an array of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns an array of lists. The first element of the array contains the list of generic documents and if the includeInstances flag is true, the second element contains the list of family instances of these generic documents which do not already appear in the list of selected, dependent and exclude objects. If criteria is CRITERIA_ADD, both generic and family instances are returned for only instances and nothing for generic documents. On the other hand if criteria is CRITERIA_REMOVE, nothing is added for instances and all family instances for generics. If criteria is CRITERIA_NONE, no dependency processing is done in this method. In addition if the isCheckoutMetadata parameter is true, no generic documents will be included for instances.

Supported API: false

Parameters:
selected - The list of objects selected from workspace browser(WB) or selection dialog(SD)
includeAssociated - Includes associated documents or parts
dependents - List of all dependents (associated, required, optional, drawing, secondary and instances)
excludeObjects - List of objects (other than select and dependents) that are to be excluded from return list
configSpec - Config spec used to filter out documents
includeInstances - Includes instances
criteria - Indicates whether objects are to be added to workspace or removed
isCheckoutMetadata - Indicates whether the user launched Checkout Metadata operation
Returns:
List[]
Throws:
WTException

getAllInstances

public static List[] getAllInstances(List selected,
                                     boolean includeAssociated,
                                     List dependents,
                                     List excludeObjects,
                                     ConfigSpec configSpec,
                                     boolean includeInstances,
                                     String criteria,
                                     boolean isCheckoutMetadata)
                              throws WTException
Given an list of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns an array of lists. The first element of the array contains the list of generic documents and if the includeInstances flag is true, the second element contains the list of family instances of these generic documents which do not already appear in the list of selected, dependent and exclude objects. If criteria is CRITERIA_ADD, both generic and family instances are returned for only instances and nothing for generic documents. On the other hand if criteria is CRITERIA_REMOVE, nothing is added for instances and all family instances for generics. If criteria is CRITERIA_NONE, no dependency processing is done in this method. In addition if the isCheckoutMetadata parameter is true, no generic documents will be included for instances.

Supported API: false

Parameters:
selected - The list of objects selected from workspace browser(WB) or selection dialog(SD)
includeAssociated - Includes associated documents or parts
dependents - List of all dependents (associated, required, optional, drawing, secondary and instances)
excludeObjects - List of objects (other than select and dependents) that are to be excluded from return list
configSpec - Config spec used to filter out documents
includeInstances - Includes instances
criteria - Indicates whether objects are to be added to workspace or removed
isCheckoutMetadata - Indicates whether the user launched Checkout Metadata operation
Returns:
List[]
Throws:
WTException

getGenericDocumentsForInstances

public static Map getGenericDocumentsForInstances(Object[] selected,
                                                  ConfigSpec configSpec)
                                           throws WTException
Given an array containing selected objects this method returns a map containing instance documents from the array mapped against their corresponding generics. The input config spec is used to filter out the appropriate version of generic.

Supported API: false

Parameters:
selected - The array of objects selected from workspace browser(WB) or selection dialog(SD)
configSpec - Config spec used to filter out documents
Returns:
Map
Throws:
WTException

getGenericDocumentsForInstances

public static Map getGenericDocumentsForInstances(List selected,
                                                  ConfigSpec configSpec)
                                           throws WTException
Given a List containing selected objects this method returns a map containing instance documents from the array mapped against their corresponding generics. The input config spec is used to filter out the appropriate version of generic.

Supported API: false

Parameters:
selected - The array of objects selected from workspace browser(WB) or selection dialog(SD)
configSpec - Config spec used to filter out documents
Returns:
Map
Throws:
WTException

getRelatedDrawings

public static Object[] getRelatedDrawings(List selected,
                                          List associatedObjects,
                                          List oldDrawings,
                                          boolean includeAssociated,
                                          ConfigSpec configSpec)
                                   throws WTException


Supported API: false

Parameters:
selected -
associatedObjects -
oldDrawings -
includeAssociated -
configSpec -
Returns:
Object[]
Throws:
WTException

getWTDocumentsWithParent

public static Vector getWTDocumentsWithParent(List selected,
                                              List associated,
                                              boolean includeAssociated)
                                       throws WTException


Supported API: false

Parameters:
selected -
associated -
includeAssociated -
Returns:
Vector
Throws:
WTException

getRefreshedObjects

private static Map getRefreshedObjects(List objectList,
                                       ConfigSpec partConfigSpec,
                                       ConfigSpec docConfigSpec,
                                       EPMWorkspace workspace)
                                throws WTException,
                                       WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

contains

private static boolean contains(Vector dataHolderVector,
                                Workable object)

addAssociatedDocs

private static void addAssociatedDocs(EPMDocument[] assocDocs,
                                      Set[] objectSets,
                                      Set targetSet)
                               throws WTException
Throws:
WTException

addAssociatedParts

private static void addAssociatedParts(WTPart[] assocParts,
                                       Set[] objectSets,
                                       Set targetSet)

getRelatedItems

private static QueryResult getRelatedItems(EPMWorkspace workspace,
                                           EPMPopulateRule rule,
                                           EPMDocument object,
                                           EPMDocConfigSpec docConfigSpec)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getRelatedItems

private static QueryResult getRelatedItems(EPMWorkspace workspace,
                                           EPMPopulateRule rule,
                                           List selected,
                                           EPMDocConfigSpec docConfigSpec)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getPartsAndDocs

private static QueryResult getPartsAndDocs(EPMWorkspace workspace,
                                           EPMPopulateRule rule,
                                           List selected,
                                           EPMDocConfigSpec docConfigSpec,
                                           WTPartConfigSpec partConfigSpec)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getPartsAndDocs

private static QueryResult getPartsAndDocs(EPMWorkspace workspace,
                                           EPMPopulateRule rule,
                                           WTPart part,
                                           EPMDocConfigSpec docConfigSpec,
                                           WTPartConfigSpec partConfigSpec)
                                    throws WTException,
                                           WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getWorkspaceCopy

public static Workable getWorkspaceCopy(Workable inWorkable,
                                        EPMWorkspace workspace)
                                 throws WTException
Throws:
WTException

getKey

private static String getKey(Object obj)

canObjectBeRefreshed

private static boolean canObjectBeRefreshed(Workable workable,
                                            EPMWorkspace workspace,
                                            ConfigSpec configSpec)
                                     throws WTException,
                                            WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

isLatestConfigSpec

private static boolean isLatestConfigSpec(ConfigSpec configSpec)

isAnyVersionCheckedOutByUser

private static boolean isAnyVersionCheckedOutByUser(RevisionControlled revisionControlled,
                                                    ConfigSpec configSpec)
                                             throws WTException
Throws:
WTException

addFamilyInstancesToInstanceSet

private static void addFamilyInstancesToInstanceSet(EPMDocument genericDoc,
                                                    EPMDocument instanceDoc,
                                                    ConfigSpec docConfigSpec,
                                                    Set selectedAndDependentsSet,
                                                    Set instanceSet,
                                                    Set excludeSet,
                                                    Set[] objectSets,
                                                    boolean includeAssociated,
                                                    ConfigSpec partConfigSpec,
                                                    boolean isPartCentric)
                                             throws WTException
Throws:
WTException

getFamilyInstances

public static EPMDocument[] getFamilyInstances(EPMDocument genericDoc,
                                               ConfigSpec configSpec)
                                        throws WTException
Throws:
WTException

getFamilyInstances

public static EPMDocument[] getFamilyInstances(EPMDocument genericDoc,
                                               ConfigSpec docConfigSpec,
                                               ConfigSpec partConfigSpec,
                                               boolean isPartCentric)
                                        throws WTException
Obtains all the family instances for the given generic document, filtered using configSpec.

Throws:
WTException

getCompatibleFamilyInstances

public static EPMDocument[] getCompatibleFamilyInstances(EPMDocument genericDoc,
                                                         ConfigSpec partConfigSpec,
                                                         ConfigSpec docConfigSpec,
                                                         boolean isPartCentric,
                                                         WTContainer container)
                                                  throws WTException
Obtains all the family instances for the given generic document, filtered using configSpec.

Throws:
WTException

getAllInstancesWithParent

public static Vector getAllInstancesWithParent(List selected,
                                               boolean includeAssociated,
                                               List dependents,
                                               ConfigSpec configSpec,
                                               boolean includeInstances)
                                        throws WTException
Given an list of selected objects and a list containing all of their dependents as also the config spec for filtering out the documents, this method returns a Vector of Vectors. The first element of the Vector contains the Vector of generic documents and if the includeInstances flag is true, the second element contains the Vector of family instances of these generic documents.

Supported API: false

Parameters:
selected - The list of objects selected from workspace browser(WB) or selection dialog(SD)
includeAssociated - Includes associated documents or parts
dependents - List of all dependents (associated, required, optional, drawing, secondary and instances)
configSpec - Config spec used to filter out documents
includeInstances - Includes instances
Returns:
Vector
Throws:
WTException

getActiveAssociatedDocsAndPartsWithParent

public static Vector getActiveAssociatedDocsAndPartsWithParent(List selected)
                                                        throws WTException
Throws:
WTException

getPassiveAssociatedDocsAndPartsWithParent

public static Vector getPassiveAssociatedDocsAndPartsWithParent(List selected)
                                                         throws WTException
Throws:
WTException

getActiveAssociated

public static WTPart[] getActiveAssociated(EPMDocument source)
                                    throws WTException
Throws:
WTException

getActiveAssociated

public static EPMDocument[] getActiveAssociated(WTPart target)
                                         throws WTException
Throws:
WTException

getPassiveAssociated

public static WTPart[] getPassiveAssociated(EPMDocument source)
                                     throws WTException
Throws:
WTException

getPassiveAssociated

public static EPMDocument[] getPassiveAssociated(WTPart target)
                                          throws WTException
Throws:
WTException

getDependentsOfExternalSiplifiedReps

private static void getDependentsOfExternalSiplifiedReps(EPMWorkspace ws,
                                                         ArrayList externSimpRepsToAdd,
                                                         ArrayList toAddNonRecursively,
                                                         ArrayList toAddRecursively,
                                                         ConfigSpec docConfigSpec)
                                                  throws WTException
Throws:
WTException

getRequiredDependents

public static Object[] getRequiredDependents(List selected,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             boolean includeAssociated,
                                             List associatedObjects,
                                             boolean includeRequiredGenerics)
                                      throws WTException,
                                             WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getRequiredDependents

public static Object[] getRequiredDependents(Object[] selectedObj,
                                             EPMWorkspace workspace,
                                             EPMDocConfigSpec docConfigSpec,
                                             boolean includeAssociated,
                                             List associatedObjects,
                                             boolean includeRequiredGenerics)
                                      throws WTException,
                                             WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getEPMReferenceLink

public static EPMReferenceLink getEPMReferenceLink(EPMDocument srcDoc)
                                            throws WTException
Throws:
WTException

getRefreshedObjects

public static boolean[] getRefreshedObjects(Object[] objectsToBeRefreshed,
                                            ConfigSpec docConfigSpec,
                                            ConfigSpec partConfigSpec)
                                     throws WTException
Throws:
WTException

getFilteredIterations

protected static void getFilteredIterations(Class iterCl,
                                            List masters,
                                            ConfigSpec cs,
                                            Map filteredIters)
                                     throws WTException
Throws:
WTException

getPartCentricRefreshedObjects

public static Map getPartCentricRefreshedObjects(List objectList,
                                                 ConfigSpec partConfigSpec,
                                                 ConfigSpec docConfigSpec,
                                                 EPMWorkspace workspace)
                                          throws WTException
Throws:
WTException

getPartCentricDependents

public static Object[] getPartCentricDependents(List selected,
                                                EPMWorkspace workspace,
                                                EPMDocConfigSpec docConfigSpec,
                                                WTPartConfigSpec partConfigSpec,
                                                boolean includeAssociated)
                                         throws WTException,
                                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getPartCentricAssocPartsAndDocs

private static ArrayList getPartCentricAssocPartsAndDocs(ArrayList docs,
                                                         ConfigSpec partConfigSpec,
                                                         ArrayList partsToBeProcessed,
                                                         ArrayList partsNotToBeProcessed)
                                                  throws WTException
Throws:
WTException

getMasters

public static QueryResult getMasters(QueryResult qr)
                              throws WTException
Throws:
WTException

filterObjects

public static ArrayList filterObjects(List objects,
                                      Class classToKeep)

addObjectToSet

private static void addObjectToSet(Object[] assocParts,
                                   Set[] objectSets,
                                   Set targetSet)

setArrayContainsObject

private static boolean setArrayContainsObject(Object obj,
                                              Set[] objectSets)

getRelatedDrawings

public static Object[] getRelatedDrawings(List selected,
                                          List associatedObjects,
                                          List oldDrawings,
                                          boolean includeAssociated,
                                          ConfigSpec docConfigSpec,
                                          ConfigSpec partConfigSpec,
                                          boolean partCentric)
                                   throws WTException
Throws:
WTException

getAllInstances

public static List[] getAllInstances(List selected,
                                     boolean includeAssociated,
                                     List dependents,
                                     List excludeObjects,
                                     ConfigSpec docConfigSpec,
                                     boolean includeInstances,
                                     String criteria,
                                     boolean isCheckoutMetadata,
                                     ConfigSpec partConfigSpec,
                                     boolean isPartCentric)
                              throws WTException
Throws:
WTException

getAllInstances

public static List[] getAllInstances(Object[] selected,
                                     boolean includeAssociated,
                                     List dependents,
                                     List excludeObjects,
                                     ConfigSpec docConfigSpec,
                                     boolean includeInstances,
                                     String criteria,
                                     boolean isCheckoutMetadata,
                                     ConfigSpec partConfigSpec,
                                     boolean isPartCentric)
                              throws WTException
Throws:
WTException

getPartCentricRequiredDependentsWithParent

public static Vector getPartCentricRequiredDependentsWithParent(List selected,
                                                                EPMWorkspace workspace,
                                                                EPMDocConfigSpec docConfigSpec,
                                                                boolean includeAssociated,
                                                                WTPartConfigSpec partConfigSpec)
                                                         throws WTException,
                                                                WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException

getUsedByWithParent

public static Vector getUsedByWithParent(List selected,
                                         boolean includeAssociated,
                                         List allDependents,
                                         ConfigSpec configSpec)
                                  throws WTException
Throws:
WTException

getRequiredReferedDocuments

public static Enumeration getRequiredReferedDocuments(EPMDocument a_Doc,
                                                      ConfigSpec a_ConfigSpec)
This method returns only the required documents refered by a drawing. If the config spec passed to this method is null, LatestConfigSpec will be used to retrive the refered documents.

Supported API: false

Parameters:
a_Doc -
a_ConfigSpec -
Returns:
Enumeration

getCompatibleFamilyInstances

public static EPMDocument[] getCompatibleFamilyInstances(EPMDocument genericDoc,
                                                         ConfigSpec partConfigSpec,
                                                         ConfigSpec docConfigSpec,
                                                         boolean isPartCentric)
                                                  throws WTException
Throws:
WTException

getRefreshedObjects

public static Collection getRefreshedObjects(Collection objectsToBeRefreshed,
                                             ConfigSpec docConfigSpec,
                                             ConfigSpec partConfigSpec)
                                      throws WTException,
                                             WTPropertyVetoException
Throws:
WTException
WTPropertyVetoException