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

## Class ConfigurationUtils

- java.lang.Object
- - org.wso2.carbon.mediation.initializer.configurations.ConfigurationUtils

-     public class ConfigurationUtils
      extends Object

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConfigurationUtils()` |

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static void` | `destroyConfiguration​(org.apache.synapse.config.SynapseConfiguration oldConfig, org.apache.axis2.engine.AxisConfiguration axisCfg, org.apache.synapse.core.SynapseEnvironment synapseEnvironment)` |
    `static String` | `getParameter​(String name)` |
    `static void` | `initPersistence​(org.apache.synapse.config.SynapseConfiguration synCfgConfiguration, org.wso2.carbon.registry.core.session.UserRegistry registry, String configurationLocation, org.apache.axis2.engine.AxisConfiguration axisConfiguration, String name)` | Initialize the persistence for a Synapse Configuration
    `static boolean` | `isInitialStartup​(org.wso2.carbon.registry.core.session.UserRegistry registry)` |
    `static org.apache.synapse.config.SynapseConfiguration` | `loadFromRegistry​(org.wso2.carbon.registry.core.session.UserRegistry registry, String name, String synapseXMLLocation, Properties properties)` | Load the configuration from the registry
    `static void` | `saveToFileSystem​(org.apache.synapse.config.SynapseConfiguration synapseConfig)` |
    `static void` | `saveToRegistry​(org.wso2.carbon.registry.core.session.UserRegistry registry, org.apache.synapse.config.SynapseConfiguration synapseConfig, String name)` |

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

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

- - ### Constructor Detail

    - #### ConfigurationUtils

          public ConfigurationUtils()

  - ### Method Detail

    - #### getParameter

          public static String getParameter​(String name)

    - #### loadFromRegistry

          public static org.apache.synapse.config.SynapseConfiguration loadFromRegistry​(org.wso2.carbon.registry.core.session.UserRegistry registry,
                                                                                        String name,
                                                                                        String synapseXMLLocation,
                                                                                        Properties properties)

      Load the configuration from the registry
      Parameters:
        `registry` - registry
        `name` - name of the configuration
        `synapseXMLLocation` - path to synapse xml
        `properties` - properties bag containing various synapse configurations
      Returns:
        Synapse configuration created

    - #### isInitialStartup

          public static boolean isInitialStartup​(org.wso2.carbon.registry.core.session.UserRegistry registry)

    - #### destroyConfiguration

          public static void destroyConfiguration​(org.apache.synapse.config.SynapseConfiguration oldConfig,
                                                  org.apache.axis2.engine.AxisConfiguration axisCfg,
                                                  org.apache.synapse.core.SynapseEnvironment synapseEnvironment)
                                           throws Exception

      Throws:
        `Exception`

    - #### saveToRegistry

          public static void saveToRegistry​(org.wso2.carbon.registry.core.session.UserRegistry registry,
                                            org.apache.synapse.config.SynapseConfiguration synapseConfig,
                                            String name)

    - #### initPersistence

          public static void initPersistence​(org.apache.synapse.config.SynapseConfiguration synCfgConfiguration,
                                             org.wso2.carbon.registry.core.session.UserRegistry registry,
                                             String configurationLocation,
                                             org.apache.axis2.engine.AxisConfiguration axisConfiguration,
                                             String name)
                                      throws ConfigurationInitilizerException

      Initialize the persistence for a Synapse Configuration
      Parameters:
        `synCfgConfiguration` - the synapse configuration to which to initialize the persistence
        `registry` - configuration registry
        `configurationLocation` - configuration place
        `axisConfiguration` - axisConfiguration to be used
        `name` - name of the configuration
      Throws:
        `ConfigurationInitilizerException` - if an error occurs

    - #### saveToFileSystem

          public static void saveToFileSystem​(org.apache.synapse.config.SynapseConfiguration synapseConfig)