Class MQExtObject

java.lang.Object
com.ibm.mq.explorer.ui.internal.objects.MQExtObjectBase
com.ibm.mq.explorer.ui.extensions.MQExtObject
All Implemented Interfaces:
org.eclipse.ui.IActionFilter
Direct Known Subclasses:
MQQmgrExtObject, MQSetExtObject

public class MQExtObject extends com.ibm.mq.explorer.ui.internal.objects.MQExtObjectBase
In MQExplorer, there is an object underlying the treenodes, contentpages and tableitems. For example there is a Queue Manager object underlying a QueueManager TreeNode and its ContentPage, and there is a Queue object underlying each Queue shown in the table in the Queues contentpage.

The MQExplorer datamodel notifies the MQExplorer UI when events happen to these objects, For example when a new Queue Manager is created, the datamodel sends an event to the UI which typically reacts by creating a new Treeode in the navigator view.

To enable a user written extensions to also react to these events, MQExplorer UI passes on events of to plugins which extend the com.ibm.mq.explorer.ui.registerplugin extension point and supplies a class which extends IExplorerNotify

This Class is the external represention of an MQ Object. MQExplorer will call the notification methods in IExplorerNotifywhich typically include an instance to one of these MQExtObjects

The user written plugin which recieves these notifications of events will typically take some appropiate action depending on the type of event, the object type, name and state.

  • Field Details

  • Constructor Details

    • MQExtObject

      public MQExtObject()
      Null constructor
    • MQExtObject

      public MQExtObject(MQExtObject parentObj, Object obj, String type, String objId, String objName)
      Constructor
      Parameters:
      parentObj - parent MQExtObject
      obj - instance object
      type - object type
      objId - Object ID
      objName - Name of the object
  • Method Details

    • testAttribute

      public boolean testAttribute(Object target, String name, String value)
      Description copied from class: com.ibm.mq.explorer.ui.internal.objects.MQExtObjectBase
      test an attribute of the supplied object
      Specified by:
      testAttribute in interface org.eclipse.ui.IActionFilter
      Overrides:
      testAttribute in class com.ibm.mq.explorer.ui.internal.objects.MQExtObjectBase
      Parameters:
      target - Target object
      name - Name of the parameter
      value - Value to test
      Returns:
      boolean is attribute equal?
    • getInstanceId

      public Object getInstanceId()
      Get the instanceId for this Object
      Returns:
      instanceId
    • getInternalObject

      public Object getInternalObject()
      Get the Internal Object
      Returns:
      instanceID
    • setInternalObject

      public void setInternalObject(Object object)
      Set the internal object
      Parameters:
      object - the internal object to set
    • getInternalDataObject

      public Object getInternalDataObject()
      Get an internal data object, if one has been set with setInternalDataObject()
      Returns:
      object if one has been set, null otherwise
    • setInternalDataObject

      public void setInternalDataObject(Object object)
      Set an internal data object, which can then be retrieved with getInternalDataObject()
      Parameters:
      object - an object to set
    • getMqType

      public String getMqType()
      Get MQType
      Returns:
      one of the "OBJECTID_" values defined in ObjectId
    • setName

      public void setName(String name)
      Set Object name
      Parameters:
      name - object name
    • getName

      public String getName()
      Get Object name
      Returns:
      object name
    • getObjectId

      public String getObjectId()
      Get Object ID
      Returns:
      object id
    • getParent

      public MQExtObject getParent()
      Get Parent Object
      Returns:
      parent object
    • objectChanged

      public void objectChanged()
      Notify any change listeners that this object has changed
    • addObjectChangedListener

      public void addObjectChangedListener(IMQExtObjectChangedListener listener)
      Add an object changed listener for this object
      Parameters:
      listener - the object changed listener to add
    • removeObjectChangedListener

      public void removeObjectChangedListener(IMQExtObjectChangedListener listener)
      Remove an object changed listener for this object
      Parameters:
      listener - the object changed listener to remove
    • getObjectChangedListenerCount

      public int getObjectChangedListenerCount()
      Return the count of object changed listeners on this object
      Returns:
      int the count of object changed listeners on this object
    • objectDeleted

      public void objectDeleted()
      Notify any delete listeners that this object is about to be deleted
    • addObjectDeletedListener

      public void addObjectDeletedListener(IMQExtObjectDeletedListener listener)
      Add an object deleted listener for this object
      Parameters:
      listener - the object deleted listener to add
    • removeObjectDeletedListener

      public void removeObjectDeletedListener(IMQExtObjectDeletedListener listener)
      Remove an object deleted listener for this object
      Parameters:
      listener - the object deleted listener to remove
    • getObjectDeletedListenerCount

      public int getObjectDeletedListenerCount()
      Return the count of object deleted listeners on this object
      Returns:
      int the count of object deleted listeners on this object
    • toString

      public String toString()
      Return the name of this object
      Overrides:
      toString in class Object
      Returns:
      String the name of this object