wt.vc.baseline
Class StandardBaselineService

java.lang.Object
  extended bywt.services.StandardManager
      extended bywt.vc.baseline.StandardBaselineService
All Implemented Interfaces:
BaselineService, BaselineSvrService, Manager, NetFactor, Serializable

public class StandardBaselineService
extends StandardManager
implements BaselineService, BaselineSvrService, Serializable

This implementation of the BaselineService interface add listeners via performStartupProcess().

Use the newStandardBaselineService static factory method(s), not the StandardBaselineService 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: true

See Also:
Serialized Form

Nested Class Summary
(package private)  class StandardBaselineService.BaselineableOperation
          This class implements the abstract execute() method to add or remove a Baselineable item to a Baseline.
(package private)  class StandardBaselineService.PopulateOperation
          This class implements the abstract execute() method to populate a Baseline.
private  class StandardBaselineService.PostDeleteListener
           
(package private)  class StandardBaselineService.VectorOperation
          This class implements the abstract execute() method to add or remove a Vector of BaselineMemberInfo items to a Baseline.
(package private)  class StandardBaselineService.WTCollectionOperation
          This class implements the abstract execute() method to add or remove a WTCollection of BaselineMember items to a Baseline.
 
Field Summary
private static int ADD
           
protected static String BASELINEREMOVEMEMBER
           
private static String CLASSNAME
           
protected static String CLASSNAMEA2A2
           
protected static String CLASSNAMEKEYROLEAOBJECTREF
           
protected static String CLASSNAMEKEYROLEBOBJECTREF
           
protected static String IDA2A2
           
protected static String IDA3A5
           
protected static String IDA3B5
           
protected static String IDA3C2ITERATIONINFO
           
protected static String LATESTITERATIONINFO
           
protected static List NON_STRICT_CLASSES
           
private static Object POST_DELETE_LISTENER_KEY
          Delete the baseline member links to non-strict baselines and to iterations in personal cabinets.
private static int REMOVE
           
private static String RESOURCE
           
protected static StatementParameterFactory statementFactory
           
 
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
StandardBaselineService()
           
 
Method Summary
protected  boolean add(Baselineable a_baselineable, Baseline a_baseline)
          Adds the Baselineable item to the Baseline.
protected  boolean add(Vector a_baselineMemberInfos, Baseline a_baseline)
          Adds the Baselineable items to the Baseline.
protected  boolean add(WTCollection baselineMembers, Baseline baseline)
          Adds the Baselineable items to the Baseline.
 Baseline addMembers(Vector a_memberInfos, Baseline a_baseline)
          Deprecated. Replaced by addMembers(WTCollection)
 Baseline addMembers(WTCollection baselineMembers)
          Adds the Collection of BaselineMemberInfo items to the Baseline.
 Baseline addToBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Adds the Baselineable item to the Baseline.
 Baseline addToBaseline(Vector a_baselineables, Baseline a_baseline)
          Deprecated. Replaced by addToBaseline(WTCollection, Baseline)
 Baseline addToBaseline(WTCollection baselineables, Baseline baseline)
          Adds the collection of Baselineable items to the Baseline.
protected  void dispatchVetoableEvent(String a_eventType, Baselineable a_baselineable, Baseline a_baseline)
          This method dispatches a BaselineServiceEvent.
protected  void dispatchVetoableEvent(String a_eventType, Baselineable a_baselineable, Baseline a_baseline, Baselineable a_replacedBaselineable)
          This method dispatches a BaselineServiceEvent.
private  void dispatchVetoableMultiObjectEvent(BaselineServiceEvent event)
           
private  QueryResult executeCall(String functionName, Object[] parameters, boolean applyAccessControl, boolean returnsList)
           
private  QueryResult filterIteratedPartialBaselines(QueryResult bms)
          This method is passed a query result containing BaselineMembers.
private  BaselineMember find(Baselineable a_baselineable, Baseline a_baseline)
          Returns the BaselineMember object (if it exists) for the Baselineable and Baseline.
private  BaselineMember findAnyIteration(Baselineable a_baselineable, Baseline a_baseline)
          Returns the BaselineMember object (if it exists) for the Baselineable and Baseline.
