ides.api.model.fsa
Class FSAMessage

java.lang.Object
  extended by ides.api.model.fsa.FSAMessage

public class FSAMessage
extends java.lang.Object

Message sent to subscribers listening for changes to a FSA.

Author:
helen bretzke

Field Summary
static int ADD
          The element was added.
static int EVENT
          The message is about an event.
static int MODIFY
          The element was modified.
static int REMOVE
          The element was removed.
static int STATE
          The message is about a state.
static int TRANSITION
          The message is about a transition.
 
Constructor Summary
FSAMessage(int eventType, int elementType, long elementId, FSAModel source)
          Creates an FSA modification message to be passed to FSASubscriber s.
FSAMessage(int eventType, int elementType, long elementId, FSAModel source, java.lang.String messageText)
          Creates an FSA modification message to be passed to FSASubscriber s.
 
Method Summary
 long getElementId()
          Retrieve the ID of the element in the message.
 int getElementType()
          Retrieve the type of the element in the message.
 int getEventType()
          Retrieve the type of event (addition, removal or modification).
 java.lang.String getMessageText()
          Retrieve the description of the message.
 FSAModel getSource()
          Retrieve the source of the message.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATE

public static final int STATE
The message is about a state.

See Also:
Constant Field Values

TRANSITION

public static final int TRANSITION
The message is about a transition.

See Also:
Constant Field Values

EVENT

public static final int EVENT
The message is about an event.

See Also:
Constant Field Values

ADD

public static final int ADD
The element was added.

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
The element was removed.

See Also:
Constant Field Values

MODIFY

public static final int MODIFY
The element was modified.

See Also:
Constant Field Values
Constructor Detail

FSAMessage

public FSAMessage(int eventType,
                  int elementType,
                  long elementId,
                  FSAModel source)
Creates an FSA modification message to be passed to FSASubscriber s.

Parameters:
eventType - the type of event (addition, removal or modification)
elementType - the element type (state, transition or event)
elementId - the ID of the element
source - the FSAModel where the message originates

FSAMessage

public FSAMessage(int eventType,
                  int elementType,
                  long elementId,
                  FSAModel source,
                  java.lang.String messageText)
Creates an FSA modification message to be passed to FSASubscriber s.

Parameters:
eventType - the type of event (addition, removal or modification)
elementType - the element type (state, transition or event)
elementId - the ID of the element
source - the FSAModel where the message originates
messageText - a description of the message
Method Detail

getElementId

public long getElementId()
Retrieve the ID of the element in the message.

Returns:
the ID of the element in the message

getElementType

public int getElementType()
Retrieve the type of the element in the message.

Returns:
the type of the element in the message

getEventType

public int getEventType()
Retrieve the type of event (addition, removal or modification).

Returns:
the type of event (addition, removal or modification)

getSource

public FSAModel getSource()
Retrieve the source of the message.

Returns:
the source of the message

getMessageText

public java.lang.String getMessageText()
Retrieve the description of the message.

Returns:
the description of the message