LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.notifier
Class LyEventDecoder

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

public class LyEventDecoder
extends java.lang.Object

This class is used to decode events received from the notification service and update the DataSource.

See Also:
LyEventConnection

Field Summary
static java.lang.String __VERSION
           
 
Constructor Summary
LyEventDecoder(LyEventNotifier notifier, LyDataSource dataSource)
          Default constructor Initialization is done with the init method.
 
Method Summary
 LyValueSet commitChanges(java.lang.Object object, LyValueSet values)
          Utility method to get and commit the modifications in an object (peer).
 boolean receiveCreation(LyObjectId objectId, LyValueSet values)
          Invoked when an object is created.
 boolean receiveCreation(java.lang.String id, LyValueSet values)
          Invoked when an object is created.
 boolean receiveDeletion(LyObjectId objectId)
          Invoked when an object is deleted.
 boolean receiveDeletion(java.lang.String id)
          Invoked when an object is deleted.
 boolean receiveModification(LyObjectId objectId, LyValueSet values)
          Invoked when an object is modified.
 boolean receiveModification(java.lang.String id, LyValueSet values)
          Invoked when an object is modified.
 void setGroupId(java.lang.String groupId)
          Sets group id for this decoder.
 
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
Constructor Detail

LyEventDecoder

public LyEventDecoder(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 decoded.
Method Detail

setGroupId

public void setGroupId(java.lang.String groupId)
Sets group id for this decoder.

Parameters:
groupId - Id of the group of messages received by this decoder.

receiveModification

public boolean receiveModification(java.lang.String id,
                                   LyValueSet values)
Invoked when an object is modified.

Parameters:
id - object identifier
values - list of modified values of the object; May be null if not specified.
Returns:
true id all is OK.

receiveModification

public boolean receiveModification(LyObjectId objectId,
                                   LyValueSet values)
Invoked when an object is modified.

Parameters:
objectId - object identifier
values - list of modified values of the object; May be null if not specified.
Returns:
true if all is OK.

commitChanges

public LyValueSet commitChanges(java.lang.Object object,
                                LyValueSet values)
Utility method to get and commit the modifications in an object (peer). Current implementation is valid for instances of LyRowObject, otherwise this method should be overriden.

Parameters:
object - current object being modified
values - The changed values.
Returns:
the modifications, or null if the modifications are unkwnown

receiveCreation

public boolean receiveCreation(java.lang.String id,
                               LyValueSet values)
Invoked when an object is created.

Parameters:
id - object identifier
values - list of values of the created object; May be null if not specified.
Returns:
true if all is OK.

receiveCreation

public boolean receiveCreation(LyObjectId objectId,
                               LyValueSet values)
Invoked when an object is created.

Parameters:
objectId - object identifier
values - list of values of the created object; May be null if not specified.
Returns:
true if all is OK.

receiveDeletion

public boolean receiveDeletion(java.lang.String id)
Invoked when an object is deleted. This method builds the LyObjectId and calls receiveDeletion(LyObjectId)

Parameters:
id - deleted object id
Returns:
true if the deletion was successful
See Also:
receiveDeletion(LyObjectId)

receiveDeletion

public boolean receiveDeletion(LyObjectId objectId)
Invoked when an object is deleted. This method implements the impact on the data layer.

Parameters:
objectId - deleted object id
Returns:
true if the deletion was successful

(c) January 2013 - W4 S.A.

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