org.apache.aries.jmx.cm
Class ConfigurationAdmin

java.lang.Object
  extended by org.apache.aries.jmx.cm.ConfigurationAdmin
All Implemented Interfaces:
ConfigurationAdminMBean

public class ConfigurationAdmin
extends Object
implements ConfigurationAdminMBean

Implementation of ConfigurationAdminMBean

Version:
$Rev: 953097 $ $Date: 2010-06-09 18:48:01 +0100 (Wed, 09 Jun 2010) $

Field Summary
 
Fields inherited from interface org.osgi.jmx.service.cm.ConfigurationAdminMBean
OBJECTNAME
 
Constructor Summary
ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
          Constructs a ConfigurationAdmin implementation
 
Method Summary
 String createFactoryConfiguration(String factoryPid)
          Create a new configuration instance for the supplied persistent id of the factory, answering the PID of the created configuration
 String createFactoryConfigurationForLocation(String factoryPid, String location)
          Create a factory configuration for the supplied persistent id of the factory and the bundle location bound to bind the created configuration to, answering the PID of the created configuration
 void delete(String pid)
          Delete the configuration
 void deleteConfigurations(String filter)
          Delete the configurations matching the filter specification.
 void deleteForLocation(String pid, String location)
          Delete the configuration
 String getBundleLocation(String pid)
          Answer the bundle location the configuration is bound to
 String[][] getConfigurations(String filter)
          Answer the list of PID/Location pairs of the configurations managed by this service
 String getFactoryPid(String pid)
          Answer the factory PID if the configuration is a factory configuration, null otherwise.
 String getFactoryPidForLocation(String pid, String location)
          Answer the factory PID if the configuration is a factory configuration, null otherwise.
 TabularData getProperties(String pid)
          Answer the contents of the configuration

 TabularData getPropertiesForLocation(String pid, String location)
          Answer the contents of the configuration

 void setBundleLocation(String pid, String location)
          Set the bundle location the configuration is bound to
 void update(String pid, TabularData configurationTable)
          Update the configuration with the supplied properties For each property entry, the following row is supplied

 void updateForLocation(String pid, String location, TabularData configurationTable)
          Update the configuration with the supplied properties For each property entry, the following row is supplied

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationAdmin

public ConfigurationAdmin(org.osgi.service.cm.ConfigurationAdmin configurationAdmin)
Constructs a ConfigurationAdmin implementation

Parameters:
configurationAdmin - instance of org.osgi.service.cm.ConfigurationAdmin service
Method Detail

createFactoryConfiguration

public String createFactoryConfiguration(String factoryPid)
                                  throws IOException
Description copied from interface: ConfigurationAdminMBean
Create a new configuration instance for the supplied persistent id of the factory, answering the PID of the created configuration

Specified by:
createFactoryConfiguration in interface ConfigurationAdminMBean
Parameters:
factoryPid - the persistent id of the factory
Returns:
the PID of the created configuration
Throws:
IOException - if the operation failed
See Also:
ConfigurationAdminMBean.createFactoryConfiguration(java.lang.String)

createFactoryConfigurationForLocation

public String createFactoryConfigurationForLocation(String factoryPid,
                                                    String location)
                                             throws IOException
Description copied from interface: ConfigurationAdminMBean
Create a factory configuration for the supplied persistent id of the factory and the bundle location bound to bind the created configuration to, answering the PID of the created configuration

Specified by:
createFactoryConfigurationForLocation in interface ConfigurationAdminMBean
Parameters:
factoryPid - the persistent id of the factory
location - the bundle location
Returns:
the pid of the created configuation
Throws:
IOException - if the operation failed
See Also:
ConfigurationAdminMBean.createFactoryConfigurationForLocation(java.lang.String, java.lang.String)

delete

public void delete(String pid)
            throws IOException
Description copied from interface: ConfigurationAdminMBean
Delete the configuration

Specified by:
delete in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.delete(java.lang.String)

deleteForLocation

public void deleteForLocation(String pid,
                              String location)
                       throws IOException
Description copied from interface: ConfigurationAdminMBean
Delete the configuration

Specified by:
deleteForLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
location - the bundle location
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.deleteForLocation(java.lang.String, java.lang.String)

deleteConfigurations

public void deleteConfigurations(String filter)
                          throws IOException
Description copied from interface: ConfigurationAdminMBean
Delete the configurations matching the filter specification.

Specified by:
deleteConfigurations in interface ConfigurationAdminMBean
Parameters:
filter - the string representation of the org.osgi.framework.Filter
Throws:
IOException - if the operation failed
See Also:
ConfigurationAdminMBean.deleteConfigurations(java.lang.String)

getBundleLocation

public String getBundleLocation(String pid)
                         throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the bundle location the configuration is bound to

Specified by:
getBundleLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
Returns:
the bundle location
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.getBundleLocation(java.lang.String)

getConfigurations

public String[][] getConfigurations(String filter)
                             throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the list of PID/Location pairs of the configurations managed by this service

Specified by:
getConfigurations in interface ConfigurationAdminMBean
Parameters:
filter - the string representation of the org.osgi.framework.Filter
Returns:
the list of configuration PID/Location pairs
Throws:
IOException - if the operation failed
See Also:
ConfigurationAdminMBean.getConfigurations(java.lang.String)

getFactoryPid

public String getFactoryPid(String pid)
                     throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the factory PID if the configuration is a factory configuration, null otherwise.

Specified by:
getFactoryPid in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
Returns:
the factory PID
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.getFactoryPid(java.lang.String)

getFactoryPidForLocation

public String getFactoryPidForLocation(String pid,
                                       String location)
                                throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the factory PID if the configuration is a factory configuration, null otherwise.

Specified by:
getFactoryPidForLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
location - the bundle location
Returns:
the factory PID
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.getFactoryPidForLocation(java.lang.String, java.lang.String)

getProperties

public TabularData getProperties(String pid)
                          throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the contents of the configuration

Specified by:
getProperties in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
Returns:
the table of contents
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.getProperties(java.lang.String)

getPropertiesForLocation

public TabularData getPropertiesForLocation(String pid,
                                            String location)
                                     throws IOException
Description copied from interface: ConfigurationAdminMBean
Answer the contents of the configuration

Specified by:
getPropertiesForLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
location - the bundle location
Returns:
the table of contents
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.getPropertiesForLocation(java.lang.String, java.lang.String)

setBundleLocation

public void setBundleLocation(String pid,
                              String location)
                       throws IOException
Description copied from interface: ConfigurationAdminMBean
Set the bundle location the configuration is bound to

Specified by:
setBundleLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
location - the bundle location
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.setBundleLocation(java.lang.String, java.lang.String)

update

public void update(String pid,
                   TabularData configurationTable)
            throws IOException
Description copied from interface: ConfigurationAdminMBean
Update the configuration with the supplied properties For each property entry, the following row is supplied

Specified by:
update in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
configurationTable - the table of properties
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.update(java.lang.String, javax.management.openmbean.TabularData)

updateForLocation

public void updateForLocation(String pid,
                              String location,
                              TabularData configurationTable)
                       throws IOException
Description copied from interface: ConfigurationAdminMBean
Update the configuration with the supplied properties For each property entry, the following row is supplied

Specified by:
updateForLocation in interface ConfigurationAdminMBean
Parameters:
pid - the persistent identifier of the configuration
location - the bundle location
configurationTable - the table of properties
Throws:
IOException - if the operation fails
See Also:
ConfigurationAdminMBean.updateForLocation(java.lang.String, java.lang.String, javax.management.openmbean.TabularData)


Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.