wt.epm.familytable
Class EPMStandardFamilyTableManager

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.epm.familytable.EPMStandardFamilyTableManager
All Implemented Interfaces:
EPMFamilyTableManager, Manager, NetFactor, Serializable

public class EPMStandardFamilyTableManager
extends StandardManager
implements EPMFamilyTableManager, Serializable

Use the newEPMStandardFamilyTableManager static factory method(s), not the EPMStandardFamilyTableManager constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Nested Class Summary
private static class EPMStandardFamilyTableManager.GenericInfo
           
private static class EPMStandardFamilyTableManager.InstanceInfo
           
 
Field Summary
private static String CLASSNAME
           
private static String EPMRESOURCE
           
private static String RESOURCE
           
 
Fields inherited from class wt.services.StandardManager
 
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE
 
Constructor Summary
EPMStandardFamilyTableManager()
           
 
Method Summary
private static EPMSepFamilyTable addToFamily(EPMWorkspace ws, EPMDocument generic, EPMSepFamilyTable familyTable, boolean isFamilyTableNew, Collection instanceInfos, WTCollection docs, WTCollection links)
           
 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.
private static WTKeyedHashMap callPLSQL_getFTCompatible(long[] seeds, WTContainer container)
           
static void checkInstanceIsNotGeneric(Collection instances)
           
static void checkLastInstance(WTSet familyTables)
           
static void checkModifiability(Collection documents, String message)
           
static Collection clearGenericFlag(Collection generics, boolean checkModifiability)
           
static Collection clearInstanceFlag(Collection instances, boolean checkModifiability, boolean checkLinks)
           
static Collection collectDisplayIdetity(Collection objects)
           
 WTKeyedMap getCompatibleFamilyTables(Collection documents, WTContainer container)
          Calculates and returns compatible and complete lists of family tables for given EPMDocuments.
 String getConceptualClassname()
          Deprecated.  
static WTSet getModifiable(Collection documents)
           
static WTSet getNonModifiable(Collection documents)
           
protected  void initialize()
          

Supported API: false
 WTCollection makeStandalone(WTCollection instances)
          Makes a family table instances a standalone document by removing the EPMContainedIn links and EPMVariantLinks.
static EPMStandardFamilyTableManager newEPMStandardFamilyTableManager()
          Default factory for the class.
static BigDecimal object2BigDecimalId(Persistable object)
           
protected  void performStartupProcess()
          Dummy method to be overridden by subclasses.
private  void processFamilyTablesOnRemoveDocumentsFromWorkspace(EPMCheckpoint bl, WTCollection documents)
           
private  void processPostDeleteFamilyTableEvent(WTCollection objects)
           
private  void processPostMoveEvent(WTCollection targetDocs, boolean checkFolderForAll)
           
private  void processPostSandboxCheckinFamilyTableEvent(WTValuedMap workingPairsMap)
           
private  void processPostSandboxCheckoutFamilyTableEvent(WTValuedMap workingPairsMap)
           
private  void processPostSandboxUndoCheckoutFamilyTableEvent(WTCollection workingCopies)
           
private  void processPostStoreEPMContainedIn(WTCollection newLinks)
           
private  void processPreDeleteFamilyTableEvent(WTCollection targets)
           
private  void processPreSandboxCheckinFamilyTableEvent(WTCollection documents)
           
private  void processPreSandboxCheckoutFamilyTableEvent(WTContainerRef sandboxContainerRef, WTCollection documents)
           
private  void processPreSandboxUndoCheckoutFamilyTableEvent(WTValuedMap workingToOriginalMap)
           
 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.
private  void synchronizePersistables(Persistable toObj, Persistable fromObj)
           
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

EPMRESOURCE

private static final String EPMRESOURCE
See Also:
Constant Field Values
Constructor Detail

EPMStandardFamilyTableManager

public EPMStandardFamilyTableManager()
Method Detail

getConceptualClassname

public String getConceptualClassname()
Deprecated.  

Returns the conceptual (modeled) name for the class.

Supported API: false

Specified by:
getConceptualClassname in interface NetFactor
Overrides:
getConceptualClassname in class StandardManager
Returns:
String

initialize

protected void initialize()
                   throws WTException


Supported API: false

Overrides:
initialize in class StandardManager
Throws:
WTException

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
Dummy method to be overridden by subclasses. Subclasses should override this method and provide startup processing.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newEPMStandardFamilyTableManager

public static EPMStandardFamilyTableManager newEPMStandardFamilyTableManager()
                                                                      throws WTException
Default factory for the class.

Supported API: false

