com.microfocus.awm.core

## Class TaurusNotification

- java.lang.Object
- - com.microfocus.awm.core.TaurusNotification

-     public class TaurusNotification
      extends java.lang.Object

  Notification used by AWM `Observer` and `Observable` classes (e.g. AWM views). Observable classes should use this when calling the `Observable.notifyObservers(Object)` method.

  Not intended to be sub-classed by clients.

  Author:
    Micro Focus

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TaurusNotification(ETaurusNotification pType)` Basic constructor used for general notifications.
    `TaurusNotification(ETaurusNotification pType, IElement pElement)` Constructor used for notifications which evolve an element.
    `TaurusNotification(ETaurusNotification pType, IElementList pEleList)` Constructor used for notifications which evolve an element list.
    `TaurusNotification(ETaurusNotification pType, IElementListEntry pEntry)` Constructor used for notifications which evolve an element list entry.
    `TaurusNotification(ETaurusNotification pType, IElementList pEleList, java.lang.String pTableViewID)` Constructor used for notifications which evolve an element list in a secondary element views.
    `TaurusNotification(IElement pDeletedElement, java.util.Collection<IElementListEntry> pDeletedElementListEntries)` Constructor for a `ETaurusNotification.ELEMENT_REMOVED` notification.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IResource` | `getChangedResource()` Gets the a resource that has been changed.
    `IResource[]` | `getChangedResources()` Gets the resources that have been changed.
    `IElement` | `getElement()` Returns a `IElement` or `null`, depending on the `_type`:
    `IElementList` | `getElementList()` Returns a `IElementList` or `null`, depending on the `_type`.
    `java.util.Collection<IElementListEntry>` | `getElementListEntries()` Gets the element list entries which have been affected by the event.
    `IElementListEntry` | `getElementListEntry()` Gets the the element list entry of the notification, which can be `null`.
    `ITaurusSystem` | `getSystem()` Gets the `ITaurusSystem` of this notification or `null`.
    `java.lang.String` | `getTableViewSecondaryId()` Gets the secondary view ID of this notification or `null` if there is none.
    `ETaurusNotification` | `getType()` Gets the notification type.
    `void` | `setChangedResource(IResource... pChangedResource)` Sets the resource that has been changed.
    `void` | `setElement(IElement pElement)` Sets the element for element based notification.
    `void` | `setElementList(IElementList pEleList)` Sets the element list of this notification.
    `void` | `setSystem(ITaurusSystem pSystem)` Sets the system for system based notifications.
    `void` | `setTableViewSecondaryId(java.lang.String pTableViewSecondaryId)` Sets the secondary view ID of this notification.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TaurusNotification

          public TaurusNotification(ETaurusNotification pType)

      Basic constructor used for general notifications.
      Parameters:
        `pType` - the notification type

    - #### TaurusNotification

          public TaurusNotification(IElement pDeletedElement,
                                    java.util.Collection<IElementListEntry> pDeletedElementListEntries)

      Constructor for a `ETaurusNotification.ELEMENT_REMOVED` notification.
      Parameters:
        `pDeletedElement` - the element which has been deleted
        `pDeletedElementListEntries` - the collection of element list entries which belonged to the element

    - #### TaurusNotification

          public TaurusNotification(ETaurusNotification pType,
                                    IElementList pEleList)

      Constructor used for notifications which evolve an element list.
      Parameters:
        `pType` - the notification type
        `pEleList` - the element list

    - #### TaurusNotification

          public TaurusNotification(ETaurusNotification pType,
                                    IElementList pEleList,
                                    java.lang.String pTableViewID)

      Constructor used for notifications which evolve an element list in a secondary element views.
      Parameters:
        `pType` - the notification type
        `pEleList` - the element list
        `pTableViewID` - the secondary view ID

    - #### TaurusNotification

          public TaurusNotification(ETaurusNotification pType,
                                    IElement pElement)

      Constructor used for notifications which evolve an element.
      Parameters:
        `pType` - notification type
        `pElement` - element that causes this notification to be issued

    - #### TaurusNotification

          public TaurusNotification(ETaurusNotification pType,
                                    IElementListEntry pEntry)

      Constructor used for notifications which evolve an element list entry.
      Must be used for:
    - `ETaurusNotification.ELEMENT_INSERTED`
    - `ETaurusNotification.ELEMENT_REMOVED`
    - `ETaurusNotification.ELEMENT_UPDATED`

Parameters:
  `pType` - the notification type
  `pEntry` - the element list entry

- ### Method Detail

  - #### getTableViewSecondaryId

        public java.lang.String getTableViewSecondaryId()

    Gets the secondary view ID of this notification or `null` if there is none.
    Returns:
      the secondary view ID or `null`

  - #### setTableViewSecondaryId

        public void setTableViewSecondaryId(java.lang.String pTableViewSecondaryId)

    Sets the secondary view ID of this notification.
    Parameters:
      `pTableViewSecondaryId` - the secondary view ID

  - #### getType

        public ETaurusNotification getType()

    Gets the notification type.
    Returns:
      the notification type

  - #### getElementList

        public IElementList getElementList()

    Returns a `IElementList` or `null`, depending on the `_type`.
    Returns:
      an element list or `null`

  - #### setElementList

        public void setElementList(IElementList pEleList)

    Sets the element list of this notification.
    Parameters:
      `pEleList` - the element list to set.

  - #### getElement

        public IElement getElement()

    Returns a `IElement` or `null`, depending on the `_type`:
    Returns:
      an element or `null`.

  - #### getElementListEntry

        public IElementListEntry getElementListEntry()

    Gets the the element list entry of the notification, which can be `null`.
    Returns:
      the element list entry or `null`.

  - #### setElement

        public void setElement(IElement pElement)

    Sets the element for element based notification. Does not need to be called if the constructor `TaurusNotification(ETaurusNotification, IElementListEntry)` was used.
    Parameters:
      `pElement` - the element to set

  - #### setSystem

        public void setSystem(ITaurusSystem pSystem)

    Sets the system for system based notifications.
    Parameters:
      `pSystem` - the system to set

  - #### getSystem

        public ITaurusSystem getSystem()

    Gets the `ITaurusSystem` of this notification or `null`.
    Returns:
      the system or `null`

  - #### toString

        public java.lang.String toString()

    Overrides:
      `toString` in class `java.lang.Object`

  - #### getElementListEntries

        public java.util.Collection<IElementListEntry> getElementListEntries()

    Gets the element list entries which have been affected by the event. Does not return the same list of elements as `getElementList()`.
    Returns:
      the elementListEntries
    See Also:
      `#TaurusNotification(IElement, List)`

  - #### setChangedResource

        public void setChangedResource(IResource... pChangedResource)

    Sets the resource that has been changed.
    Parameters:
      `pChangedResource` - the changed resource
    See Also:
      `getChangedResource()`

  - #### getChangedResource

        public IResource getChangedResource()

    Gets the a resource that has been changed.
    Returns:
      a changed resource or `null`, if none has been set by the notifier
    See Also:
      `setChangedResource(IResource...)`, `getChangedResources()`

  - #### getChangedResources

        public IResource[] getChangedResources()

    Gets the resources that have been changed.
    Returns:
      the changed resources or `null`, if none has been set by the notifier
    See Also:
      `setChangedResource(IResource...)`

Copyright © 2015 Micro Focus GmbH. All rights reserved.