com.microfocus.awm.model.internal

## Class MasterConfigurationApplication

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

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

      public class MasterConfigurationApplication
      extends AbstractTaurusApplication

  AWM application which was defined by a master configuration.

  Handles two custom attributes which are set and updated by master configurations:

  - "modelLocation": Attribute with a specific syntax which points to the location of the model file.
  - "masterModelVersion": Used for checking whether a newer model version is available. The application will get updated if the value of this attribute is different to the model version attribute in the loaded model (#see `ApplicationOptions.getVersion()`.
  On loading the application, a local copy of the model file is created in the application cache folder and named . Loading the model (without reload flag) will always load the cached copy (if available).
  Author:
    RalfP

- - ### Nested Class Summary

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

      `ITaurusApplication.EModelUpdateStatus`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `ATTRIBUTE_MASTER_MODEL_LOCATION` Custom attribute: AWM model location defined in the master configuration.
    `static java.lang.String` | `ATTRIBUTE_MASTER_MODEL_VERSION` Custom attribute: AWM model version defined in the master configuration.

    - ### 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
    `MasterConfigurationApplication(java.lang.String pName, ITaurusSystem pSystem, java.lang.String pModelLocation, java.lang.String pNewestModelVersion)` Creates a new master configuration application.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ITaurusApplication.EModelUpdateStatus` | `checkForModelUpdate(org.eclipse.core.runtime.IProgressMonitor pMon)` Checks whether a new model is available for the application.
    `java.lang.String` | `getMasterConfigurationModelVersion()` Gets the model version from the master configuration.
    `java.lang.String` | `getModelLocation()` Gets the location of the model file.

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

      `addApplicationProperty, addStaticProperty, copySortedSet, equals, getApplicationProperties, getChildren, getChildren, getCustomAttribute, getCustomAttributes, getModel, getStaticProperties, getTaurusSystem, hasChildren, hashCode, loadApplication, removeApplicationProperty, removeChildren, toString, unloadApplication`

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

- - ### Field Detail

    - #### ATTRIBUTE_MASTER_MODEL_VERSION

          public static final java.lang.String ATTRIBUTE_MASTER_MODEL_VERSION

      Custom attribute: AWM model version defined in the master configuration.
      See Also:
        Constant Field Values

    - #### ATTRIBUTE_MASTER_MODEL_LOCATION

          public static final java.lang.String ATTRIBUTE_MASTER_MODEL_LOCATION

      Custom attribute: AWM model location defined in the master configuration.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MasterConfigurationApplication

          public MasterConfigurationApplication(java.lang.String pName,
                                                ITaurusSystem pSystem,
                                                java.lang.String pModelLocation,
                                                java.lang.String pNewestModelVersion)

      Creates a new master configuration application.
      Parameters:
        `pName` - the name of the application (must be unique)
        `pSystem` - the parent AWM system
        `pModelLocation` - the model location (from the master configuration)
        `pNewestModelVersion` - the newest model version (from the master configuration)

  - ### Method Detail

    - #### checkForModelUpdate

          public ITaurusApplication.EModelUpdateStatus checkForModelUpdate(org.eclipse.core.runtime.IProgressMonitor pMon)
                                                                    throws TaurusCoreException

      Description copied from interface: `ITaurusApplication`
      Checks whether a new model is available for the application. Will be called only once per session and application. Usually the application update status is set/refreshed by this method.
      Parameters:
        `pMon` - a progress monitor
      Returns:
        the model update status
      Throws:
        `TaurusCoreException` - if checking for a model update fails

    - #### getModelLocation

          public java.lang.String getModelLocation()

      Gets the location of the model file.
      Returns:
        the AWM model file location

    - #### getMasterConfigurationModelVersion

          public java.lang.String getMasterConfigurationModelVersion()

      Gets the model version from the master configuration.
      Returns:
        the master configuration model version

Copyright © 2015 Micro Focus GmbH. All rights reserved.