org.apache.tamaya.integration.osgi

## Class TamayaConfigAdminImpl

- java.lang.Object
- - org.apache.tamaya.integration.osgi.TamayaConfigAdminImpl

- All Implemented Interfaces:
    org.osgi.service.cm.ConfigurationAdmin

      public class TamayaConfigAdminImpl
      extends Object
      implements org.osgi.service.cm.ConfigurationAdmin

  Tamaya based implementation of an OSGI `ConfigurationAdmin`.

- - ### Field Summary

    - ### Fields inherited from interface org.osgi.service.cm.ConfigurationAdmin

      `SERVICE_BUNDLELOCATION, SERVICE_FACTORYPID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TamayaConfigAdminImpl(org.osgi.framework.BundleContext context)` Create a new config.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.osgi.service.cm.Configuration` | `createFactoryConfiguration(String factoryPid)`
    `org.osgi.service.cm.Configuration` | `createFactoryConfiguration(String factoryPid, String location)`
    `org.osgi.service.cm.Configuration` | `getConfiguration(String pid)`
    `org.osgi.service.cm.Configuration` | `getConfiguration(String pid, String location)`
    `org.osgi.service.cm.Configuration[]` | `listConfigurations(String filter)`
    `protected OSGIConfigRootMapper` | `loadConfigRootMapper()` Loads the configuration toor mapper using the OSGIConfigRootMapper OSGI service resolving mechanism.

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

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

- - ### Constructor Detail

    - #### TamayaConfigAdminImpl

          public TamayaConfigAdminImpl(org.osgi.framework.BundleContext context)

      Create a new config.
      Parameters:
        `context` - the OSGI context

  - ### Method Detail

    - #### loadConfigRootMapper

          protected OSGIConfigRootMapper loadConfigRootMapper()

      Loads the configuration toor mapper using the OSGIConfigRootMapper OSGI service resolving mechanism. If no such service is available it loads the default mapper.
      Returns:
        the mapper to be used, bever null.

    - #### createFactoryConfiguration

          public org.osgi.service.cm.Configuration createFactoryConfiguration(String factoryPid)
                                                                       throws IOException

      Specified by:
        `createFactoryConfiguration` in interface `org.osgi.service.cm.ConfigurationAdmin`
      Throws:
        `IOException`

    - #### createFactoryConfiguration

          public org.osgi.service.cm.Configuration createFactoryConfiguration(String factoryPid,
                                                                     String location)
                                                                       throws IOException

      Specified by:
        `createFactoryConfiguration` in interface `org.osgi.service.cm.ConfigurationAdmin`
      Throws:
        `IOException`

    - #### getConfiguration

          public org.osgi.service.cm.Configuration getConfiguration(String pid,
                                                           String location)
                                                             throws IOException

      Specified by:
        `getConfiguration` in interface `org.osgi.service.cm.ConfigurationAdmin`
      Throws:
        `IOException`

    - #### getConfiguration

          public org.osgi.service.cm.Configuration getConfiguration(String pid)
                                                             throws IOException

      Specified by:
        `getConfiguration` in interface `org.osgi.service.cm.ConfigurationAdmin`
      Throws:
        `IOException`

    - #### listConfigurations

          public org.osgi.service.cm.Configuration[] listConfigurations(String filter)
                                                                 throws IOException,
                                                                        org.osgi.framework.InvalidSyntaxException

      Specified by:
        `listConfigurations` in interface `org.osgi.service.cm.ConfigurationAdmin`
      Throws:
        `IOException`
        `org.osgi.framework.InvalidSyntaxException`

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.