com.microfocus.awm.model.internal

## Class ElementListEntry

- java.lang.Object
- - org.eclipse.core.runtime.PlatformObject
  - - com.microfocus.awm.model.internal.Resource
    - - com.microfocus.awm.model.AbstractElementListEntry
      - - com.microfocus.awm.model.internal.ElementListEntry

- All Implemented Interfaces:
    IElementListEntry, IResource, org.eclipse.core.runtime.IAdaptable

      public class ElementListEntry
      extends AbstractElementListEntry

  Main implementation of `IElementListEntry`.
  Author:
    Ralf Pakosch

- - ### Field Summary

    - ### Fields inherited from class com.microfocus.awm.model.internal.Resource

      `_ID, _name`

    - ### Fields inherited from interface com.microfocus.awm.model.IElementListEntry

      `ID_PREFIX, INSERT, STATE_NEW, STATE_NONE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ElementListEntry(IElementList pElementList, java.lang.String pElementId, ElementType pElementType)` Creates a new `ElementListEntry`.
    `ElementListEntry(IElementList pElementList, java.lang.String pElementId, ElementType pElementTyp, int pState)` Constructor for creating element list entries with a custom state.
    `ElementListEntry(IElementList pElementList, java.lang.String pElementListEntryID, IElement pElement)` Constructor for loading an element list entry from cache.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addChild(IElementListEntry pListEntry)`
    `void` | `delete()` Removes this resource and all its children resources from cache.
    `IElementList` | `getChildren(boolean pRefresh, org.eclipse.core.runtime.IProgressMonitor pMon)` Deprecated. Used `getChildren(EGetChildrenMode,IProgressMonitor)` to have more information as result.
    `GetChildrenResult` | `getChildren(EGetChildrenMode pType, org.eclipse.core.runtime.IProgressMonitor pMon)` If a GetChildren action was modelled for the element type of the entries Element, this method returns a `GetChildrenResult` containing the element list.
    `java.util.List<IElementListEntry>` | `getChildrenEntries()`
    `IElement` | `getElement()` Gets the corresponding element.
    `IElementList` | `getElementList()` Gets the element list of this entry.
    `IElementListEntry` | `getParent()`
    `int` | `getState()` Gets the state flag of this entry.
    `void` | `removeChild(IElementListEntry pListEntry)`
    `void` | `setParent(IElementListEntry pParentListEntry)`
    `void` | `setState(int pOperator)` Sets the state flag of this entry.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class com.microfocus.awm.model.AbstractElementListEntry

      `getAllPropertyValuesWithElement, getAllPropertyValuesWithElementStatic, getPropertyValueWithElement, getPropertyValueWithElementStatic, getTreeViewLabel, getTreeViewLabelStatic`

    - ### Methods inherited from class com.microfocus.awm.model.internal.Resource

      `addChildResource, addPropertyValue, addResourceChild, equals, getAllPropertyValues, getChildrenResources, getID, getName, getParentResource, getPropertyValue, getPropertyValueFromHierarchy, getResourceChildren, getValueOfLinkedProperty, hashCode, removeProperty, removeResourceChild, setName, setPropertyValues`

    - ### Methods inherited from class org.eclipse.core.runtime.PlatformObject

      `getAdapter`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface com.microfocus.awm.model.IResource

      `addChildResource, addPropertyValue, addResourceChild, getAllPropertyValues, getChildrenResources, getID, getName, getParentResource, getPropertyValue, getPropertyValueFromHierarchy, getResourceChildren, removeResourceChild, setName, setPropertyValues`

    - ### Methods inherited from interface org.eclipse.core.runtime.IAdaptable

      `getAdapter`

- - ### Constructor Detail

    - #### ElementListEntry

          public ElementListEntry(IElementList pElementList,
                                  java.lang.String pElementId,
                                  ElementType pElementType)
                           throws TaurusCoreException

      Creates a new `ElementListEntry`. If the corresponding Element already exists it will be associated to this entry.
      Parameters:
        `pElementList` - the `IElementList` that should contain this entry
        `pElementId` - the Element ID of the corresponding Element
        `pElementType` - the Element Type of the corresponding Element
      Throws:
        `TaurusCoreException` - if the element could not be retrieved

    - #### ElementListEntry

          public ElementListEntry(IElementList pElementList,
                                  java.lang.String pElementId,
                                  ElementType pElementTyp,
                                  int pState)
                           throws TaurusCoreException

      Constructor for creating element list entries with a custom state.
      Parameters:
        `pElementList` - the `IElementList` that should contain this entry
        `pElementId` - the Element ID of the corresponding Element
        `pElementTyp` - the Element Type of the corresponding Element
        `pState` - the element list entry state
      Throws:
        `TaurusCoreException` - if the element could not be retrieved

    - #### ElementListEntry

          public ElementListEntry(IElementList pElementList,
                                  java.lang.String pElementListEntryID,
                                  IElement pElement)

      Constructor for loading an element list entry from cache.
      Parameters:
        `pElementList` - the element list
        `pElementListEntryID` - the cache ID
        `pElement` - the element

  - ### Method Detail

    - #### getElement

          public IElement getElement()

      Description copied from interface: `IElementListEntry`
      Gets the corresponding element.
      Returns:
        the element of this element list entry.

    - #### getState

          public int getState()

      Description copied from interface: `IElementListEntry`
      Gets the state flag of this entry.
      Returns:
        the state flag

    - #### setState

          public void setState(int pOperator)

      Description copied from interface: `IElementListEntry`
      Sets the state flag of this entry.
      Parameters:
        `pOperator` - the new state flag

    - #### getElementList

          public IElementList getElementList()

      Description copied from interface: `IElementListEntry`
      Gets the element list of this entry.
      Returns:
        the element list

    - #### getParent

          public IElementListEntry getParent()

      Returns:
        the tree table parent entry

    - #### setParent

          public void setParent(IElementListEntry pParentListEntry)

      Parameters:
        `pParentListEntry` - the new tree table parent entry

    - #### getChildrenEntries

          public java.util.List<IElementListEntry> getChildrenEntries()

      Returns:
        the tree table children of this entry

    - #### addChild

          public void addChild(IElementListEntry pListEntry)

      Parameters:
        `pListEntry` - the tree table child to be added

    - #### removeChild

          public void removeChild(IElementListEntry pListEntry)

      Parameters:
        `pListEntry` - the tree table child to be removed

    - #### delete

          public void delete()
                      throws TaurusCoreException

      Description copied from interface: `IResource`
      Removes this resource and all its children resources from cache.
      Will not delete the physical resource on the target system.
      Specified by:
        `delete` in interface `IResource`
      Overrides:
        `delete` in class `Resource`
      Throws:
        `TaurusCoreException` - if the deletion of the resource fails
      See Also:
        `IResource.getChildrenResources()`

    - #### getChildren

          @Deprecated
          public IElementList getChildren(boolean pRefresh,
                                                       org.eclipse.core.runtime.IProgressMonitor pMon)
                                                throws TaurusCoreException

      Deprecated. Used `getChildren(EGetChildrenMode,IProgressMonitor)` to have more information as result.
      Description copied from interface: `IElementListEntry`
      If a GetChildren action was modelled for the element type of the entries Element, this method returns an element list.
      Parameters:
        `pRefresh` - whether the children should be refreshed (or the cache can be used)
        `pMon` - progress monitor
      Returns:
        an `IElementList` or `null`
      Throws:
        `TaurusCoreException` - if getting the children fails

    - #### getChildren

          public GetChildrenResult getChildren(EGetChildrenMode pType,
                                               org.eclipse.core.runtime.IProgressMonitor pMon)
                                        throws TaurusCoreException

      Description copied from interface: `IElementListEntry`
      If a GetChildren action was modelled for the element type of the entries Element, this method returns a `GetChildrenResult` containing the element list.
      Parameters:
        `pType` - Gets how the getChildren should be processed. Whether the children should be refreshed (or the cache can be used)
        `pMon` - progress monitor
      Returns:
        an `GetChildrenResult`.This method must NOT return `null`.
      Throws:
        `TaurusCoreException` - if getting the children fails

    - #### toString

          public java.lang.String toString()

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

Copyright © 2015 Micro Focus GmbH. All rights reserved.