com.microfocus.awm.core.internal

## Class DefaultConfigurationSystemProxy

- java.lang.Object
- - com.microfocus.awm.core.internal.DefaultConfigurationSystemProxy

- All Implemented Interfaces:
    ITaurusSystemProxy

      public class DefaultConfigurationSystemProxy
      extends java.lang.Object
      implements ITaurusSystemProxy

  `ITaurusSystemProxy` for AWM systems which are defined through a default configurations XML file. The proxy can create AWM systems by either reading a master configuration file or obtaining a master configuration by executing an OS command. This depends on how the default system was defined in the default configurations file.
  Author:
    RalfP

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultConfigurationSystemProxy(MasterConfigurationReference pMasterConfig, java.lang.String pAssociatedSystem)` Creates a new default configuration system proxy.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.util.List<ITaurusSystem>` | `create(org.eclipse.core.runtime.IProgressMonitor pMon)` Creates one or several `ITaurusSystem`s from the stub.
    `java.lang.String` | `getDescription()` Gets a human readable description of the system stub, ideally containing brief information about the contained AWM applications.
    `MasterConfigurationReference` | `getMasterConfiguration()` Gets the master configuration command.
    `int` | `getMasterConfigurationFormat()` Gets the master configuration format, which is always `MasterConfigurationParser.FORMAT_XML` if a command is set and will be determined by the file suffix is a master configuration path has been set.
    `java.lang.String` | `getName()` Gets the name of the AWM system stub.
    `java.util.List<TaurusSystemPersistableProxy>` | `parseMasterConfiguration()` Parses the master configuration of the system proxy.
    `java.io.InputStream` | `readMasterConfiguration(MasterConfigurationReference pMasterConfig)` Reads the master configuration depending on whether a master configuration path or command was set.

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

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

- - ### Constructor Detail

    - #### DefaultConfigurationSystemProxy

          public DefaultConfigurationSystemProxy(MasterConfigurationReference pMasterConfig,
                                                 java.lang.String pAssociatedSystem)

      Creates a new default configuration system proxy. Either a master configuration path or command must be specified. If both is given, the command will have a higher priority.
      Parameters:
        `pMasterConfig` - the master configuration file reference
        `pAssociatedSystem` - (optional) the name of an associated remote system

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `ITaurusSystemProxy`
      Gets the name of the AWM system stub.
      Specified by:
        `getName` in interface `ITaurusSystemProxy`
      Returns:
        the name of the system stub

    - #### getDescription

          public java.lang.String getDescription()

      Description copied from interface: `ITaurusSystemProxy`
      Gets a human readable description of the system stub, ideally containing brief information about the contained AWM applications. The description will be used e.g. in the "Add System" dialog to give the user an overview what this system might contain.

      Examples:

      - "My zServer Connection" AWM applications.
      - Local AWM applications.
      Specified by:
        `getDescription` in interface `ITaurusSystemProxy`
      Returns:
        a description of the system stub

    - #### create

          public java.util.List<ITaurusSystem> create(org.eclipse.core.runtime.IProgressMonitor pMon)
                                               throws TaurusCoreException

      Description copied from interface: `ITaurusSystemProxy`
      Creates one or several `ITaurusSystem`s from the stub. This can be used for systems which need to be created by e.g. reading a master configuration file from a remote system.

      Simple `ITaurusSystem` implementations can simply implement this interface and return `this` in a `List`.

      Specified by:
        `create` in interface `ITaurusSystemProxy`
      Parameters:
        `pMon` - a progress monitor
      Returns:
        at least one `ITaurusSystem`
      Throws:
        `TaurusCoreException` - if an exception occurs during AWM system creation

    - #### parseMasterConfiguration

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

      Parses the master configuration of the system proxy. Does not create the AWM systems.
      Returns:
        the list of AWM persistable system proxies defined in the master configuration file for this proxy
      Throws:
        `TaurusCoreException` - if parsing the master configuration file fails

    - #### getMasterConfiguration

          public MasterConfigurationReference getMasterConfiguration()

      Gets the master configuration command.
      Returns:
        the master configuration command (can be `null`)

    - #### getMasterConfigurationFormat

          public int getMasterConfigurationFormat()

      Gets the master configuration format, which is always `MasterConfigurationParser.FORMAT_XML` if a command is set and will be determined by the file suffix is a master configuration path has been set.
      Returns:
        the master configuration format

    - #### readMasterConfiguration

          public java.io.InputStream readMasterConfiguration(MasterConfigurationReference pMasterConfig)
                                                      throws TaurusCoreException

      Reads the master configuration depending on whether a master configuration path or command was set. If both is set, the master configuration command will be executed.
      Parameters:
        `pMasterConfig` - the master configuration to read
      Returns:
        the read master configuration file
      Throws:
        `TaurusCoreException` - if reading the master configuration file fails or neither a configuration path nor a command was set

Copyright © 2015 Micro Focus GmbH. All rights reserved.