com.microfocus.awm.control

## Class MasterConfigurationParser

- java.lang.Object
- - com.microfocus.awm.control.MasterConfigurationParser

-     public class MasterConfigurationParser
      extends java.lang.Object

  Parses AWM master configurations.

  Master configurations are used to define `ConfiguredTaurusSystem`s.

  Author:
    Ralf Pakosch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FORMAT_FLAT` Flag for master configurations in flat format.
    `static int` | `FORMAT_XML` Flag for master configurations in XML format.
    `static java.lang.String` | `TAG_APPLICATION` Master configuration keyword: Application
    `static java.lang.String` | `TAG_END_APPLICATION` Master configuration keyword: Application end tag
    `static java.lang.String` | `TAG_END_User` Master configuration keyword: User end tag
    `static java.lang.String` | `TAG_INFO` Master configuration keyword: Info
    `static java.lang.String` | `TAG_MODEL_LOCATION` Master configuration keyword: Model location
    `static java.lang.String` | `TAG_MODEL_VERSION` Master configuration keyword: Version
    `static java.lang.String` | `TAG_NAME_XML` Master configuration keyword: Application name (XML attribute)
    `static java.lang.String` | `TAG_PARMFILE` Master configuration keyword: Parameter file location
    `static java.lang.String` | `TAG_STATIC_PROPERTY` Master configuration keyword: Static property
    `static java.lang.String` | `TAG_STATIC_PROPERTY_ID` Master configuration keyword: Static property ID XML attribute
    `static java.lang.String` | `TAG_STATIC_PROPERTY_VALUE` Master configuration keyword: Static property value XML attribute
    `static java.lang.String` | `TAG_SYSTEM` Master configuration keyword: System
    `static java.lang.String` | `TAG_User` Master configuration keyword: User

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MasterConfigurationParser(java.io.InputStream pMasterConfig, int pMasterConfigFormat, ISystemImage pImg)` Creates a new master configuration parser.
    `MasterConfigurationParser(java.lang.String[] pMasterConfig, int pMasterConfigFormat, ISystemImage pImg)` Creates a new master configuration parser.
    `MasterConfigurationParser(java.lang.String pMasterConfig, int pMasterConfigFormat, ISystemImage pImg)` Creates a new master configuration parser.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static int` | `getFormatFromFileName(java.lang.String fileName)` Guesses the master configuration file format from the given file name (which does not need to be an absolute path).
    `java.util.List<TaurusSystemPersistableProxy>` | `parseMasterConfiguration()` Parses the given master configuration.

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

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

- - ### Field Detail

    - #### FORMAT_XML

          public static final int FORMAT_XML

      Flag for master configurations in XML format.
      See Also:
        Constant Field Values

    - #### FORMAT_FLAT

          public static final int FORMAT_FLAT

      Flag for master configurations in flat format.
      See Also:
        Constant Field Values

    - #### TAG_SYSTEM

          public static final java.lang.String TAG_SYSTEM

      Master configuration keyword: System
      See Also:
        Constant Field Values

    - #### TAG_INFO

          public static final java.lang.String TAG_INFO

      Master configuration keyword: Info
      See Also:
        Constant Field Values

    - #### TAG_User

          public static final java.lang.String TAG_User

      Master configuration keyword: User
      See Also:
        Constant Field Values

    - #### TAG_APPLICATION

          public static final java.lang.String TAG_APPLICATION

      Master configuration keyword: Application
      See Also:
        Constant Field Values

    - #### TAG_NAME_XML

          public static final java.lang.String TAG_NAME_XML

      Master configuration keyword: Application name (XML attribute)
      See Also:
        Constant Field Values

    - #### TAG_MODEL_LOCATION

          public static final java.lang.String TAG_MODEL_LOCATION

      Master configuration keyword: Model location
      See Also:
        Constant Field Values

    - #### TAG_STATIC_PROPERTY

          public static final java.lang.String TAG_STATIC_PROPERTY

      Master configuration keyword: Static property
      See Also:
        Constant Field Values

    - #### TAG_MODEL_VERSION

          public static final java.lang.String TAG_MODEL_VERSION

      Master configuration keyword: Version
      See Also:
        Constant Field Values

    - #### TAG_PARMFILE

          public static final java.lang.String TAG_PARMFILE

      Master configuration keyword: Parameter file location
      See Also:
        Constant Field Values

    - #### TAG_END_APPLICATION

          public static final java.lang.String TAG_END_APPLICATION

      Master configuration keyword: Application end tag
      See Also:
        Constant Field Values

    - #### TAG_END_User

          public static final java.lang.String TAG_END_User

      Master configuration keyword: User end tag
      See Also:
        Constant Field Values

    - #### TAG_STATIC_PROPERTY_ID

          public static final java.lang.String TAG_STATIC_PROPERTY_ID

      Master configuration keyword: Static property ID XML attribute
      See Also:
        Constant Field Values

    - #### TAG_STATIC_PROPERTY_VALUE

          public static final java.lang.String TAG_STATIC_PROPERTY_VALUE

      Master configuration keyword: Static property value XML attribute
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MasterConfigurationParser

          public MasterConfigurationParser(java.io.InputStream pMasterConfig,
                                           int pMasterConfigFormat,
                                           ISystemImage pImg)

      Creates a new master configuration parser.
      Parameters:
        `pMasterConfig` - the master configuration
        `pMasterConfigFormat` - the format of the master configuration (`FORMAT_XML` or `FORMAT_FLAT`)
        `pImg` - the corresponding `ISystemImage`

    - #### MasterConfigurationParser

          public MasterConfigurationParser(java.lang.String pMasterConfig,
                                           int pMasterConfigFormat,
                                           ISystemImage pImg)

      Creates a new master configuration parser.
      Parameters:
        `pMasterConfig` - the master configuration
        `pMasterConfigFormat` - the format of the master configuration (`FORMAT_XML` or `FORMAT_FLAT`)
        `pImg` - the corresponding `ISystemImage`

    - #### MasterConfigurationParser

          public MasterConfigurationParser(java.lang.String[] pMasterConfig,
                                           int pMasterConfigFormat,
                                           ISystemImage pImg)

      Creates a new master configuration parser.
      Parameters:
        `pMasterConfig` - the master configuration
        `pMasterConfigFormat` - the format of the master configuration (`FORMAT_XML` or `FORMAT_FLAT`)
        `pImg` - the corresponding `ISystemImage`

  - ### Method Detail

    - #### parseMasterConfiguration

          public java.util.List<TaurusSystemPersistableProxy> parseMasterConfiguration()
                                                                                throws TaurusCoreException

      Parses the given master configuration.
      Returns:
        the TAURUS System that is defined by the master configuration
      Throws:
        `TaurusCoreException` - if reading or parsing the master configuration fails

    - #### getFormatFromFileName

          public static int getFormatFromFileName(java.lang.String fileName)

      Guesses the master configuration file format from the given file name (which does not need to be an absolute path).
      Parameters:
        `fileName` - the master configuration file name
      Returns:
        `FORMAT_XML` if the file name ends with `.xml`, `FORMAT_FLAT` if the file name ends with `.txt` and `-1` if the format cannot be determined.

Copyright © 2015 Micro Focus GmbH. All rights reserved.