private  QueryResult findBaselineMembers(Class baselineableClass, long[] masterIds, Baseline a_baseline)
           
private  void findReplacements(Vector a_baselineables, Baseline a_baseline, ArrayList toAdd, ArrayList toReplace)
          Given a vector of BaselineMemberInfos, determine which are new to the baseline and which are replacements (another iteration with the same master already in the baseline).
private  BaselineDelegate getBaselineDelegate(Baseline baseline)
           
 QueryResult getBaselineItems(Baseline a_baseline)
          Returns a QueryResult of Baselineable item iterations that are part of the Baseline.
 QueryResult getBaselines(Baselineable a_baselineable)
          Returns a QueryResult of Baseline objects that this Baselineable item iteration is part of.
 QueryResult getBaselines(Baselineable a_baselineable, Class baselineClass)
          Returns a QueryResult of Baseline objects of a specified class that this Baselineable item iteration is part of.
 WTKeyedMap getBaselines(WTCollection baselineables)
          Returns a map of baselineables (as keys) to the collection of Baselines they're members of.
 WTKeyedMap getBaselines(WTCollection baselineables, Class baselineClass)
          Returns a map of baselineables (as keys) to the collection of baselines (of the given class) they're members of.
 String getConceptualClassname()
          Deprecated.  
private  void getIdentityParms(Baselineable a_baselineable, Object[] parms, int index)
          Fills in the identity parms for a Baselineable item.
private  Object[] getIterationIdentityMessages(WTCollection baselineables)
           
 QueryResult getManagedBaselines(Baselineable a_baselineable)
          Returns a QueryResult of ManagedBaseline objects that this Baselineable item iteration is part of.
private  StatementParameter getRowParameter(ObjectIdentifier oid)
           
private  String getTableName(String className)
           
 boolean isAnyIterationInBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Returns true, if for this Baselineable, any items with the same Master are part of the Baseline.
 boolean isInBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Returns true, if the Baselineable item iteration is part of the Baseline.
static StandardBaselineService newStandardBaselineService()
          Default factory for the class.
protected  void performStartupProcess()
          This method performs the startup processing for this service.
 Baseline populateBaseline(Persistable a_object, Baseline a_baseline, ConfigSpec a_configSpec)
          Adds the Baselineable item iterations to the Baseline by navigating recursively from the object using the ConfigSpec.
 Baseline populateBaseline(Persistable a_object, Baseline a_baseline, Navigator a_navigator)
          Adds the Baselineable item iterations to the Baseline by navigating recursively from the object using the Navigator.
private  void postDeleteBaselineMembers(WTCollection baselineables)
          Delete the baseline member links to non-strict baselines and to iterations in personal cabinets.
 void registerEvents(ManagerService a_managerService)
          Overrides the registration of all applicable Baseline service events with the service manager

Supported API: false
protected  boolean remove(Baselineable a_baselineable, Baseline a_baseline)
          Removes the Baselineable from the Baseline.
protected  boolean remove(Vector a_baselineMemberInfos, Baseline a_baseline)
          Removes the Baselineables from the Baseline.
protected  boolean remove(WTCollection baselineables, Baseline baseline)
          Removes the Baselineables from the Baseline.
 Baseline removeFromBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Removes the Baselineable item iteration from the Baseline.
 Baseline removeFromBaseline(Vector a_baselineables, Baseline a_baseline)
          Deprecated. Replaced by removeFromBaseline(WTCollection, Baseline)
 Baseline removeFromBaseline(WTCollection baselineables, Baseline baseline)
          Removes the collection of Baselineable item iterations from the Baseline.
private  Baseline updateModificationTimestamp(Baseline a_baseline)
          Updates the modification timestamp on the Baseline object.
private  void validateModifyBaselineables(WTCollection baselineables)
          Veto the modification if any of the baselineables are assigned to baselines.
 
Methods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, performShutdownProcess, 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

ADD

private static final int ADD
See Also:
Constant Field Values

REMOVE

private static final int REMOVE
See Also:
Constant Field Values

POST_DELETE_LISTENER_KEY

