Extension SDK 10.1.2

oracle.ide.addin
Class Message

java.lang.Object
  extended byoracle.ide.addin.Message
Direct Known Subclasses:
UpdateMessage, VetoableMessage

public class Message
extends java.lang.Object

The Message class is the base class for messages send to an link oracle.ide.addin.Observer} to notify it about a Subject pending change and past change. An update message consists of four lists: add, remove, modify, and container lists. A subject simply includes all applicable change information in one or more update messages.

See Also:
Observer, Subject

Field Summary
protected  java.util.List add
          Lists new object creations that may have ocurred during a subject change
static java.lang.String COMMAND_ID_PROP
          The command ID property key.
protected  java.util.List container
          Lists the parents of objects recorded in add, remove, and/or modify lists
protected  Context context
          Holds the context under which notification is taking place.
protected  int messageID
          records the message id
protected  java.util.Map messageProperties
          Holds the user properties associated with this message.
protected  java.util.List modify
          Lists object modifications that may have ocurred during a subject change
protected  java.lang.Object origin
          records the Object which originated the message
protected  java.util.List remove
          Lists object deletions that may have ocurred during a subject change
 
Constructor Summary
Message(int messageID, java.lang.Object origin)
          Constructs an update message of the specified message id.
Message(Message msg)
          Constructs a new Message object which is a copy of the supplied Message.
 
Method Summary
 java.util.List getAddObjects()
          Retrieves the list of objects added during a Subject change.
 Context getContext()
          Get the context under which notification is taking place.
 java.lang.Object getExtraData()
          Get the user data associated with this message.
 int getMessageID()
          Retrieves the message identifier.
 java.util.List getModifyObjects()
          Retrieves the list of objects modified during a Subject change.
 java.lang.Object getOrigin()
          Retrieves the originator of the message.
 java.lang.Object getProperty(java.lang.Object key)
          Get the user property associated with this message.
 java.util.List getRemoveObjects()
          Retrieves the list of objects removed during a Subject change.
 void setContext(Context context)
          Set the context under which notification is taking place.
 void setExtraData(java.lang.Object extraData)
          Set the user data to be associated with this message.
 void setProperty(java.lang.Object key, java.lang.Object property)
          Stores the property to be associated with this message with the supplied key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMMAND_ID_PROP

public static final java.lang.String COMMAND_ID_PROP
The command ID property key.

See Also:
Constant Field Values

messageID

protected int messageID
records the message id


origin

protected java.lang.Object origin
records the Object which originated the message


add

protected java.util.List add
Lists new object creations that may have ocurred during a subject change


remove

protected java.util.List remove
Lists object deletions that may have ocurred during a subject change


modify

protected java.util.List modify
Lists object modifications that may have ocurred during a subject change


container

protected java.util.List container
Lists the parents of objects recorded in add, remove, and/or modify lists


context

protected Context context
Holds the context under which notification is taking place.


messageProperties

protected final java.util.Map messageProperties
Holds the user properties associated with this message.

Constructor Detail

Message

public Message(int messageID,
               java.lang.Object origin)
Constructs an update message of the specified message id.

Parameters:
origin - the Object which originated this message. Usually an Observer.
messageID - the message identifier.

Message

public Message(Message msg)
Constructs a new Message object which is a copy of the supplied Message.

Parameters:
msg - A Message object.
Method Detail

getMessageID

public int getMessageID()
Retrieves the message identifier.

Returns:
the message identifier.

getOrigin

public java.lang.Object getOrigin()
Retrieves the originator of the message. Usually an Observer.

Returns:
the originator of the message.

getAddObjects

public java.util.List getAddObjects()
Retrieves the list of objects added during a Subject change.

Returns:
the list of objects added during a Subject change.

getRemoveObjects

public java.util.List getRemoveObjects()
Retrieves the list of objects removed during a Subject change.

Returns:
the list of objects removed during a Subject change.

getModifyObjects

public java.util.List getModifyObjects()
Retrieves the list of objects modified during a Subject change.

Returns:
the list of objects modified during a Subject change.

getContext

public Context getContext()
Get the context under which notification is taking place.


setContext

public void setContext(Context context)
Set the context under which notification is taking place.


getExtraData

public java.lang.Object getExtraData()
Get the user data associated with this message.


setExtraData

public void setExtraData(java.lang.Object extraData)
Set the user data to be associated with this message.


getProperty

public java.lang.Object getProperty(java.lang.Object key)
Get the user property associated with this message.

Parameters:
key - the property lookup key.

setProperty

public void setProperty(java.lang.Object key,
                        java.lang.Object property)
Stores the property to be associated with this message with the supplied key. If the property is null, the supplied key is removed from the map.

Parameters:
key - the key to use to store and look up this property.
property - the property value. If null, the proerty key is removed from the map.

Extension SDK

 

Copyright © 1997, 2004, Oracle. All rights reserved.