com.microfocus.awm.core

## Class MasterConfigurationProvider

- java.lang.Object
- - com.microfocus.awm.core.MasterConfigurationProvider

- All Implemented Interfaces:
    IMasterConfigurationProvider

      public class MasterConfigurationProvider
      extends java.lang.Object
      implements IMasterConfigurationProvider

  Representation of a parsed `IMasterConfigurationProvider` extension. Not intended to be sub-classed by clients.
  Author:
    Ralf Pakosch

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `FORMAT_FLAT` Master configuration FLAT format
    `static int` | `FORMAT_XML` Master configuration XML format

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MasterConfigurationProvider(IMasterConfigurationProvider pProvider, java.lang.String pType, java.lang.String pFormat)` Basic constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFormat()` Gets the format of the master configuration provider (`FORMAT_XML` or `FORMAT_FLAT`).
    `java.io.InputStream` | `getMasterConfiguration(ISystemImage pImg)` Method called by TAURUS if a master configuration is needed.
    `java.lang.String` | `getType()` Gets the type of the master configuration provider (e.g.
    `int` | `parseFormat(java.lang.String pFormat)` Converts the format string into the integer flag (`FORMAT_FLAT` or `FORMAT_XML`).

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

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

- - ### Field Detail

    - #### FORMAT_FLAT

          public static final int FORMAT_FLAT

      Master configuration FLAT format
      See Also:
        Constant Field Values

    - #### FORMAT_XML

          public static final int FORMAT_XML

      Master configuration XML format
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MasterConfigurationProvider

          public MasterConfigurationProvider(IMasterConfigurationProvider pProvider,
                                             java.lang.String pType,
                                             java.lang.String pFormat)

      Basic constructor.
      Parameters:
        `pProvider` - the master configuration provider (from the extension)
        `pType` - the system type
        `pFormat` - the format (XML or FLAT)

  - ### Method Detail

    - #### getFormat

          public int getFormat()

      Gets the format of the master configuration provider (`FORMAT_XML` or `FORMAT_FLAT`).
      Returns:
        the format of the master configuration provider

    - #### getType

          public java.lang.String getType()

      Gets the type of the master configuration provider (e.g. `zOS` )
      Returns:
        the type of the master configuration provider

    - #### getMasterConfiguration

          public java.io.InputStream getMasterConfiguration(ISystemImage pImg)
                                                     throws java.io.IOException

      Description copied from interface: `IMasterConfigurationProvider`
      Method called by TAURUS if a master configuration is needed.
      Specified by:
        `getMasterConfiguration` in interface `IMasterConfigurationProvider`
      Parameters:
        `pImg` - the corresponding `ISystemImage`
      Returns:
        the contents of a master configuration
      Throws:
        `java.io.IOException` - if the master configuration cannot be retrieved for some reason

    - #### parseFormat

          public int parseFormat(java.lang.String pFormat)

      Converts the format string into the integer flag (`FORMAT_FLAT` or `FORMAT_XML`).
      Parameters:
        `pFormat` - the format string (XML or FLAT)
      Returns:
        the format flag

Copyright © 2015 Micro Focus GmbH. All rights reserved.