com.ptc.windchill.cadx.update
Class UpdateFamilyEvaluator

java.lang.Object
  extended bycom.ptc.windchill.cadx.update.UpdateFamilyEvaluator
All Implemented Interfaces:
Serializable

public class UpdateFamilyEvaluator
extends Object
implements Serializable

This class evaluates family instance objets for a given object. This has utility methods for finding out and comparing objects in the workspace and its latest iteration w.r.t. Workspace Config Specs.

Supported API: false

Extendable: false

See Also:
Serialized Form

Field Summary
private  Object[] allObjects
           
private static String CLASSNAME
           
private  ConfigSpec configSpec
           
private  List genericNumbersForSelected
           
private static Comparator Object_COMPARATOR
           
private  WFWorkspaceProxy proxy
           
private static String RESOURCE
           
private  EPMPopulateRule rule
           
private  Object[] selectedObjects
           
private  Object[] updatableObjects
           
private  EPMWorkspace ws
           
 
Constructor Summary
UpdateFamilyEvaluator(EPMWorkspace ws, EPMPopulateRule rule, Object[] selectedObjects)
          Contructor

Supported API: false
 
Method Summary
private  boolean doesListContainDoc(List list, EPMDocument doc)
          This method checks whether a document with input object ID exists in input list
 void evaluateFamilies()
          This method evaluates families for each and every generic document from list of selected objects to determine if the entire family could be updated together so that they are no compatibility issues.
private  void findGenericNumbersForSelected()
          creates a list of numbers of generic documents for the selected objects (if any)
 Vector findObjects(Vector objects)
          This method finds out the Objects for the objects listed in input vector from the list of Objects

Supported API: false
private  Vector findUpdatableDocumentsFromFamilies(Map generic2DocumentsToBeUpdated, Map generic2DocumentsNotToBeUpdated)
          Return a vector of documents from different families which can be updated
 Object[] getUpdatableObjects()
          

Supported API: false
 boolean isObjectSelected(Persistable persistable, Object[] allObjects)
          This method finds out the Object for input object from array of Objects for selected objects

Supported API: false
private  void splitFamilies(Map first, Map second, boolean isInstance, EPMDocument doc)
          splits the instances belonging to the family of the input document into two maps based upon which of them require an update
 
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

ws

private EPMWorkspace ws

rule

private EPMPopulateRule rule

configSpec

private ConfigSpec configSpec

allObjects

private Object[] allObjects

updatableObjects

private Object[] updatableObjects

selectedObjects

private Object[] selectedObjects

genericNumbersForSelected

private List genericNumbersForSelected

proxy

private WFWorkspaceProxy proxy

Object_COMPARATOR

private static final Comparator Object_COMPARATOR
Constructor Detail

UpdateFamilyEvaluator

public UpdateFamilyEvaluator(EPMWorkspace ws,
                             EPMPopulateRule rule,
                             Object[] selectedObjects)
Contructor

Supported API: false

Parameters:
ws -
rule -
selectedObjects -
Method Detail

getUpdatableObjects

public Object[] getUpdatableObjects()


Supported API: false

Returns:
Object[]

evaluateFamilies

public void evaluateFamilies()
                      throws WTException
This method evaluates families for each and every generic document from list of selected objects to determine if the entire family could be updated together so that they are no compatibility issues. It excludes any family which will result into incompatibilities after updation.

Supported API: false

Throws:
WTException

splitFamilies

private void splitFamilies(Map first,
                           Map second,
                           boolean isInstance,
                           EPMDocument doc)
splits the instances belonging to the family of the input document into two maps based upon which of them require an update

Parameters:
first -
second -
isInstance -
doc -

findUpdatableDocumentsFromFamilies

private Vector findUpdatableDocumentsFromFamilies(Map generic2DocumentsToBeUpdated,
                                                  Map generic2DocumentsNotToBeUpdated)
                                           throws WTException
Return a vector of documents from different families which can be updated

Parameters:
generic2DocumentsToBeUpdated -
generic2DocumentsNotToBeUpdated -
Returns:
Vector
Throws:
WTException

findGenericNumbersForSelected

private void findGenericNumbersForSelected()
creates a list of numbers of generic documents for the selected objects (if any)


doesListContainDoc

private boolean doesListContainDoc(List list,
                                   EPMDocument doc)
This method checks whether a document with input object ID exists in input list

Parameters:
list -
doc -
Returns:
boolean

findObjects

public Vector findObjects(Vector objects)
This method finds out the Objects for the objects listed in input vector from the list of Objects

Supported API: false

Parameters:
objects -
Returns:
Vector

isObjectSelected

public boolean isObjectSelected(Persistable persistable,
                                Object[] allObjects)
This method finds out the Object for input object from array of Objects for selected objects

Supported API: false

Parameters:
persistable -
allObjects -
Returns:
boolean