wt.epm.familytable
Interface EPMFamilyTableManager

All Known Implementing Classes:
EPMFamilyTableManagerFwd, EPMStandardFamilyTableManager

public interface EPMFamilyTableManager



Supported API: true

Extendable: false


Method Summary
 WTValuedMap addToFamily(WTKeyedMap instances)
          Adds a collection of instances to a family table by creating an EPMContainedIn link and an EPMVariantLink between the instance and the family table.
 WTKeyedMap getCompatibleFamilyTables(Collection documents, WTContainer container)
          Calculates and returns compatible and complete lists of family tables for given EPMDocuments.
 WTCollection makeStandalone(WTCollection instances)
          Makes a family table instances a standalone document by removing the EPMContainedIn links and EPMVariantLinks.
 void removeFromFamily(EPMWorkspace workspace, EPMDocument topGeneric, WTCollection instanceMasters)
          Removes a collection of family table instances from a family table by removing the EPMContainedIn links between the instance and the family table.
 void removeFromFamily(EPMWorkspace workspace, EPMFamilyTable familyTable, WTCollection instanceMasters)
          Removes a collection of family table instances from a family table by removing the EPMContainedIn links between the instance and the family table.
 

Method Detail

getCompatibleFamilyTables

public WTKeyedMap getCompatibleFamilyTables(Collection documents,
                                            WTContainer container)
                                     throws WTException
Calculates and returns compatible and complete lists of family tables for given EPMDocuments. Returns map where key is family table master object idenfier and value CompatibleFamilyTables object that containes:

-- members: all documents presented in the input document list and belong to this family table
-- compatible family tables: all family table objects that contains all document from given list
-- complete family tables: all family table objects that does not have any members that is not in the given document list

Supported API: false

Parameters:
documents - list of EPMDocuments
container - scope for search. If scope ia PDM or PDMLink null can be passed as value
Returns:
WTKeyedMap
Throws:
WTException

addToFamily

public WTValuedMap addToFamily(WTKeyedMap instances)
                        throws WTException
Adds a collection of instances to a family table by creating an EPMContainedIn link and an EPMVariantLink between the instance and the family table. "Instances" parameter is a map with the EPMDocument instance as the key and a FamilyInfo object as the value. The FamilyInfo object will contain the immediate generic and other information such as the asStoredName. New instances must be working copy. Generic can be checked out or not. Operation is processed in a context of the workspace. The workspace is calculated based on the instance. If given generic is a standalone document new family table object will be created in the workspace otherwise the workspace has to contain a family table object with given generic. If this family table object is not checked out it will be checked out implicitly. Instance will be add into this family table object. The function returns map that has instance as key and family table object where this instance was added as value.

Supported API: true

Parameters:
instances -
Returns:
WTValuedMap
Throws:
WTException

makeStandalone

public WTCollection makeStandalone(WTCollection instances)
                            throws WTException
Makes a family table instances a standalone document by removing the EPMContainedIn links and EPMVariantLinks. The instance may not be a generic. The instance has to be working copy. If the instance is a last instance in the family table top generic has to be checked out and it becomes a standalone object too.

Supported API: false

Parameters:
instances -
Returns:
WTCollection
Throws:
WTException

removeFromFamily

public void removeFromFamily(EPMWorkspace workspace,
                             EPMFamilyTable familyTable,
                             WTCollection instanceMasters)
                      throws WTException
Removes a collection of family table instances from a family table by removing the EPMContainedIn links between the instance and the family table. The family table object has to be in the workspace. If family table object is not checked out it will be checked out implicitly. If the instance is a last instance in the family table top generic has to be checked out and it becomes a standalone object.

Supported API: false

Parameters:
workspace -
familyTable -
instanceMasters -
Throws:
WTException

removeFromFamily

public void removeFromFamily(EPMWorkspace workspace,
                             EPMDocument topGeneric,
                             WTCollection instanceMasters)
                      throws WTException
Removes a collection of family table instances from a family table by removing the EPMContainedIn links between the instance and the family table. The family table object is calculated based on the given workspace and the given top generic. The workspace has to contain family table object with given top generic. If family table object is not checked out it will be checked out implicitly. If the instance is a last instance in the family table the top generic has to be checked out and it becomes a standalone object.

Supported API: false

Parameters:
workspace -
topGeneric -
instanceMasters -
Throws:
WTException