wt.vc.baseline
Class StandardBaselineService

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

public class StandardBaselineService
extends StandardManager
implements BaselineService, wt.vc.baseline.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

Method Summary
 Baseline addToBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Adds the Baselineable item to the 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.
 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.
 QueryResult getBaselinesTop(Baselineable a_baselineable)
          Returns a QueryResult of ManagedBaseline objects that this Baselineable item iteration is top object of.
 WTKeyedMap getBaselinesTop(WTCollection baselineables)
          Returns a map of baselineables (as keys) to the collection of ManagedBaselines they're top object of.
 QueryResult getManagedBaselines(Baselineable a_baselineable)
          Returns a QueryResult of ManagedBaseline objects that this Baselineable item iteration is part of.
 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.
 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, wt.visitor.Navigator a_navigator)
          Adds the Baselineable item iterations to the Baseline by navigating recursively from the object using the Navigator.
 Baseline removeFromBaseline(Baselineable a_baselineable, Baseline a_baseline)
          Removes the Baselineable item iteration from the Baseline.
 Baseline removeFromBaseline(WTCollection baselineables, Baseline baseline)
          Removes the collection of Baselineable item iterations from the Baseline.
 
Methods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

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

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(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

populateBaseline

public Baseline populateBaseline(Persistable a_object,
                                 Baseline a_baseline,
                                 wt.visitor.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

getBaselinesTop

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

Supported API: true

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

getBaselinesTop

public WTKeyedMap getBaselinesTop(WTCollection baselineables)
                           throws WTException
Returns a map of baselineables (as keys) to the collection of ManagedBaselines they're top object of.

Supported API: true

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