wt.maturity
Interface MaturityService

All Known Implementing Classes:
MaturityServiceFwd, StandardMaturityService

public interface MaturityService

The interface describing the services available for the maturity package.

Supported API: true

Extendable: false

See Also:
MaturityHelper, MaturityService, MaturityServiceFwd

Method Summary
 PromotionNotice deletePromotionNotice(PromotionNotice pn)
          Deletes a PromotionNotice.
 PromotionNotice deletePromotionSeeds(PromotionNotice pn, WTSet promotables)
          Deletes the PromotionSeed link between the PromotionNotice and the Promotable.
 PromotionNotice deletePromotionTargets(PromotionNotice pn, WTSet promotables)
          Deletes the PromotionTarget link between the PromotionNotice and the Promotable.
 void generateViewables(WTCollection collection, PromotionNotice thePN, ConfigSpec configSpec, boolean defaultRep)
          Generate ProductView viewables.
 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(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
 QueryResult getPromotionSeeds(PromotionNotice pn)
          

Supported API: false
 QueryResult getPromotionTargets(PromotionNotice pn)
          Returns the PromotionTargets associated to the PromotionNotice.
 QueryResult getPromotionTargets(PromotionNotice pn, boolean onlyOtherSide)
          Returns the PromotionTargets associated to the PromotionNotice.
 WTKeyedHashMap getTargetPromotionNotices(WTCollection pSet)
          Returns a WTKeyedHashSet where the keys are the values of pSet and the values are a WTArrayList of PromotionTargets.
 boolean isAnyIterationInBaseline(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(Promotable promotable, PromotionNotice promotionNotice)
          Returns true, if the MaturityVersioned item iteration is part of the MaturityBaseline associated to the PromotionNotice.
 PromotionNotice savePromotionNotice(PromotionNotice pn)
          Persists the PromotionNotice.
 void savePromotionSeeds(PromotionNotice pn, WTSet promotables)
          Creates and persists PromotionSeeds between the PromotionNotice and the Promotables.
 WTSet savePromotionSeeds(WTSet psSet)
          Persists PromotionSeeds in the psVector.
 void savePromotionTargets(PromotionNotice pn, WTSet promotables)
          Creates and persists PromotionTargets between the PromotionNotice and the Promotables.
 WTSet savePromotionTargets(WTSet ptSet)
          Persists PromotionTargets in the ptVector.
 void unattachPromotable(Promotable refObject, PromotionNotice promotionNotice, Class linkClass, String maturityRole)
          Deletes the association between a PromotionNotice and a Promotable.
 

Method Detail

deletePromotionNotice

public PromotionNotice deletePromotionNotice(PromotionNotice pn)
                                      throws WTException,
                                             MaturityException
Deletes a PromotionNotice.

Supported API: false

Parameters:
pn -
Returns:
PromotionNotice
Throws:
WTException
MaturityException

savePromotionNotice

public PromotionNotice savePromotionNotice(PromotionNotice pn)
                                    throws WTException,
                                           MaturityException
Persists the PromotionNotice.

Supported API: false

Parameters:
pn -
Returns:
PromotionNotice
Throws:
WTException
MaturityException

deletePromotionTargets

public PromotionNotice deletePromotionTargets(PromotionNotice pn,
                                              WTSet promotables)
                                       throws WTException,
                                              MaturityException
Deletes the PromotionTarget link between the PromotionNotice and the Promotable.

Supported API: false

Parameters:
pn -
promotables -
Returns:
PromotionNotice
Throws:
WTException
MaturityException

getPromotionTargets

public QueryResult getPromotionTargets(PromotionNotice pn)
                                throws WTException,
                                       MaturityException
Returns the PromotionTargets associated to the PromotionNotice.

Supported API: false

Parameters:
pn -
Returns:
QueryResult
Throws:
WTException
MaturityException

savePromotionTargets

public void savePromotionTargets(PromotionNotice pn,
                                 WTSet promotables)
                          throws WTException,
                                 MaturityException,
                                 WTPropertyVetoException
Creates and persists PromotionTargets between the PromotionNotice and the Promotables.

Supported API: false

Parameters:
pn -
promotables -
Throws:
WTException
MaturityException
WTPropertyVetoException

unattachPromotable

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

Supported API: true

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

savePromotionTargets

public WTSet savePromotionTargets(WTSet ptSet)
                           throws WTException,
                                  MaturityException,
                                  WTPropertyVetoException
Persists PromotionTargets in the ptVector.

Supported API: false

Parameters:
ptSet -
Returns:
WTSet
Throws:
WTException
MaturityException
WTPropertyVetoException

savePromotionSeeds

public void savePromotionSeeds(PromotionNotice pn,
                               WTSet promotables)
                        throws WTException,
                               MaturityException
Creates and persists PromotionSeeds between the PromotionNotice and the Promotables.

Supported API: false

Parameters:
pn -
promotables -
Throws:
WTException
MaturityException

savePromotionSeeds

public WTSet savePromotionSeeds(WTSet psSet)
                         throws WTException,
                                MaturityException
Persists PromotionSeeds in the psVector.

Supported API: false

Parameters:
psSet -
Returns:
WTSet
Throws:
WTException
MaturityException

getPromotionSeeds

public QueryResult getPromotionSeeds(PromotionNotice pn)
                              throws WTException,
                                     MaturityException


Supported API: false

Parameters:
pn -
Returns:
QueryResult
Throws:
WTException
MaturityException

deletePromotionSeeds

public PromotionNotice deletePromotionSeeds(PromotionNotice pn,
                                            WTSet promotables)
                                     throws WTException,
                                            MaturityException
Deletes the PromotionSeed link between the PromotionNotice and the Promotable.

Supported API: false

Parameters:
pn -
promotables -
Returns:
PromotionNotice
Throws:
WTException
MaturityException

getBaselines

public QueryResult getBaselines(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

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

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

Parameters:
promotionNotice -
Returns:
QueryResult
Throws:
WTException

isInBaseline

public boolean isInBaseline(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

Parameters:
promotable -
promotionNotice -
Returns:
boolean
Throws:
WTException

isAnyIterationInBaseline

public boolean isAnyIterationInBaseline(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

Parameters:
promotable -
promotionNotice -
Returns:
boolean
Throws:
WTException

getPromotionTargets

public QueryResult getPromotionTargets(PromotionNotice pn,
                                       boolean onlyOtherSide)
                                throws WTException,
                                       MaturityException
Returns the PromotionTargets associated to the PromotionNotice. If the onlyOtherSide is true, the roleB objects are returned. If the onlyOtherSide is false, the PromotionTarget Links are returned.

Supported API: false

Parameters:
pn -
onlyOtherSide -
Returns:
QueryResult
Throws:
WTException
MaturityException

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

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

Parameters:
promotables -
Returns:
WTCollection
Throws:
WTException

generateViewables

public void generateViewables(WTCollection collection,
                              PromotionNotice thePN,
                              ConfigSpec configSpec,
                              boolean defaultRep)
                       throws WTException
Generate ProductView viewables.

Supported API: false

Parameters:
collection - Collection of objects that will have viewables generated.
thePN - PromotionNotice associated to the collection of objects.
configSpec - ConfigSpec used by ProductView viewable generation
defaultRep -
Throws:
WTException

getTargetPromotionNotices

public WTKeyedHashMap getTargetPromotionNotices(WTCollection pSet)
                                         throws WTException
Returns a WTKeyedHashSet where the keys are the values of pSet and the values are a WTArrayList of PromotionTargets.

Supported API: false

Parameters:
pSet - Set of Promotables
Returns:
WTKeyedHashMap
Throws:
WTException