Extension SDK 10.1.2

oracle.ide.addin
Class VetoableMessage

java.lang.Object
  extended byoracle.ide.addin.Message
      extended byoracle.ide.addin.VetoableMessage

public class VetoableMessage
extends Message

The VetoableMessage class is the vetoable message send to an VetoObserver to notify it about an impending VetoableSubject change.

This class also defines a set of constants identifying specific changes, such as:

See Also:
VetoObserver, VetoableSubject

Field Summary
static int CAN_ADD_CHILD
          Indicates that children are about to be added to a folder object.
static int CAN_CLOSE_OBJECT
          Indiates that the object is about to be closed.
static int CAN_REMOVE_CHILD
          Indicates that children of a folder object is about to be removed.
static int CAN_RENAME_CHILD
          Indicates the child is about to be renamed.
 
Fields inherited from class oracle.ide.addin.Message
add, COMMAND_ID_PROP, container, context, messageID, messageProperties, modify, origin, remove
 
Constructor Summary
VetoableMessage(int messageID, java.lang.Object origin)
          Constructs an update message of the specified message id.
 
Method Summary
static void fireCanAddChild(VetoableSubject subject, java.lang.Object element)
          This method sends an VetoableMessage whose ID is CAN_ADD_CHILD to all Observers of the specified Subject.
static void fireCanAddChildren(VetoableSubject subject, java.util.Collection childElements)
          This method sends an VetoableMessage whose ID is CAN_ADD_CHILD to all Observers of the specified Subject.
static void fireCanRemoveChild(VetoableSubject subject, java.lang.Object element)
          This method sends an VetoableMessage whose ID is CAN_REMOVE_CHILD to all Observers of the specified VetoableSubject.
static void fireCanRemoveChildren(VetoableSubject subject, java.util.Collection childElements)
          This method sends an VetoableMessage whose ID is CAN_REMOVE_CHILD to all Observers of the specified VetoableSubject.
static void fireCanRenameChild(VetoableSubject subject, java.lang.Object child)
          This method sends an VetoableMessage whose ID is CAN_RENAME_CHILD to all Observers of the specified VetoableSubject.
static int getUniqueMessageID()
           
 
Methods inherited from class oracle.ide.addin.Message
getAddObjects, getContext, getExtraData, getMessageID, getModifyObjects, getOrigin, getProperty, getRemoveObjects, setContext, setExtraData, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CAN_REMOVE_CHILD

public static final int CAN_REMOVE_CHILD
Indicates that children of a folder object is about to be removed. The suject of the message is the container that owns the child.

See Also:
Constant Field Values

CAN_ADD_CHILD

public static final int CAN_ADD_CHILD
Indicates that children are about to be added to a folder object. The suject of the message is the container that owns the child.

See Also:
Constant Field Values

CAN_RENAME_CHILD

public static final int CAN_RENAME_CHILD
Indicates the child is about to be renamed. The suject of the message is the object about to be renamed.

See Also:
Constant Field Values

CAN_CLOSE_OBJECT

public static final int CAN_CLOSE_OBJECT
Indiates that the object is about to be closed. The suject of the message is the object about to be closed.

See Also:
Constant Field Values
Constructor Detail

VetoableMessage

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

getUniqueMessageID

public static int getUniqueMessageID()

fireCanAddChild

public static void fireCanAddChild(VetoableSubject subject,
                                   java.lang.Object element)
                            throws ChangeVetoException
This method sends an VetoableMessage whose ID is CAN_ADD_CHILD to all Observers of the specified Subject. The specified Element is the content of the "add objects" of the message.

Parameters:
subject - The Subject whose Observers are to be notified.
element - The that makes up the "add objects" content of the message.
Throws:
ChangeVetoException

fireCanAddChildren

public static void fireCanAddChildren(VetoableSubject subject,
                                      java.util.Collection childElements)
                               throws ChangeVetoException
This method sends an VetoableMessage whose ID is CAN_ADD_CHILD to all Observers of the specified Subject. The specified Collection of Element instances is the content of the "add objects" of the message.

Parameters:
subject - The Subject whose Observers are to be notified.
childElements - The Collection of Element instances that make up the "add objects" of the message.
Throws:
ChangeVetoException

fireCanRemoveChild

public static void fireCanRemoveChild(VetoableSubject subject,
                                      java.lang.Object element)
                               throws ChangeVetoException
This method sends an VetoableMessage whose ID is CAN_REMOVE_CHILD to all Observers of the specified VetoableSubject. The specified Element is the content of the "remove objects" of the message.

Parameters:
subject - The VetoableSubject whose Observers are to be notified.
element - The Element that makes up the "remove objects" content of the message.
Throws:
ChangeVetoException

fireCanRemoveChildren

public static void fireCanRemoveChildren(VetoableSubject subject,
                                         java.util.Collection childElements)
                                  throws ChangeVetoException
This method sends an VetoableMessage whose ID is CAN_REMOVE_CHILD to all Observers of the specified VetoableSubject. The specified Collection of Element instances is the content of the "remove objects" of the message.

Parameters:
subject - The VetoableSubject whose Observers are to be notified.
childElements - The Collection of Element instances that make up the "remove objects" of the message.
Throws:
ChangeVetoException

fireCanRenameChild

public static void fireCanRenameChild(VetoableSubject subject,
                                      java.lang.Object child)
                               throws ChangeVetoException
This method sends an VetoableMessage whose ID is CAN_RENAME_CHILD to all Observers of the specified VetoableSubject.

Parameters:
subject - The VetoableSubject whose Observers are to be notified.
child - The child about to be renamed.
Throws:
ChangeVetoException

Extension SDK

 

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