com.microfocus.awm.model

## Class AbstractTaurusApplication

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

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

      public abstract class AbstractTaurusApplication
      extends Resource
      implements ITaurusApplication

  Basic implementation of `ITaurusApplication`. Manages loading/unloading the AWM cache, get children using modeled `Get Root Containers` actions and registers modeled `ApplicationAction`s.

  Can be sub-classed by clients.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.microfocus.awm.model.ITaurusApplication

      `ITaurusApplication.EModelUpdateStatus`

  - ### Field Summary

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

      `_ID, _name`

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

      `ID_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractTaurusApplication(java.lang.String pName, ITaurusSystem pSystem)` Basic constructor.
    `AbstractTaurusApplication(java.lang.String pName, ITaurusSystem pSystem, java.lang.String pID)` Constructor for loading an application from cache.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `addApplicationProperty(IApplicationProperty pApplicationProperty)` Adds an `IApplicationProperty` to the `ITaurusApplication`.
    `void` | `addStaticProperty(java.lang.String pID, java.lang.String pValue)` Adds a Property ID and it's new static value to the application.
    `static java.util.List<IResource>` | `copySortedSet(java.util.SortedMap<java.lang.String,IResource> pSortedContSet)` Deprecated. Do not use. May be removed.
    `boolean` | `equals(java.lang.Object obj)`
    `java.util.Collection<IApplicationProperty>` | `getApplicationProperties()` Returns an copy of the `Collection` of `IApplicationProperty`s.
    `IElementList` | `getChildren(boolean pRefresh, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Deprecated. Used `getChildren(EGetChildrenMode,IProgressMonitor)` to have more information as result.
    `GetChildrenResult` | `getChildren(EGetChildrenMode pType, org.eclipse.core.runtime.IProgressMonitor pMonitor)` Fetch the children of the root container type sorted by the container type's sort criterion from the remote system.
    `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 application.
    `TAURUSConfiguration` | `getModel()` Gets the AWM model.
    `java.util.Map<java.lang.String,java.lang.String>` | `getStaticProperties()` Returns the Property IDs and values, which were set in the Master Configuration File for this Application.
    `ITaurusSystem` | `getTaurusSystem()` Get this AWM application's system.
    `boolean` | `hasChildren()` Checks if the AWM application has children.
    `int` | `hashCode()`
    `void` | `loadApplication(boolean pReload, org.eclipse.core.runtime.IProgressMonitor pMon)` Load this AWM application as active AWM application; load the corresponding configuration data set and all saved AWM data.
    `boolean` | `removeApplicationProperty(IApplicationProperty pApplicationProperty)` Removes an `IApplicationProperty` from the `ITaurusApplication`
    `void` | `removeChildren()` Recursively remove the children of this AWM application.
    `java.lang.String` | `toString()`
    `void` | `unloadApplication()` Unload the configuration data set and the AWM application data in the local workspace.

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

      `addChildResource, addPropertyValue, addResourceChild, delete, 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, wait, wait, wait`

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

      `checkForModelUpdate`

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

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

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

      `getAdapter`

