com.microfocus.awm.model

## Class AbstractLinkedElementTypeIdentificator

- java.lang.Object
- - com.microfocus.awm.model.AbstractLinkedElementTypeIdentificator

- All Implemented Interfaces:
    ILinkedElementIdentificator

      public class AbstractLinkedElementTypeIdentificator
      extends java.lang.Object
      implements ILinkedElementIdentificator

  Abstract implementation of `ILinkedElementIdentificator` which does nothing by default. In addition to `ILinkedElementIdentificator` it also contains the method `initializeRestoredElement(IElement, ISystemImage, IProgressMonitor)` .
  Author:
    RalfP

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractLinkedElementTypeIdentificator()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `getIcon(IResourceIdentifier pId)` Can return a custom icon for the linked element.
    `java.lang.String` | `getParentResourceID(java.lang.String pId)` Gets the ID of the parent resource.
    `void` | `initializeRestoredElement(IElement pElement, ISystemImage pImage, org.eclipse.core.runtime.IProgressMonitor pMon)` Initializes an `IElement` that has been restored from cache, if any initialization is needed.

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

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

- - ### Constructor Detail

    - #### AbstractLinkedElementTypeIdentificator

          public AbstractLinkedElementTypeIdentificator()

  - ### Method Detail

    - #### getIcon

          public java.lang.Object getIcon(IResourceIdentifier pId)

      Description copied from interface: `ILinkedElementIdentificator`
      Can return a custom icon for the linked element.
      Specified by:
        `getIcon` in interface `ILinkedElementIdentificator`
      Parameters:
        `pId` - the resource identifier
      Returns:
        an ImageDescriptor, Image or `null` if no custom image can be provided

    - #### getParentResourceID

          public java.lang.String getParentResourceID(java.lang.String pId)

      Description copied from interface: `ILinkedElementIdentificator`
      Gets the ID of the parent resource.

      While this method usually returns a physical resource ID (e.g. an absolute OS file path), AWM will also check whether the ID equals the ID of the active AWM application. In that case, AWM triggers a refresh of the application children. This can be used to refresh the root containers level of an application.

      Specified by:
        `getParentResourceID` in interface `ILinkedElementIdentificator`
      Parameters:
        `pId` - the identifier for the main resource (which is a child of the resource ID to be returned) or the ID of the active AWM application
      Returns:
        the parent resource ID or `null` if no parent resource can be identified
      See Also:
        `IResource.getID()`

    - #### initializeRestoredElement

          public void initializeRestoredElement(IElement pElement,
                                                ISystemImage pImage,
                                                org.eclipse.core.runtime.IProgressMonitor pMon)
                                         throws TaurusCoreException

      Initializes an `IElement` that has been restored from cache, if any initialization is needed. This method will be called for every linked element type of an identificator which is loaded from cache.
      Parameters:
        `pElement` - the element which has been loaded from cache
        `pImage` - the currently used system image
        `pMon` - a progress monitor
      Throws:
        `TaurusCoreException` - if initializing the element fails

Copyright © 2015 Micro Focus GmbH. All rights reserved.