wt.maturity
Class StandardMaturityService

java.lang.Object
  extended by wt.services.StandardManager
      extended by wt.maturity.StandardMaturityService
All Implemented Interfaces:
Serializable, NetFactor, MaturityService, wt.maturity.MaturityServiceSvr, wt.services.Manager

public class StandardMaturityService
extends StandardManager
implements MaturityService, wt.maturity.MaturityServiceSvr, Serializable

Standard server-side implementation of the MaturityService interfaces. The public, static methods in this class are accessed through the syntax:

 MaturityHelper.service.[method] 

Use the newStandardMaturityService static factory method(s), not the StandardMaturityService 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:
MaturityService, MaturityServiceFwd, MaturityHelper, Serialized Form

Method Summary
 QueryResult getBaselineItems(PromotionNotice promotionNotice)
          Returns a QueryResult of MaturityVersioned, Baselineable item iterations that are part of the Maturity Baseline associated to the PromotionNotice.
 QueryResult getBaselines(Baselineable promotable, Class promotionNoticeClass)
          Returns a QueryResult of MaturityVersioned Baseline objects of a specified class that this Baselineable item iteration is part of.
 QueryResult getBaselines(wt.maturity.Promotable promotable)
          Returns a QueryResult of MaturityVersioned Baseline objects that this MaturityVersioned Baselineable item iteration is part of.
 WTSet getInvalidTargets(WTCollection promotionTargets, boolean includeLocks)
          Returns the set of invalid promotion targets of a given promotion notice.
 WTCollection getPromotionNotices(WTCollection promotables)
          

Supported API: true
 WTKeyedHashMap getPromotionNotices(WTSet promotables, State state)
          This method returns a WTKeyedHashMap containing the passed in Promotable as the key and any PromotionNotices that match the passed in state as the values which are contained in a WTSet.
 WTKeyedHashMap getPromotionNoticesMap(WTCollection promotables)
          This method returns a WTKeyedHashMap containing the passed in Promotable as the key and any PromotionNotices as the values which are contained in a WTSet.
 boolean isAnyIterationInBaseline(wt.maturity.Promotable promotable, PromotionNotice promotionNotice)
          Returns true, if for this Maturity Baselineable, any items with the same Master are part of the MaturityBaseline associated to the PromotionNotice.
 boolean isInBaseline(wt.maturity.Promotable promotable, PromotionNotice promotionNotice)
          Returns true, if the MaturityVersioned item iteration is part of the MaturityBaseline associated to the PromotionNotice.
 void lockTargets(PromotionNotice pn)
          Given a PromotionNotice validate and set to the LOCK state the associated PromotionTargets.
 void promoteTargets(PromotionNotice pn)
          Given a PromotionNotice validate and set to the promotion state defined in the PromotionNotice.
 void unattachPromotable(wt.maturity.Promotable refObject, PromotionNotice promotionNotice, Class linkClass, String maturityRole)
          Deletes the association between a PromotionNotice and a Promotable.
 void unlockTargets(PromotionNotice pn)
          Given a PromotionNotice validate and set to the create state the associated PromotionTargets.
 
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

unattachPromotable

public void unattachPromotable(wt.maturity.Promotable refObject,
                               PromotionNotice promotionNotice,
                               Class linkClass,
                               String maturityRole)
                        throws WTException,
                               MaturityException
Deletes the association between a PromotionNotice and a Promotable.

Supported API: true

Specified by:
unattachPromotable in interface MaturityService
Parameters:
refObject - A MaturityVersioned object to be disassociatd from a PromotionNotice
promotionNotice - The PromotionNotice associated to the MaturityVersioned.
linkClass - The associated link Class, which has a PromotionNotice as role A.
maturityRole - The role name.
Throws:
WTException
MaturityException

getBaselines

public QueryResult getBaselines(wt.maturity.Promotable promotable)
                         throws WTException
Returns a QueryResult of MaturityVersioned Baseline objects that this MaturityVersioned Baselineable item iteration is part of. If the iteration is not part of any MaturityBaselines, then a QueryResult of size zero is returned.

