wt.ownership
Class OwnershipServiceEvent

java.lang.Object
  extended bywt.events.KeyedEvent
      extended bywt.ownership.OwnershipServiceEvent
All Implemented Interfaces:
Serializable

public class OwnershipServiceEvent
extends KeyedEvent
implements Serializable

The event emitted when Ownership operations occur on an Ownable object. The event contains information which indicates the specify type of event that happened, the Ownable object that it occured on and other related information. The event is emitted in response to operations of the OwnershipService.

Supported API: false

Extendable: false

See Also:
OwnershipService, StandardManager, Serialized Form

Field Summary
private  boolean changeCommited
           
private static String CLASSNAME
           
private  Ownership ownership
           
static String POST_CHANGEOWNER
          An eventType value that indicates the event is being emitted just after the change of ownership.
static String PRE_CHANGEOWNER
          An eventType value that indicates the event is being emitted just prior to the change of ownership.
private static String RESOURCE
           
 
Fields inherited from class wt.events.KeyedEvent
 
Constructor Summary
OwnershipServiceEvent(String eventType, Ownable obj, Ownership new_ownership, boolean commited)
          Constructs an OwnershipServiceEvent.
OwnershipServiceEvent(String eventType, WTCollection obj, Ownership new_ownership, boolean commited)
          Constructs a multi object OwnershipServiceEvent.
 
Method Summary
static String generateEventKey(String eventType)
          Generates a Key for the event for the StandardManager event dispatcher.
 Ownership getOwnership()
          Gets the value of the attribute: ownership; This object contains the new Ownership for the object.
 Ownable getTarget()
          Return the Ownable object that is the target of this event.
 boolean isChangeCommited()
          Gets the value of the attribute: changeCommited; This boolean indicates that for the event, will the change be commited in the database.
protected  void setChangeCommited(boolean a_ChangeCommited)
          Sets the value of the attribute: changeCommited; This boolean indicates that for the event, will the change be commited in the database.
protected  void setOwnership(Ownership a_Ownership)
          Sets the value of the attribute: ownership; This object contains the new Ownership for the 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_CHANGEOWNER

public static final String PRE_CHANGEOWNER
An eventType value that indicates the event is being emitted just prior to the change of ownership.

Supported API: false

See Also:
KeyedEvent, Constant Field Values

POST_CHANGEOWNER

public static final String POST_CHANGEOWNER
An eventType value that indicates the event is being emitted just after the change of ownership.

Supported API: false

See Also:
KeyedEvent, Constant Field Values

changeCommited

private boolean changeCommited

ownership

private Ownership ownership
Constructor Detail

OwnershipServiceEvent

public OwnershipServiceEvent(String eventType,
                             Ownable obj,
                             Ownership new_ownership,
                             boolean commited)
                      throws WTException
Constructs an OwnershipServiceEvent.

Supported API: false

Parameters:
eventType -
obj -
new_ownership -
commited -
Throws:
WTException

OwnershipServiceEvent

public OwnershipServiceEvent(String eventType,
                             WTCollection obj,
                             Ownership new_ownership,
                             boolean commited)
                      throws WTException
Constructs a multi object OwnershipServiceEvent. Values for Ownership and commited flag are same for a collection of target objects

Supported API: false

Parameters:
eventType -
obj -
new_ownership -
commited -
Throws:
WTException
Method Detail

isChangeCommited

public boolean isChangeCommited()
Gets the value of the attribute: changeCommited; This boolean indicates that for the event, will the change be commited in the database. If true, the event is emitted inside a direct transaction. If false, the service has not put the operation in a transaction, but the operation may be in a larger transaction.

Supported API: false

Returns:
boolean

setChangeCommited

protected void setChangeCommited(boolean a_ChangeCommited)
Sets the value of the attribute: changeCommited; This boolean indicates that for the event, will the change be commited in the database. If true, the event is emitted inside a direct transaction. If false, the service has not put the operation in a transaction, but the operation may be in a larger transaction.

Supported API: false

Parameters:
a_ChangeCommited -

getOwnership

public Ownership getOwnership()
Gets the value of the attribute: ownership; This object contains the new Ownership for the object. This information is the same for both the PRE and POST events.

Supported API: false

Returns:
Ownership

setOwnership

protected void setOwnership(Ownership a_Ownership)
Sets the value of the attribute: ownership; This object contains the new Ownership for the object. This information is the same for both the PRE and POST events.

Supported API: false

Parameters:
a_Ownership -

generateEventKey

public static String generateEventKey(String eventType)
Generates a Key for the event for the StandardManager event dispatcher.

Supported API: false

Parameters:
eventType -
Returns:
String

getTarget

public Ownable getTarget()
Return the Ownable object that is the target of this event. A type specific return for getEventTarget() of KeyedEvent.

Supported API: false

Returns:
Ownable
See Also:
KeyedEvent

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