private static final Object POST_DELETE_LISTENER_KEY
Delete the baseline member links to non-strict baselines and to iterations in personal cabinets. Done as a global transaction listener so other services can do their own cleanup on these links (otherwise, these links will disappear before other listeners can process them). This approx- imates the pre-X-05 behavior of automatically deleting the links at the end of the transaction. Remaining links will result in a referential integrity veto.


statementFactory

protected static final StatementParameterFactory statementFactory

NON_STRICT_CLASSES

protected static final List NON_STRICT_CLASSES

BASELINEREMOVEMEMBER

protected static final String BASELINEREMOVEMEMBER

CLASSNAMEA2A2

protected static final String CLASSNAMEA2A2

CLASSNAMEKEYROLEAOBJECTREF

protected static final String CLASSNAMEKEYROLEAOBJECTREF

CLASSNAMEKEYROLEBOBJECTREF

protected static final String CLASSNAMEKEYROLEBOBJECTREF

IDA2A2

protected static final String IDA2A2

IDA3A5

protected static final String IDA3A5

IDA3B5

protected static final String IDA3B5

IDA3C2ITERATIONINFO

protected static final String IDA3C2ITERATIONINFO

LATESTITERATIONINFO

protected static final String LATESTITERATIONINFO
Constructor Detail

StandardBaselineService

public StandardBaselineService()
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

registerEvents

public void registerEvents(ManagerService a_managerService)
Overrides the registration of all applicable Baseline service events with the service manager

Supported API: false

Specified by:
registerEvents in interface Manager
Overrides:
registerEvents in class StandardManager
Parameters:
a_managerService -

dispatchVetoableEvent

protected void dispatchVetoableEvent(String a_eventType,
                                     Baselineable a_baselineable,
                                     Baseline a_baseline)
                              throws WTException
This method dispatches a BaselineServiceEvent.

Supported API: true

Parameters:
a_eventType -
a_baselineable -
a_baseline -
Throws:
WTException

dispatchVetoableEvent

protected void dispatchVetoableEvent(String a_eventType,
                                     Baselineable a_baselineable,
                                     Baseline a_baseline,
                                     Baselineable a_replacedBaselineable)
                              throws WTException
This method dispatches a BaselineServiceEvent.

Supported API: true

Parameters:
a_eventType -
a_baselineable -
a_baseline -
a_replacedBaselineable -
Throws:
WTException

performStartupProcess

protected void performStartupProcess()
                              throws ManagerException
This method performs the startup processing for this service. This service is set up to listen for Pre-Delete and Pre-Modify events to handle Baselineable items that are being deleted/modified and currenly are a part of a Baseline.

Supported API: false

Overrides:
performStartupProcess in class StandardManager
Throws:
ManagerException

newStandardBaselineService

public static StandardBaselineService newStandardBaselineService()
                                                          throws WTException
Default factory for the class.

Supported API: false

Returns:
StandardBaselineService
Throws:
WTException

getBaselines

public QueryResult getBaselines(Baselineable a_baselineable)
                         throws WTException
Returns a QueryResult of Baseline objects that this Baselineable item iteration is part of. If the iteration is not part of any Baselines, then a QueryResult of size zero is returned.

Note that the Baselineable is considered a member of an IteratedPartialBaseline only if it is a member of its latest iteration(s).



Supported API: true

Specified by:
getBaselines in interface BaselineService
Parameters:
a_baselineable -
Returns:
QueryResult
Throws:
WTException

getBaselines

public WTKeyedMap getBaselines(WTCollection baselineables)
                        throws WTException
