com.microfocus.awm.model

## Interface IElement

- All Superinterfaces:
    org.eclipse.core.runtime.IAdaptable, IResource
  All Known Implementing Classes:
    Element

      public interface IElement
      extends IResource

  AWM managed runtime instance of an `ElementType`.

  Elements are representations of all software objects managed by AWM applications. They are identified and persisted by IDs which are generated by `IDDefinition`s. Only one IElement instance will be managed per element ID, to ensure consistency on element changes (e.g. rename, delete, change of an element property).

  Elements are never directly contained in element lists, but `IElementListEntry`s are.
  They are managed by the `IElementDirectory`.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ID_PREFIX` The cache ID prefix.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete()` Removes the Element entirely from TAURUS, including dependent Element lists.
    `IElementList` | `getChildren(boolean pRefresh, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Deprecated. `)` is used instead.
    `IElementList` | `getChildrenElementList()` Gets the element list of children that is created during `getChildren(boolean, IProgressMonitor)`.
    `java.util.Set<IElementListEntry>` | `getElementListEntries()` Gets all element list entries for this element.
    `java.lang.String` | `getElementSuffix()` Gets the suffix of this element.
    `ElementType` | `getElementType()` Gets the element type of this element.
    `java.lang.String` | `getPropertySetName()` Get the propertySet name that has been associated with the element.
    `java.lang.String` | `getTreeViewLabel()` Deprecated. unable to resolve element list entry properties. Use `IElementListEntry.getTreeViewLabel()` instead.
    `boolean` | `isRefreshAllPropertyRequired()` Check if a refresh of all property values of this resource is necessary.
    `void` | `refreshAllProperties(IExecutionContext pContext, org.eclipse.core.runtime.IProgressMonitor pMon)` Executes the "GetAllProperties" action of the corresponding Element Type to refresh the Properties of this IElement.
    `void` | `removeChildren()` Removes the local cached children.
    `void` | `setElementType(ElementType pElementType)` Sets the element type of this element.
    `void` | `setPropertySetName(java.lang.String pName)` Set the propertySet'name that have been associated to the element.
    `void` | `setRefreshAllPropertyRequired(boolean pRefreshAllPropertyRequired)` Sets the flag whether executing the `getAllProperties` action is required.

    - ### 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`

- - ### Field Detail

    - #### ID_PREFIX

          static final java.lang.String ID_PREFIX

      The cache ID prefix.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### getElementType

          ElementType getElementType()

      Gets the element type of this element.
      Returns:
        the `ElementType`

    - #### setElementType

          void setElementType(ElementType pElementType)

      Sets the element type of this element. This is used internally and should not be called by clients.
      Parameters:
        `pElementType` - the new element type

    - #### getElementSuffix

          java.lang.String getElementSuffix()

      Gets the suffix of this element.
      Returns:
        the element suffix

    - #### getChildren

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

      Deprecated. `)` is used instead.
      Returns a list of elements, if a `getChildren` action was configured in the TAURUS model
      Parameters:
        `pRefresh` - whether to refresh the children first (`true`) or return available cached children (`false`)
        `pMonitor` - progress monitor
      Returns:
        the children of the element or `null`
      Throws:
        `TaurusCoreException` - if an exception occurs while getting the children

    - #### removeChildren

          void removeChildren()
                       throws TaurusCoreException

      Removes the local cached children.
      Throws:
        `TaurusCoreException` - if the children could not be removed due to an exception

    - #### getTreeViewLabel

          @Deprecated
          java.lang.String getTreeViewLabel()

      Deprecated. unable to resolve element list entry properties. Use `IElementListEntry.getTreeViewLabel()` instead.
      Returns an element label, which consists of element property values that have the attribute `isTreeViewLabel` set to `true`
      Returns:
        the tree view label

    - #### delete

          void delete()
               throws TaurusCoreException

      Removes the Element entirely from TAURUS, including dependent Element lists.

      Does not physically delete the Element from the remote system.

      Specified by:
        `delete` in interface `IResource`
      Throws:
        `TaurusCoreException` - if deleting the element (or removing it from cache) fails
      See Also:
        `IResource.getChildrenResources()`

    - #### refreshAllProperties

          void refreshAllProperties(IExecutionContext pContext,
                                    org.eclipse.core.runtime.IProgressMonitor pMon)
                             throws TaurusException

      Executes the "GetAllProperties" action of the corresponding Element Type to refresh the Properties of this IElement. Optionally an `IExecutionContext` can be used to include properties for the tool execution.
      Parameters:
        `pContext` - an execution context or `null`
        `pMon` - progress monitor
      Throws:
        `TaurusException` - if an error occurs during refreshing the properties

    - #### isRefreshAllPropertyRequired

          boolean isRefreshAllPropertyRequired()

      Check if a refresh of all property values of this resource is necessary.
      Returns:
        `true`, if a refresh of all the resource's properties is necessary, `false` otherwise

    - #### setRefreshAllPropertyRequired

          void setRefreshAllPropertyRequired(boolean pRefreshAllPropertyRequired)

      Sets the flag whether executing the `getAllProperties` action is required.
      Parameters:
        `pRefreshAllPropertyRequired` - whether executing the `getAllProperties` action is required

    - #### setPropertySetName

          void setPropertySetName(java.lang.String pName)

      Set the propertySet'name that have been associated to the element.
      Parameters:
        `pName` - the property set name

    - #### getPropertySetName

          java.lang.String getPropertySetName()

      Get the propertySet name that has been associated with the element.
      Returns:
        the element propertySet

    - #### getChildrenElementList

          IElementList getChildrenElementList()

      Gets the element list of children that is created during `getChildren(boolean, IProgressMonitor)`. In comparison to getChildren(...), this method does never execute an action but simply returns the list (or `null` if the element has no children).
      Returns:
        the children element list

    - #### getElementListEntries

          java.util.Set<IElementListEntry> getElementListEntries()

      Gets all element list entries for this element.

      The returned list should not be modified by clients.

      Returns:
        all element list entries of the element

Copyright © 2015 Micro Focus GmbH. All rights reserved.