wt.vc.baseline
Class BaselineServiceEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.vc.baseline.BaselineServiceEvent
All Implemented Interfaces:
Serializable

public final class BaselineServiceEvent
extends KeyedEvent
implements Serializable

This class implements an event for the Baseline service operations.

Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String POST_ADD_BASELINE
          An event type emitted after a Baselineable item is added to a Baseline.
static String POST_REMOVE_BASELINE
          An event type emitted after a Baselineable item is removed from a Baseline.
static String POST_REPLACE_BASELINE
          An event type emitted after a Baselineable item is replaced in a Baseline.
static String PRE_ADD_BASELINE
          An event type emitted before a Baselineable item is added to a Baseline.
static String PRE_REMOVE_BASELINE
          An event type emitted before a Baselineable item is removed from a Baseline.
static String PRE_REPLACE_BASELINE
          An event type emitted before a Baselineable item is replaced in a Baseline.
private  Baselineable replacedItem
           
private static String RESOURCE
           
private  Baseline theBaseline
           
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
BaselineServiceEvent(String a_eventType, Baselineable a_baselineable, Baseline a_baseline)
          Constructs a BaselineServiceEvent instance.
BaselineServiceEvent(String a_eventType, Baselineable a_baselineable, Baseline a_baseline, Baselineable a_replacedBaselineable)
          Constructs a BaselineServiceEvent instance.
BaselineServiceEvent(String a_eventType, WTCollection a_baselineables, Baseline a_baseline)
          Constructs a multi obejct BaselineServiceEvent instance for ADD and REMOVE events where list Baselineable objects are passed in as WTCollection for single Baseline.
BaselineServiceEvent(String a_eventType, WTValuedMap a_baselineables, Baseline a_baseline)
          Constructs a multi obejct BaselineServiceEvent instance for REPLACE event where a map of new and old Baselineable objects are passed in as WTValuedMap for single Baseline.
 
Method Summary
static String generateEventKey(String a_eventType)
          This method generates a unique key for the event type.
 Baseline getBaseline()
          Gets the object for the association that plays role: theBaseline.
 Baselineable getReplacedItem()
          Gets the object for the association that plays role: replacedItem.
 WTCollection getTargetCollection()
          Returns WTCollection of target object.
 Baselineable getTargetItem()
          Gets the object for the association that plays role: targetItem.
 WTCollection getTargetItems()
          Returns WTCollection of target items.
 WTValuedMap getTargetMap()
          Returns WTValuedMap of target object.
 KeyedEvent toMultiObjectEvent()
          

Supported API: false
 KeyedEvent[] toSingleObjectEvents()
          

Supported API: false
 
Methods inherited from class wt.events.KeyedEvent
generateEventKey, generateEventKey, getConceptualClassname, getEventKey, getEventTarget, getEventType, 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

PRE_ADD_BASELINE

public static final String PRE_ADD_BASELINE
An event type emitted before a Baselineable item is added to a Baseline.

Supported API: true

See Also:
Constant Field Values

POST_ADD_BASELINE

public static final String POST_ADD_BASELINE
An event type emitted after a Baselineable item is added to a Baseline.

Supported API: true

See Also:
Constant Field Values

PRE_REMOVE_BASELINE

public static final String PRE_REMOVE_BASELINE
An event type emitted before a Baselineable item is removed from a Baseline.

Supported API: true

See Also:
Constant Field Values

POST_REMOVE_BASELINE

public static final String POST_REMOVE_BASELINE
An event type emitted after a Baselineable item is removed from a Baseline.

Supported API: true

See Also:
Constant Field Values

PRE_REPLACE_BASELINE

public static final String PRE_REPLACE_BASELINE
An event type emitted before a Baselineable item is replaced in a Baseline.

Supported API: true

See Also:
Constant Field Values

POST_REPLACE_BASELINE

public static final String POST_REPLACE_BASELINE
An event type emitted after a Baselineable item is replaced in a Baseline.

Supported API: true

See Also:
Constant Field Values

theBaseline

private Baseline theBaseline

replacedItem

private Baselineable replacedItem
Constructor Detail

BaselineServiceEvent

public BaselineServiceEvent(String a_eventType,
                            Baselineable a_baselineable,
                            Baseline a_baseline)
Constructs a BaselineServiceEvent instance.

Supported API: true

Parameters:
a_eventType -
a_baselineable -
a_baseline -

BaselineServiceEvent

public BaselineServiceEvent(String a_eventType,
                            Baselineable a_baselineable,
                            Baseline a_baseline,
                            Baselineable a_replacedBaselineable)
Constructs a BaselineServiceEvent instance.

Supported API: true

Parameters:
a_eventType -
a_baselineable -
a_baseline -
a_replacedBaselineable -

BaselineServiceEvent

public BaselineServiceEvent(String a_eventType,
                            WTCollection a_baselineables,
                            Baseline a_baseline)
Constructs a multi obejct BaselineServiceEvent instance for ADD and REMOVE events where list Baselineable objects are passed in as WTCollection for single Baseline.

Supported API: true

Parameters:
a_eventType -
a_baselineables -
a_baseline -

BaselineServiceEvent

public BaselineServiceEvent(String a_eventType,
                            WTValuedMap a_baselineables,
                            Baseline a_baseline)
Constructs a multi obejct BaselineServiceEvent instance for REPLACE event where a map of new and old Baselineable objects are passed in as WTValuedMap for single Baseline.

Supported API: true

Parameters:
a_eventType -
a_baselineables -
a_baseline -
Method Detail

getTargetItem

public Baselineable getTargetItem()
Gets the object for the association that plays role: targetItem.

Supported API: true

Returns:
Baselineable

getBaseline

public Baseline getBaseline()
Gets the object for the association that plays role: theBaseline.

Supported API: true

Returns:
Baseline

getReplacedItem

public Baselineable getReplacedItem()
Gets the object for the association that plays role: replacedItem.

Supported API: true

Returns:
Baselineable

generateEventKey

public static String generateEventKey(String a_eventType)
This method generates a unique key for the event type.

Supported API: true

Parameters:
a_eventType -
Returns:
String

getTargetItems

public WTCollection getTargetItems()
Returns WTCollection of target items.
For ADD and REMOVE events it returns the collection of Baselineable items.
For REPLACE event this method returns WTSet of the Map keys which is a collection of Replacing Baselineable items.

Supported API: false

Returns:
WTCollection

toSingleObjectEvents

public KeyedEvent[] toSingleObjectEvents()
                                  throws WTException


Supported API: false

Overrides:
toSingleObjectEvents in class KeyedEvent
Returns:
KeyedEvent[]
Throws:
WTException

toMultiObjectEvent

public KeyedEvent toMultiObjectEvent()


Supported API: false

Overrides:
toMultiObjectEvent in class KeyedEvent
Returns:
KeyedEvent

getTargetCollection

public WTCollection getTargetCollection()
Returns WTCollection of target object.

Supported API: false

Returns:
WTCollection

getTargetMap

public WTValuedMap getTargetMap()
Returns WTValuedMap of target object.

Supported API: false

Returns:
WTValuedMap