Returns a map of baselineables (as keys) to the collection of Baselines they're members of. If access is enforced, the collections of baselines (that is, the values in the map) will be inflated (to check access) and the represented baselines will be limited to only those the current user has access to. If access is disabled, the values will remain uninflated (however, the baselines in these collections will be connected, so inflating one reference in one collection will inflate the references (to the same baseline) in the other collections). If you've disabled access control but want the baselines inflated, it is recommended you create a new collection, add all the values collections to it, and then inflate the collection (you need not, due to the fact that they're connected, do anything beyond that to get the baselines in the values collections inflated).

Note that the Baselineable is considered a member of an IteratedPartialBaseline only if it is a member of its latest iteration(s).



Supported API: true

Specified by:
getBaselines in interface BaselineService
Parameters:
baselineables -
Returns:
WTKeyedMap
Throws:
WTException

getBaselines

public QueryResult getBaselines(Baselineable a_baselineable,
                                Class baselineClass)
                         throws WTException
Returns a QueryResult of Baseline objects of a specified class that this Baselineable item iteration is part of. If the iteration is not part of any Baselines of that class, then a QueryResult of size zero is returned.

Note that the Baselineable is considered a member of an IteratedPartialBaseline only if it is a member of its latest iteration(s).



Supported API: true

Specified by:
getBaselines in interface BaselineService
Parameters:
a_baselineable -
baselineClass -
Returns:
QueryResult
Throws:
WTException

getBaselines

public WTKeyedMap getBaselines(WTCollection baselineables,
                               Class baselineClass)
                        throws WTException
Returns a map of baselineables (as keys) to the collection of baselines (of the given class) they're members of. If access is enforced, the collections of baselines (that is, the values in the map) will be inflated (to check access) and the represented baselines will be limited to only those the current user has access to. If access is disabled, the values will remain uninflated (however, the baselines in these collections will be connected, so inflating one reference in one collection will inflate the references (to the same baseline) in the other collections). If you've disabled access control but want the baselines inflated, it is recommended you create a new collection, add all the values collections to it, and then inflate the collection (you need not, due to the fact that they're connected, do anything beyond that to get the baselines in the values collections inflated).

Note that the Baselineable is considered a member of an IteratedPartialBaseline only if it is a member of its latest iteration(s).



Supported API: true

Specified by:
getBaselines in interface BaselineService
Parameters:
baselineables -
baselineClass -
Returns:
WTKeyedMap
Throws:
WTException

getManagedBaselines

public QueryResult getManagedBaselines(Baselineable a_baselineable)
                                throws WTException
Returns a QueryResult of ManagedBaseline objects that this Baselineable item iteration is part of. If the iteration is not part of any ManagedBaselines, then a QueryResult of size zero is returned.

Supported API: true

Specified by:
getManagedBaselines in interface BaselineService
Parameters:
a_baselineable -
Returns:
QueryResult
Throws:
WTException

getBaselineItems

public QueryResult getBaselineItems(Baseline a_baseline)
                             throws WTException
Returns a QueryResult of Baselineable item iterations that are part of the Baseline. If the Baseline contains no items, then a QueryResult of size zero is returned.

Supported API: true

Specified by:
getBaselineItems in interface BaselineService
Parameters:
a_baseline -
Returns:
QueryResult
Throws:
WTException

isInBaseline

public boolean isInBaseline(Baselineable a_baselineable,
                            Baseline a_baseline)
                     throws WTException
Returns true, if the Baselineable item iteration is part of the Baseline.

Supported API: true

Specified by:
isInBaseline in interface BaselineService
Parameters:
a_baselineable -
a_baseline -
Returns:
boolean
Throws:
WTException

isAnyIterationInBaseline

public boolean isAnyIterationInBaseline(Baselineable a_baselineable,
                                        Baseline a_baseline)
                                 throws WTException
Returns true, if for this Baselineable, any items with the same Master are part of the Baseline.

Supported API: true

Specified by:
isAnyIterationInBaseline in interface BaselineService
Parameters:
a_baselineable -
a_baseline -
Returns:
boolean
Throws:
WTException

addToBaseline

public Baseline addToBaseline(Baselineable a_baselineable,
                              Baseline a_baseline)
                       throws WTException
Adds the Baselineable item to the Baseline. If another item in the Baseline has the same Master as the Baselineable, then the current item in the Baseline is replaced with this Baselineable. The modification timestamp on the Baseline is updated. If the iteration is currently part of the Baseline, then nothing occurs and no exception is thrown. The PRE_ADD_BASELINE and POST_ADD_BASELINE or PRE_REPLACE_BASELINE and POST_REPLACE_BASELINE events are emitted.

Supported API: true

Specified by:
addToBaseline in interface BaselineService
Parameters:
a_baselineable -
a_baseline -
Returns:
Baseline
Throws:
WTException

addToBaseline

public Baseline addToBaseline(Vector a_baselineables,
                              Baseline a_baseline)
                       throws WTException
Deprecated. Replaced by addToBaseline(WTCollection, Baseline)

Adds the Vector of Baselineable items to the Baseline. When adding an item, if another item in the Baseline has the same Master as that item, then the current item in the Baseline is replaced with that item. All items are added within a single transaction. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or PRE_REPLACE_BASELINE and POST_REPLACE_BASELINEevents are emitted for each item.

Supported API: false

Specified by:
addToBaseline in interface BaselineService
Parameters:
a_baselineables -
a_baseline -
Returns:
Baseline
Throws:
WTException

addToBaseline

public Baseline addToBaseline(WTCollection baselineables,
                              Baseline baseline)
                       throws WTException
Adds the collection of Baselineable items to the Baseline. When adding an item, if another item in the Baseline has the same Master as that item, then the current item in the Baseline is replaced with that item. All items are added within a single transaction. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or PRE_REPLACE_BASELINE and POST_REPLACE_BASELINEevents are emitted for each item.

Supported API: true

Specified by:
addToBaseline in interface BaselineService
Parameters:
baselineables -
baseline -
Returns:
Baseline
Throws:
WTException

removeFromBaseline

public Baseline removeFromBaseline(Baselineable a_baselineable,
                                   Baseline a_baseline)
                            throws WTException
Removes the Baselineable item iteration from the Baseline. The modification timestamp on the Baseline is updated. If the iteration is not currently part of the Baseline, then nothing occurs and no exception is thrown. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted.

Supported API: true

Specified by:
removeFromBaseline in interface BaselineService
Parameters:
a_baselineable -
a_baseline -
Returns:
Baseline
Throws:
WTException

removeFromBaseline

public Baseline removeFromBaseline(Vector a_baselineables,
                                   Baseline a_baseline)
                            throws WTException
Deprecated. Replaced by removeFromBaseline(WTCollection, Baseline)

Removes the Baselineable item iterations from the Baseline. All items are removed within a single transaction. The modification timestamp on the Baseline is updated. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted for each item.

Supported API: false

Specified by:
removeFromBaseline in interface BaselineService
Parameters:
a_baselineables -
a_baseline -
Returns:
Baseline
Throws:
WTException

populateBaseline

public Baseline populateBaseline(Persistable a_object,
                                 Baseline a_baseline,
                                 Navigator a_navigator)
                          throws WTException
Adds the Baselineable item iterations to the Baseline by navigating recursively from the object using the Navigator. All items are added within a single transaction. If iterations for the same Master of an item appear more than once in the structure, then the item iteration that was first encountered will be added to the Baseline. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or PRE_REPLACE_BASELINE and POST_REPLACE_BASELINEevents are emitted for each item.

Supported API: true

Specified by:
populateBaseline in interface BaselineService
Parameters:
a_object -
a_baseline -
a_navigator -
Returns:
Baseline
Throws:
WTException

populateBaseline

public Baseline populateBaseline(Persistable a_object,
                                 Baseline a_baseline,
                                 ConfigSpec a_configSpec)
                          throws WTException
Adds the Baselineable item iterations to the Baseline by navigating recursively from the object using the ConfigSpec. The object is assumed to be an Part and the navigation is done via the Part "uses" link. All items are added within a single transaction. If iterations for the same Master of an item appear more than once in the structure, then the item iteration that was first encountered will be added to the Baseline. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or PRE_REPLACE_BASELINE and POST_REPLACE_BASELINEevents are emitted for each item.

Supported API: true

Specified by:
populateBaseline in interface BaselineService
Parameters:
a_object -
a_baseline -
a_configSpec -
Returns:
Baseline
Throws:
WTException

removeFromBaseline

public Baseline removeFromBaseline(WTCollection baselineables,
                                   Baseline baseline)
                            throws WTException
Removes the collection of Baselineable item iterations from the Baseline. All items are removed within a single transaction. The modification timestamp on the Baseline is updated. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted for each item.

Supported API: true

Specified by:
removeFromBaseline in interface BaselineService
Parameters:
baselineables -
baseline -
Returns:
Baseline
Throws:
WTException

addMembers

public Baseline addMembers(Vector a_memberInfos,
                           Baseline a_baseline)
                    throws WTException
Deprecated. Replaced by addMembers(WTCollection)

Adds the Collection of BaselineMemberInfo items to the Baseline. If another item in the Baseline has the same Master as that item, then the current item in the Baseline is replaced with that item. All items are added within a single transaction. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or POST_REPLACE_BASELINE and POST_REPLACE_BASELINE are emitted for each item, which all PRE events emitted before the group is added and all POST events emitted after.

Supported API: false

Specified by:
addMembers in interface BaselineSvrService
Parameters:
a_memberInfos -
a_baseline -
Returns:
Baseline
Throws:
WTException

addMembers

public Baseline addMembers(WTCollection baselineMembers)
                    throws WTException
Adds the Collection of BaselineMemberInfo items to the Baseline. If another item in the Baseline has the same Master as that item, then the current item in the Baseline is replaced with that item. All items are added within a single transaction. The modification timestamp on the Baseline is updated once after all items have been added. The PRE_ADD_BASELINE and POST_ADD_BASELINE or POST_REPLACE_BASELINE and POST_REPLACE_BASELINE are emitted for each item, which all PRE events emitted before the group is added and all POST events emitted after.

Supported API: false

Specified by:
addMembers in interface BaselineSvrService
Parameters:
baselineMembers -
Returns:
Baseline
Throws:
WTException

add

protected boolean add(Baselineable a_baselineable,
                      Baseline a_baseline)
               throws WTException
Adds the Baselineable item to the Baseline. If another item in the Baseline has the same Master as the Baselineable, then the current item in the Baseline is replaced with this Baselineable. If the iteration is currently part of the Baseline, then nothing occurs and no exception is thrown. If the item is added, then true is returned. Either the PRE_ADD_BASELINE and POST_ADD_BASELINE or the PRE_REPLACE_BASELINE and POST_REPLACE_BASELINE events are emitted.

Supported API: false

Parameters:
a_baselineable -
a_baseline -
Returns:
boolean
Throws:
WTException

add

protected boolean add(Vector a_baselineMemberInfos,
                      Baseline a_baseline)
               throws WTException
Adds the Baselineable items to the Baseline. If another item in the Baseline has the same Master as the Baselineable, then the current item in the Baseline is replaced with this Baselineable. If the iteration is currently part of the Baseline, then nothing occurs and no exception is thrown. If any of the items is added, then true is returned. PRE_ADD_BASELINE for all added objects is emitted followed by the corresponding POST_ADD_BASELINE. PRE_REPLACE_BASELINE for replaced objects is emitted followed by the corresponding POST_REPLACE_BASELINE. All baselineMemberInfos must be of the same type

Supported API: false

Parameters:
a_baselineMemberInfos -
a_baseline -
Returns:
boolean
Throws:
WTException

add

protected boolean add(WTCollection baselineMembers,
                      Baseline baseline)
               throws WTException
Adds the Baselineable items to the Baseline. If another item in the Baseline has the same Master as the Baselineable, then the current item in the Baseline is replaced with this Baselineable. If the iteration is currently part of the Baseline, then nothing occurs and no exception is thrown. If any of the items is added, then true is returned. PRE_ADD_BASELINE for all added objects is emitted followed by the corresponding POST_ADD_BASELINE. PRE_REPLACE_BASELINE for replaced objects is emitted followed by the corresponding POST_REPLACE_BASELINE. All baselineMemberInfos must be of the same type

Supported API: false

Returns:
boolean
Throws:
WTException

remove

protected boolean remove(Vector a_baselineMemberInfos,
                         Baseline a_baseline)
                  throws WTException
Removes the Baselineables from the Baseline. If the item is actually removed, then true is returned. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted.

Supported API: false

Parameters:
a_baseline -
Returns:
boolean
Throws:
WTException

remove

protected boolean remove(Baselineable a_baselineable,
                         Baseline a_baseline)
                  throws WTException
Removes the Baselineable from the Baseline. If the item is actually removed, then true is returned. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted.

Supported API: false

Parameters:
a_baselineable -
a_baseline -
Returns:
boolean
Throws:
WTException

remove

protected boolean remove(WTCollection baselineables,
                         Baseline baseline)
                  throws WTException
Removes the Baselineables from the Baseline. If items are actually removed, then true is returned. The PRE_REMOVE_BASELINE and POST_REMOVE_BASELINE events are emitted.

Supported API: false

Returns:
boolean
Throws:
WTException

findAnyIteration

private BaselineMember findAnyIteration(Baselineable a_baselineable,
                                        Baseline a_baseline)
                                 throws WTException
Returns the BaselineMember object (if it exists) for the Baselineable and Baseline. A find query is made for any iteration of the Baselineable's Master is associated with this Baseline.

Parameters:
a_baselineable -
a_baseline -
Returns:
BaselineMember
Throws:
WTException

find

private BaselineMember find(Baselineable a_baselineable,
                            Baseline a_baseline)
                     throws WTException
Returns the BaselineMember object (if it exists) for the Baselineable and Baseline. A find query is made for any iteration of the Baselineable's Master that is associated with this Baseline.

Parameters:
a_baselineable -
a_baseline -
Returns:
BaselineMember
Throws:
WTException

findReplacements

private void findReplacements(Vector a_baselineables,
                              Baseline a_baseline,
                              ArrayList toAdd,
                              ArrayList toReplace)
                       throws WTException
Given a vector of BaselineMemberInfos, determine which are new to the baseline and which are replacements (another iteration with the same master already in the baseline). If no iterations are found, the baselineMemberInfo will be added to toAdd vector. If an iteration is found in the baseline, an array consisting of the baselineMemberInfo, the iteration in the baseline, and the link will be added to toReplace.

Parameters:
a_baselineables -
a_baseline -
toAdd -
toReplace -
Throws:
WTException

findBaselineMembers

private QueryResult findBaselineMembers(Class baselineableClass,
                                        long[] masterIds,
                                        Baseline a_baseline)
                                 throws WTException
Throws:
WTException

updateModificationTimestamp

private Baseline updateModificationTimestamp(Baseline a_baseline)
                                      throws WTException
Updates the modification timestamp on the Baseline object.

Parameters:
a_baseline -
Returns:
Baseline
Throws:
WTException

validateModifyBaselineables

private void validateModifyBaselineables(WTCollection baselineables)
                                  throws WTException
Veto the modification if any of the baselineables are assigned to baselines. Note that non-strict baselines are discluded from this check, as are baselineables that are in personal cabinets.

Throws:
WTException

postDeleteBaselineMembers

private void postDeleteBaselineMembers(WTCollection baselineables)
                                throws WTException
Delete the baseline member links to non-strict baselines and to iterations in personal cabinets. The referential integrity checks later will veto the deletion of baselined baselineables.

Throws:
WTException

getIterationIdentityMessages

private Object[] getIterationIdentityMessages(WTCollection baselineables)
                                       throws WTException
Throws:
WTException

getIdentityParms

private void getIdentityParms(Baselineable a_baselineable,
                              Object[] parms,
                              int index)
Fills in the identity parms for a Baselineable item.

Parameters:
a_baselineable -
parms - Object array to fill in
index - entry in the array to fill in

getTableName

private String getTableName(String className)
                     throws WTException
Throws:
WTException

getRowParameter

private StatementParameter getRowParameter(ObjectIdentifier oid)
                                    throws WTException
Throws:
WTException

executeCall

private QueryResult executeCall(String functionName,
                                Object[] parameters,
                                boolean applyAccessControl,
                                boolean returnsList)
                         throws WTException
Throws:
WTException

filterIteratedPartialBaselines

private QueryResult filterIteratedPartialBaselines(QueryResult bms)
                                            throws WTException
This method is passed a query result containing BaselineMembers. For PartialIteratedBaselines, only those that are part of the latest iteration are considered to be part of the baseline. Return the baselines filtering out the PartialIteratedBaselines that do not fit that criteria.

Throws:
WTException

dispatchVetoableMultiObjectEvent

private void dispatchVetoableMultiObjectEvent(BaselineServiceEvent event)
                                       throws WTException
Throws:
WTException

getBaselineDelegate

private BaselineDelegate getBaselineDelegate(Baseline baseline)