Returns:
EPMStandardFamilyTableManager
Throws:
WTException

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

Specified by:
getCompatibleFamilyTables in interface EPMFamilyTableManager
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

Specified by:
addToFamily in interface EPMFamilyTableManager
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

Specified by:
makeStandalone in interface EPMFamilyTableManager
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

Specified by:
removeFromFamily in interface EPMFamilyTableManager
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

Specified by:
removeFromFamily in interface EPMFamilyTableManager
Parameters:
workspace -
topGeneric -
instanceMasters -
Throws:
WTException

callPLSQL_getFTCompatible

private static WTKeyedHashMap callPLSQL_getFTCompatible(long[] seeds,
                                                        WTContainer container)
                                                 throws WTException
Throws:
WTException

processPostStoreEPMContainedIn

private void processPostStoreEPMContainedIn(WTCollection newLinks)
                                     throws WTPropertyVetoException,
                                            WTException
Throws:
WTPropertyVetoException
WTException

processPreDeleteFamilyTableEvent

private void processPreDeleteFamilyTableEvent(WTCollection targets)
                                       throws WTException
Throws:
WTException

processPostDeleteFamilyTableEvent

private void processPostDeleteFamilyTableEvent(WTCollection objects)
                                        throws WTException
Throws:
WTException

processPreSandboxCheckoutFamilyTableEvent

private void processPreSandboxCheckoutFamilyTableEvent(WTContainerRef sandboxContainerRef,
                                                       WTCollection documents)
                                                throws WTException
Throws:
WTException

processPostSandboxCheckoutFamilyTableEvent

private void processPostSandboxCheckoutFamilyTableEvent(WTValuedMap workingPairsMap)
                                                 throws WTException
Throws:
WTException

processPreSandboxCheckinFamilyTableEvent

private void processPreSandboxCheckinFamilyTableEvent(WTCollection documents)
                                               throws WTException
Throws:
WTException

processPostSandboxCheckinFamilyTableEvent

private void processPostSandboxCheckinFamilyTableEvent(WTValuedMap workingPairsMap)
                                                throws WTException
Throws:
WTException

processPreSandboxUndoCheckoutFamilyTableEvent

private void processPreSandboxUndoCheckoutFamilyTableEvent(WTValuedMap workingToOriginalMap)
                                                    throws WTException
Throws:
WTException

processPostSandboxUndoCheckoutFamilyTableEvent

private void processPostSandboxUndoCheckoutFamilyTableEvent(WTCollection workingCopies)
                                                     throws WTException
Throws:
WTException

processFamilyTablesOnRemoveDocumentsFromWorkspace

private void processFamilyTablesOnRemoveDocumentsFromWorkspace(EPMCheckpoint bl,
                                                               WTCollection documents)
                                                        throws WTException
Throws:
WTException

synchronizePersistables

private void synchronizePersistables(Persistable toObj,
                                     Persistable fromObj)

addToFamily

private static EPMSepFamilyTable addToFamily(EPMWorkspace ws,
                                             EPMDocument generic,
                                             EPMSepFamilyTable familyTable,
                                             boolean isFamilyTableNew,
                                             Collection instanceInfos,
                                             WTCollection docs,
                                             WTCollection links)
                                      throws WTException
Throws:
WTException

checkModifiability

public static void checkModifiability(Collection documents,
                                      String message)
                               throws WTException
Throws:
WTException

getModifiable

public static WTSet getModifiable(Collection documents)
                           throws WTException
Throws:
WTException

getNonModifiable

public static WTSet getNonModifiable(Collection documents)
                              throws WTException
Throws:
WTException

checkInstanceIsNotGeneric

public static void checkInstanceIsNotGeneric(Collection instances)
                                      throws WTException
Throws:
WTException

clearGenericFlag

public static Collection clearGenericFlag(Collection generics,
                                          boolean checkModifiability)
                                   throws WTException
Throws:
WTException

clearInstanceFlag

public static Collection clearInstanceFlag(Collection instances,
                                           boolean checkModifiability,
                                           boolean checkLinks)
                                    throws WTException
Throws:
WTException

checkLastInstance

public static void checkLastInstance(WTSet familyTables)
                              throws WTException
Throws:
WTException

processPostMoveEvent

private void processPostMoveEvent(WTCollection targetDocs,
                                  boolean checkFolderForAll)
                           throws WTException
Throws:
WTException

object2BigDecimalId

public static BigDecimal object2BigDecimalId(Persistable object)

collectDisplayIdetity

public static Collection collectDisplayIdetity(Collection objects)
                                        throws WTException
Throws:
WTException