com.microfocus.awm.core

## Class AbstractTaurusSystem

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

- All Implemented Interfaces:
    IResource, ITaurusSystem, org.eclipse.core.runtime.IAdaptable
  Direct Known Subclasses:
    ConfiguredTaurusSystem

      public abstract class AbstractTaurusSystem
      extends Resource
      implements ITaurusSystem

  Basic implementation of the `ITaurusSystem` interface, which automatically registers itself in the `ITaurusSystemDirectory` on creation and manages custom attributes.

  Can be sub-classed by clients.

- - ### Field Summary

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

      `_ID, _name`

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

      `ID_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTaurusSystem(ISystemImage pImg, java.lang.String pSystemName, java.lang.String pID)` Creates a new abstract AWM system and registers it in the `TaurusSystemDirectory`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete()` Removes this resource and all its children resources from cache.
    `boolean` | `equals(java.lang.Object obj)`
    `java.lang.String` | `getCustomAttribute(java.lang.String pName)` Gets the value of a custom system attribute by the given name.
    `java.util.Map<java.lang.String,java.lang.String>` | `getCustomAttributes()` Gets all custom attributes that have been set for the system.
    `ISystemImage` | `getSystemImage()` Gets the system image this AWM system belongs to.
    `int` | `hashCode()`

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

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

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

      `getAdapter`

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

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

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

      `getApplications, getProviderID, refresh`

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

    - #### AbstractTaurusSystem

          public AbstractTaurusSystem(ISystemImage pImg,
                                      java.lang.String pSystemName,
                                      java.lang.String pID)
                               throws TaurusCoreException

      Creates a new abstract AWM system and registers it in the `TaurusSystemDirectory`.
      Parameters:
        `pImg` - the system image for the TAURUS system.
        `pSystemName` - the unique name of the system.
        `pID` - the unique ID of the TAURUS system.
      Throws:
        `TaurusCoreException` - if the system already exists or cannot be added to the `TaurusSystemDirectory`.
      See Also:
        `TaurusSystemDirectory.addSystem(ITaurusSystem, boolean)`

  - ### Method Detail

    - #### getSystemImage

          public ISystemImage getSystemImage()

      Description copied from interface: `ITaurusSystem`
      Gets the system image this AWM system belongs to.
      Specified by:
        `getSystemImage` in interface `ITaurusSystem`
      Returns:
        an `ISystemImage`

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

    - #### getCustomAttribute

          public java.lang.String getCustomAttribute(java.lang.String pName)

      Description copied from interface: `ITaurusSystem`
      Gets the value of a custom system attribute by the given name.
      Specified by:
        `getCustomAttribute` in interface `ITaurusSystem`
      Parameters:
        `pName` - the name of the desired attribute
      Returns:
        the custom attribute value or `null` if no attribute with the given name was set

    - #### getCustomAttributes

          public java.util.Map<java.lang.String,java.lang.String> getCustomAttributes()

      Description copied from interface: `ITaurusSystem`
      Gets all custom attributes that have been set for the system. Custom attributes will be cached by AWM.
      Specified by:
        `getCustomAttributes` in interface `ITaurusSystem`
      Returns:
        a list of custom attributes (key/value pairs)

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `Resource`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Resource`

Copyright © 2015 Micro Focus GmbH. All rights reserved.