com.ibm.mq.explorer.ui.extensions

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

    • Field Detail

      • SCCSID

        public static final java.lang.String SCCSID
        SCCS id - expanded when file is extracted from CMVC
        See Also:
        Constant Field Values
      • COPYRIGHT_NOTICE

        public static final java.lang.String COPYRIGHT_NOTICE
        Copyright notice
        See Also:
        Constant Field Values
    • Constructor Detail

      • MQExtObject

        public MQExtObject()
        Null constructor
      • MQExtObject

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

      • testAttribute

        public boolean testAttribute(java.lang.Object target,
                                     java.lang.String name,
                                     java.lang.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 java.lang.Object getInstanceId()
        Get the instanceId for this Object
        Returns:
        instanceId
      • getInternalObject

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

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

        public java.lang.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(java.lang.Object object)
        Set an internal data object, which can then be retrieved with getInternalDataObject()
        Parameters:
        object - an object to set
      • getMqType

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

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

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

        public java.lang.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 java.lang.String toString()
        Return the name of this object
        Overrides:
        toString in class java.lang.Object
        Returns:
        String the name of this object