LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.notifier
Class LyEventEncoder

java.lang.Object
  extended by leon.notifier.LyEventEncoder

public class LyEventEncoder
extends java.lang.Object

This class is used by DataSources to transmit events to an instance of LyEventConnection.

See Also:
LyEventConnection

Field Summary
static java.lang.String __VERSION
           
static java.lang.String TYPE_CREATION
          Name of the type CREATION.
static java.lang.String TYPE_DELETION
          Name of the type DELETION.
static java.lang.String TYPE_GROUP
          Name of the type GROUP.
static java.lang.String TYPE_MODIFICATION
          Name of the type MODIFICATION.
 
Constructor Summary
LyEventEncoder(LyEventNotifier notifier, LyDataSource dataSource)
          Default constructor Initialization is done with the init method.
 
Method Summary
 boolean postCreation(java.lang.Object object)
          Invoked when an object is created.
 boolean postDeletion(java.lang.Object object)
          Invoked when an object is deleted.
 boolean postGroupedEvent(java.lang.String groupId, LyEventNotifier.EventType type, java.lang.Object object, LyValueSet oldValues)
          Invoked to notify grouped events.
 boolean postModification(java.lang.Object object, LyValueSet oldValues)
          Invoked when an object is modified.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values

TYPE_MODIFICATION

public static final java.lang.String TYPE_MODIFICATION
Name of the type MODIFICATION.

See Also:
Constant Field Values

TYPE_CREATION

public static final java.lang.String TYPE_CREATION
Name of the type CREATION.

See Also:
Constant Field Values

TYPE_DELETION

public static final java.lang.String TYPE_DELETION
Name of the type DELETION.

See Also:
Constant Field Values

TYPE_GROUP

public static final java.lang.String TYPE_GROUP
Name of the type GROUP.

See Also:
Constant Field Values
Constructor Detail

LyEventEncoder

public LyEventEncoder(LyEventNotifier notifier,
                      LyDataSource dataSource)
Default constructor Initialization is done with the init method.

Parameters:
notifier - The associated notifier
dataSource - The datasource for which an event is encoded.
Method Detail

postDeletion

public boolean postDeletion(java.lang.Object object)
Invoked when an object is deleted.

Parameters:
object - object which is deleted.
Returns:
true if all is OK.

postCreation

public boolean postCreation(java.lang.Object object)
Invoked when an object is created. The notification is sent with values.

Parameters:
object - object which has been created.
Returns:
true if the event was sent successfully

postModification

public boolean postModification(java.lang.Object object,
                                LyValueSet oldValues)
Invoked when an object is modified. The notification is sent with values if oldValues is not set to null. If specified, old values must contain all modified fields.

Parameters:
object - object which has been modified.
oldValues - set of values which have been modified
Returns:
true if the event was sent successfully

postGroupedEvent

public boolean postGroupedEvent(java.lang.String groupId,
                                LyEventNotifier.EventType type,
                                java.lang.Object object,
                                LyValueSet oldValues)
Invoked to notify grouped events.

Parameters:
groupId - Id of the group of events. This id is used to group the notifications.
type - Type of the event. One of the NOTIF_XXX const in LyEventNotifier.
object - object impacted by the event.
oldValues - set of values which have been modified in case of NOTIF_UPDATE.
Returns:
true if the event was sent successfully

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com