LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LyDataSourceEvent

java.lang.Object
  extended by leon.data.LyDataSourceEvent
Direct Known Subclasses:
LyAdvancedDataSourceEvent

public class LyDataSourceEvent
extends java.lang.Object

This class implements an event of creation/modification/deletion for an object within a data source. The event is sent to 'registered listeners' : classes which implements the LyDataSourceListener interface and which were added as listener of the dataSource.

See Also:
LyDataSource, LyDataSourceListener

Field Summary
static java.lang.String __VERSION
          File version
static short LAST_TYPE
          Constant : LAST_TYPE, the last number type used by Leonardi.
static short TYPE_ALL
          Event type : ALL, all the types of events.
static short TYPE_CREATE
          Event type : CREATE, creation of one object. creating a new object
static short TYPE_DELETE
          Event type : DELETE, deletion of one object.
static short TYPE_ERROR
          Event type : ERROR_CHANGED, state change of one object.
static short TYPE_ERROR_ADDED
          Event type : ERROR_ADDED, error added to one object.
static short TYPE_ERROR_REMOVED
          Event type : ERROR_REMOVED, error removed from one object.
static short TYPE_SELECTION
          Event type : SELECTION_CHANGED, selection change of one object.
static short TYPE_SET
          Event type : SET, modification of one object.
static short TYPE_VISIBILITY
          Event type : VISIBILITY_CHANGED, visibility change of one object.
 
Constructor Summary
LyDataSourceEvent(LyDataSource source, short type, java.lang.Object object)
          Constructs a data source event of the given type with no associated values.
LyDataSourceEvent(LyDataSource source, short type, java.lang.Object object, LyValueSet values)
          Constructs a data source event of the given type with the specified values.
 
Method Summary
 LyError getError()
          Gets the error raised or removed o the object concerned by this event.
 LyEventInfo getEventInfo()
           
 java.lang.String getGroupId()
          Access to the group identifier of this event.
 java.lang.Object getObject()
          Gets object concerned by this notification.
 LyDataSource getSource()
          Gets data source which created and threw this event.
 short getType()
          Gets type of this event.
 LyValueSet getValues()
          Gets the set of values associated to this event.
 boolean isLoading()
          Access to the 'loading' status.
 boolean isLocal()
          Access to the 'local' status.
 boolean isNotified()
          Access to the 'notified' status.
 void setEventInfo(LyEventInfo eventInfo)
           
 
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
File version

See Also:
Constant Field Values

TYPE_ALL

public static final short TYPE_ALL
Event type : ALL, all the types of events.

See Also:
Constant Field Values

TYPE_CREATE

public static final short TYPE_CREATE
Event type : CREATE, creation of one object. creating a new object

See Also:
Constant Field Values

TYPE_SET

public static final short TYPE_SET
Event type : SET, modification of one object.

See Also:
Constant Field Values

TYPE_DELETE

public static final short TYPE_DELETE
Event type : DELETE, deletion of one object.

See Also:
Constant Field Values

TYPE_SELECTION

public static final short TYPE_SELECTION
Event type : SELECTION_CHANGED, selection change of one object.

See Also:
Constant Field Values

TYPE_VISIBILITY

public static final short TYPE_VISIBILITY
Event type : VISIBILITY_CHANGED, visibility change of one object.

See Also:
Constant Field Values

TYPE_ERROR

public static final short TYPE_ERROR
Event type : ERROR_CHANGED, state change of one object.

See Also:
Constant Field Values

TYPE_ERROR_ADDED

public static final short TYPE_ERROR_ADDED
Event type : ERROR_ADDED, error added to one object.

See Also:
Constant Field Values

TYPE_ERROR_REMOVED

public static final short TYPE_ERROR_REMOVED
Event type : ERROR_REMOVED, error removed from one object.

See Also:
Constant Field Values

LAST_TYPE

public static final short LAST_TYPE
Constant : LAST_TYPE, the last number type used by Leonardi. User types must be greater than this value.

See Also:
Constant Field Values
Constructor Detail

LyDataSourceEvent

public LyDataSourceEvent(LyDataSource source,
                         short type,
                         java.lang.Object object,
                         LyValueSet values)
Constructs a data source event of the given type with the specified values.

Parameters:
source - Transmitter which created the event.
type - Type of event which occured. One of the TYPE_XXX constants.
object - Object concerned by this notification.
values - Set of values associated to this event. May be null.

LyDataSourceEvent

public LyDataSourceEvent(LyDataSource source,
                         short type,
                         java.lang.Object object)
Constructs a data source event of the given type with no associated values.

Parameters:
source - Transmitter which created the event.
type - Type of event which occured. One of the TYPE_XXX constants.
object - Object concerned by this notification.
Method Detail

getType

public short getType()
Gets type of this event.

Returns:
Type of this event. One of the TYPE_XXX constants

getSource

public LyDataSource getSource()
Gets data source which created and threw this event.

Returns:
Data source which transmits this event.

getObject

public java.lang.Object getObject()
Gets object concerned by this notification.

Returns:
Object concerned by this event.

getValues

public LyValueSet getValues()
Gets the set of values associated to this event.

Returns:
Set of values of this event (may be null).

getError

public LyError getError()
Gets the error raised or removed o the object concerned by this event. Used for event types : TYPE_ERROR, TYPE_ERROR_ADDED, TYPE_ERROR_REMOVED.

Returns:
The error (may be null).

isLoading

public boolean isLoading()
Access to the 'loading' status. An event has loading status set to true if it was created from a load request. Internal use only (daemons)

Returns:
True if this event corresponds to a loading, false otherwise.

isNotified

public boolean isNotified()
Access to the 'notified' status. An event has notified status set to true if it was created from a notification. Internal use only (daemons)

Returns:
True if this event corresponds to a notification, false otherwise.

isLocal

public boolean isLocal()
Access to the 'local' status. An event has local status set to true if it was created from a local operation. Internal use only (daemons)

Returns:
True if this event is local, false otherwise.

getGroupId

public java.lang.String getGroupId()
Access to the group identifier of this event.

Returns:
The group identifier of this event. May be null if the event is not grouped.

getEventInfo

public LyEventInfo getEventInfo()
Returns:
Returns the eventInfo.

setEventInfo

public void setEventInfo(LyEventInfo eventInfo)
Parameters:
eventInfo - The eventInfo to set.

(c) January 2013 - W4 S.A.

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