ides.api.core
Class WorkspaceMessage

java.lang.Object
  extended by ides.api.core.WorkspaceMessage

public class WorkspaceMessage
extends java.lang.Object

Message sent by Workspace to classes that implement WorkspaceSubscriber i.e. that subscribe to change notifications from the workspace containing multiple discrete event system models.

Author:
Helen Bretzke

Field Summary
static int ADD
          Addition of a model.
static int MODIFY
          Other change of the workspace which cannot be described as addition or removal of a model, such as switching the active model.
static int REMOVE
          Removal of a model.
 
Constructor Summary
WorkspaceMessage(java.lang.String name, int eventType)
          Creates a change notification message for the given model and event type.
WorkspaceMessage(java.lang.String name, int eventType, java.lang.String messageText)
          Creates a change notification message for the given model, event type and descriptive text.
 
Method Summary
 int getEventType()
          Returns the type of event that occurred.
 java.lang.String getMessageText()
          Returns a string describing the message.
 java.lang.String getModelName()
          Returns the name of the model that was changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADD

public static final int ADD
Addition of a model.

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
Removal of a model.

See Also:
Constant Field Values

MODIFY

public static final int MODIFY
Other change of the workspace which cannot be described as addition or removal of a model, such as switching the active model.

See Also:
Constant Field Values
Constructor Detail

WorkspaceMessage

public WorkspaceMessage(java.lang.String name,
                        int eventType,
                        java.lang.String messageText)
Creates a change notification message for the given model, event type and descriptive text.

Parameters:
name - the model's name
eventType - ADD, REMOVE or MODIFY
messageText - descriptive message as a string

WorkspaceMessage

public WorkspaceMessage(java.lang.String name,
                        int eventType)
Creates a change notification message for the given model and event type. Descriptive text is blank.

Parameters:
name - the model's name
eventType - ADD, REMOVE or MODIFY
Method Detail

getEventType

public int getEventType()
Returns the type of event that occurred.

Returns:
the type of event that occurred

getModelName

public java.lang.String getModelName()
Returns the name of the model that was changed.

Returns:
the name of the model that was changed

getMessageText

public java.lang.String getMessageText()
Returns a string describing the message.

Returns:
a description of the change event