Supported API: true

Specified by:
getBaselines in interface MaturityService
Parameters:
promotable -
Returns:
QueryResult
Throws:
WTException

getBaselines

public QueryResult getBaselines(Baselineable promotable,
                                Class promotionNoticeClass)
                         throws WTException
Returns a QueryResult of MaturityVersioned 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.

Supported API: true

Specified by:
getBaselines in interface MaturityService
Parameters:
promotable -
promotionNoticeClass -
Returns:
QueryResult
Throws:
WTException

getBaselineItems

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

Supported API: true

Specified by:
getBaselineItems in interface MaturityService
Parameters:
promotionNotice -
Returns:
QueryResult
Throws:
WTException

isInBaseline

public boolean isInBaseline(wt.maturity.Promotable promotable,
                            PromotionNotice promotionNotice)
                     throws WTException
Returns true, if the MaturityVersioned item iteration is part of the MaturityBaseline associated to the PromotionNotice.

Supported API: true

Specified by:
isInBaseline in interface MaturityService
Parameters:
promotable -
promotionNotice -
Returns:
boolean
Throws:
WTException

isAnyIterationInBaseline

public boolean isAnyIterationInBaseline(wt.maturity.Promotable promotable,
                                        PromotionNotice promotionNotice)
                                 throws WTException
Returns true, if for this Maturity Baselineable, any items with the same Master are part of the MaturityBaseline associated to the PromotionNotice.

Supported API: true

Specified by:
isAnyIterationInBaseline in interface MaturityService
Parameters:
promotable -
promotionNotice -
Returns:
boolean
Throws:
WTException

getInvalidTargets

public WTSet getInvalidTargets(WTCollection promotionTargets,
                               boolean includeLocks)
                        throws WTException
Returns the set of invalid promotion targets of a given promotion notice. A promotion target is invalid if its current state is not the valid locking state, if this is defined, or the initial state from when the promotion notice was created.

Supported API: true

Specified by:
getInvalidTargets in interface MaturityService
Parameters:
promotionTargets -
includeLocks - If true, validate considering lock states. If false, validate without considering lock states.
Returns:
WTSet
Throws:
WTException

getPromotionNotices

public WTCollection getPromotionNotices(WTCollection promotables)
                                 throws WTException


Supported API: true

Specified by:
getPromotionNotices in interface MaturityService
Parameters:
promotables -
Returns:
WTCollection
Throws:
WTException

getPromotionNotices

public WTKeyedHashMap getPromotionNotices(WTSet promotables,
                                          State state)
                                   throws WTException
This method returns a WTKeyedHashMap containing the passed in Promotable as the key and any PromotionNotices that match the passed in state as the values which are contained in a WTSet.

Supported API: true

Specified by:
getPromotionNotices in interface MaturityService
Parameters:
promotables -
state -
Returns:
WTKeyedHashMap
Throws:
WTException

getPromotionNoticesMap

public WTKeyedHashMap getPromotionNoticesMap(WTCollection promotables)
                                      throws WTException
This method returns a WTKeyedHashMap containing the passed in Promotable as the key and any PromotionNotices as the values which are contained in a WTSet.

Supported API: true

Specified by:
getPromotionNoticesMap in interface MaturityService
Parameters:
promotables -
Returns:
WTKeyedHashMap
Throws:
WTException

lockTargets

public void lockTargets(PromotionNotice pn)
                 throws WTException
Given a PromotionNotice validate and set to the LOCK state the associated PromotionTargets.

Supported API: true

Parameters:
pn -
Throws:
WTException

promoteTargets

public void promoteTargets(PromotionNotice pn)
                    throws WTException
Given a PromotionNotice validate and set to the promotion state defined in the PromotionNotice.

Supported API: true

Parameters:
pn -
Throws:
WTException

unlockTargets

public void unlockTargets(PromotionNotice pn)
                   throws WTException
Given a PromotionNotice validate and set to the create state the associated PromotionTargets.

Supported API: true

Parameters:
pn -
Throws:
WTException