- - ### Constructor Detail

    - #### AbstractTaurusApplication

          public AbstractTaurusApplication(java.lang.String pName,
                                           ITaurusSystem pSystem)

      Basic constructor.
      Parameters:
        `pName` - the application name
        `pSystem` - the parent system

    - #### AbstractTaurusApplication

          public AbstractTaurusApplication(java.lang.String pName,
                                           ITaurusSystem pSystem,
                                           java.lang.String pID)

      Constructor for loading an application from cache.
      Parameters:
        `pName` - the application name
        `pSystem` - the parent system
        `pID` - the cache ID

  - ### Method Detail

    - #### getTaurusSystem

          public ITaurusSystem getTaurusSystem()

      Description copied from interface: `ITaurusApplication`
      Get this AWM application's system.
      Specified by:
        `getTaurusSystem` in interface `ITaurusApplication`
      Returns:
        AWM application's system

    - #### hasChildren

          public boolean hasChildren()

      Description copied from interface: `ITaurusApplication`
      Checks if the AWM application has children.
      Specified by:
        `hasChildren` in interface `ITaurusApplication`
      Returns:
        `true` if the application has children, otherwise `false`

    - #### getChildren

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

      Deprecated. Used `getChildren(EGetChildrenMode,IProgressMonitor)` to have more information as result.
      Description copied from interface: `ITaurusApplication`
      Fetch the children of the root container type sorted by the container type's sort criterion from the remote system.
      Specified by:
        `getChildren` in interface `ITaurusApplication`
      Parameters:
        `pRefresh` - whether to refresh the application children (or use the cache)
        `pMonitor` - progress monitor
      Returns:
        set of children container's of the root container type
      Throws:
        `TaurusException` - if getting the children fails

    - #### getChildren

          public GetChildrenResult getChildren(EGetChildrenMode pType,
                                               org.eclipse.core.runtime.IProgressMonitor pMonitor)
                                        throws TaurusException

      Description copied from interface: `ITaurusApplication`
      Fetch the children of the root container type sorted by the container type's sort criterion from the remote system.
      Specified by:
        `getChildren` in interface `ITaurusApplication`
      Parameters:
        `pType` - how to refresh the application children (or use the cache)
        `pMonitor` - progress monitor
      Returns:
        the `GetChildrenResult` of children's fetching
      Throws:
        `TaurusException` - if getting the children fails

    - #### removeChildren

          public void removeChildren()
                              throws TaurusCoreException

      Description copied from interface: `ITaurusApplication`
      Recursively remove the children of this AWM application.
      Specified by:
        `removeChildren` in interface `ITaurusApplication`
      Throws:
        `TaurusCoreException` - if removing the children fails

    - #### copySortedSet

          @Deprecated
          public static java.util.List<IResource> copySortedSet(java.util.SortedMap<java.lang.String,IResource> pSortedContSet)

      Deprecated. Do not use. May be removed.
      copy the sorted set to the output set
      Parameters:
        `pSortedContSet` - ?
      Returns:
        sorted set as set

    - #### loadApplication

          public void loadApplication(boolean pReload,
                                      org.eclipse.core.runtime.IProgressMonitor pMon)
                               throws TaurusCoreException

      Description copied from interface: `ITaurusApplication`
      Load this AWM application as active AWM application; load the corresponding configuration data set and all saved AWM data.
      Specified by:
        `loadApplication` in interface `ITaurusApplication`
      Parameters:
        `pReload` - reloads the configuration file of this application if set `true`. This won't effect the first load of the configuration.
        `pMon` - progress monitor
      Throws:
        `TaurusCoreException` - if the application could not be loaded

    - #### getModel

          public TAURUSConfiguration getModel()

      Description copied from interface: `ITaurusApplication`
      Gets the AWM model. This should be a simple getter, since AWM can call this method quite frequently. Usually the model is loaded within `ITaurusApplication.loadApplication(boolean, IProgressMonitor)`.
      Specified by:
        `getModel` in interface `ITaurusApplication`
      Returns:
        the `TAURUSConfiguration` of the application or `null` if it hasn't been loaded before.

    - #### unloadApplication

          public void unloadApplication()
                                 throws TaurusCoreException

      Description copied from interface: `ITaurusApplication`
      Unload the configuration data set and the AWM application data in the local workspace.
      Specified by:
        `unloadApplication` in interface `ITaurusApplication`
      Throws:
        `TaurusCoreException` - if the application could not be unloaded

    - #### getApplicationProperties

          public java.util.Collection<IApplicationProperty> getApplicationProperties()

      Description copied from interface: `ITaurusApplication`
      Returns an copy of the `Collection` of `IApplicationProperty`s. Changing the returned `Collection` won´t affect the application properties of the `ITaurusApplication`.

      The `Collection` of `IApplicationProperty`s gets filled once the application was loaded.

      To add or remove `IApplicationProperty`s use the methods `ITaurusApplication.addApplicationProperty(IApplicationProperty)` or `ITaurusApplication.removeApplicationProperty(IApplicationProperty)`.

      Specified by:
        `getApplicationProperties` in interface `ITaurusApplication`
      Returns:
        the `IApplicationProperty`s of the `ITaurusApplication`

    - #### removeApplicationProperty

          public boolean removeApplicationProperty(IApplicationProperty pApplicationProperty)

      Description copied from interface: `ITaurusApplication`
      Removes an `IApplicationProperty` from the `ITaurusApplication`
      Specified by:
        `removeApplicationProperty` in interface `ITaurusApplication`
      Parameters:
        `pApplicationProperty` - the `IApplicationProperty` which should be removed.
      Returns:
        whether the `IApplicationProperty` was removed successfully.

    - #### addApplicationProperty

          public boolean addApplicationProperty(IApplicationProperty pApplicationProperty)

      Description copied from interface: `ITaurusApplication`
      Adds an `IApplicationProperty` to the `ITaurusApplication`.
      Specified by:
        `addApplicationProperty` in interface `ITaurusApplication`
      Parameters:
        `pApplicationProperty` - the `IApplicationProperty` which should be added.
      Returns:
        whether the `IApplicationProperty` was added successfully.

    - #### getStaticProperties

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

      Description copied from interface: `ITaurusApplication`
      Returns the Property IDs and values, which were set in the Master Configuration File for this Application.
      Specified by:
        `getStaticProperties` in interface `ITaurusApplication`
      Returns:
        a map, containing Property IDs (Entry Key) and values (Entry Value) of all static properties of the application

    - #### addStaticProperty

          public void addStaticProperty(java.lang.String pID,
                                        java.lang.String pValue)

      Description copied from interface: `ITaurusApplication`
      Adds a Property ID and it's new static value to the application.
      Specified by:
        `addStaticProperty` in interface `ITaurusApplication`
      Parameters:
        `pID` - The ID of the Property
        `pValue` - The new static value for the given Property ID

    - #### toString

          public java.lang.String toString()

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

    - #### getCustomAttribute

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

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

    - #### getCustomAttributes

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

      Description copied from interface: `ITaurusApplication`
      Gets all custom attributes that have been set for the application. Custom attributes will be cached by AWM.
      Specified by:
        `getCustomAttributes` in interface `ITaurusApplication`
      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.