Package org.wso2.carbon.mediation.initializer.configurations

# Class ConfigurationManager

java.lang.Object
org.wso2.carbon.mediation.initializer.configurations.ConfigurationManager

public class ConfigurationManager extends Object
Responsible for managing the differrence configurations inside a single ConfigurationContext.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `CONFIGURATION_MANAGER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConfigurationManager(org.wso2.carbon.registry.core.session.UserRegistry registry, org.apache.axis2.context.ConfigurationContext configurationContext)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `activate(String name)`
  Activate the given configuration.
  `void`
  `addExistingConfiguration(String name)`
  `void`
  `create(String name, String description)`
  Create a new configuration.
  `void`
  `delete(String name)`
  Delete a configuration.
  `List<ConfigurationInformation>`
  `getConfigurationsList()`
  Return the list of configurations available.
  `ConfigurationTracker`
  `getTracker()`
  Get the configuration tracker
  `void`
  `init()`
  Initilize the configuration manager

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

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

- ## Field Details

  - ### CONFIGURATION_MANAGER

    public static final String CONFIGURATION_MANAGER
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ConfigurationManager

    public ConfigurationManager(org.wso2.carbon.registry.core.session.UserRegistry registry, org.apache.axis2.context.ConfigurationContext configurationContext)
    Parameters:
      `registry` - the configuration registry
      `configurationContext` - servers configuration context

- ## Method Details

  - ### init

    public void init() throws ConfigurationInitilizerException
    Initilize the configuration manager
    Throws:
      `ConfigurationInitilizerException` - if an error occurs

  - ### getTracker

    public ConfigurationTracker getTracker()
    Get the configuration tracker
    Returns:
      configuration tracker used by this manager

  - ### activate

    public boolean activate(String name) throws ConfigurationInitilizerException
    Activate the given configuration. This will intern deactivate the current configuration and then activate the new configuration.
    Parameters:
      `name` - name of the configuration to be activated
    Returns:
      true if activation is successful
    Throws:
      `ConfigurationInitilizerException` - if an error occurs while activating

  - ### delete

    public void delete(String name) throws ConfigurationInitilizerException
    Delete a configuration. This will delete the registry entry, but it won't delete the actual files and registry persitant information.
    Parameters:
      `name` - name of the configuration to be deleted
    Throws:
      `ConfigurationInitilizerException` - if an error occurs

  - ### create

    public void create(String name, String description) throws ConfigurationInitilizerException
    Create a new configuration. This won't write anything to the disk until this configuration is activated.
    Parameters:
      `name` - name of the configuration
      `description` - description of the configuration
    Throws:
      `ConfigurationInitilizerException` - if an error occurs

  - ### getConfigurationsList

    public List<ConfigurationInformation> getConfigurationsList() throws ConfigurationInitilizerException
    Return the list of configurations available.
    Returns:
      list of configuration information
    Throws:
      `ConfigurationInitilizerException` - if an error occurs

  - ### addExistingConfiguration

    public void addExistingConfiguration(String name) throws ConfigurationInitilizerException
    Throws:
      `ConfigurationInitilizerException`