|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.buglabs.osgi.cm.impl.ConfigurationAdminImpl
public class ConfigurationAdminImpl
ConfigurationAdmin implementation (OSGi R3 10.14.3)
| Field Summary |
|---|
| Fields inherited from interface org.osgi.service.cm.ConfigurationAdmin |
|---|
SERVICE_BUNDLELOCATION, SERVICE_FACTORYPID |
| Constructor Summary | |
|---|---|
ConfigurationAdminImpl()
|
|
| Method Summary | |
|---|---|
Configuration |
createFactoryConfiguration(java.lang.String factoryPid)
Create a new factory Configuration object with a new PID. |
Configuration |
createFactoryConfiguration(java.lang.String factoryPid,
java.lang.String location)
Create a new factory Configuration object with a new PID. |
Configuration |
getConfiguration(java.lang.String pid)
Get an existing or new Configuration object from the persistent store. |
Configuration |
getConfiguration(java.lang.String pid,
java.lang.String location)
Get an existing Configuration object from the persistent store, or create a new Configuration object. |
Configuration[] |
listConfigurations(java.lang.String filter)
List the current Configuration objects which match the filter. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationAdminImpl()
| Method Detail |
|---|
public Configuration createFactoryConfiguration(java.lang.String factoryPid)
throws java.io.IOException
ConfigurationAdminConfiguration.update(java.util.Dictionary) method is called.
It is not required that the factoryPid maps to a registered Managed Service Factory.
The Configuration object is bound to the location of the calling bundle.
createFactoryConfiguration in interface ConfigurationAdminfactoryPid - PID of factory (not null).
java.io.IOException - if access to persistent storage fails.
public Configuration createFactoryConfiguration(java.lang.String factoryPid,
java.lang.String location)
throws java.io.IOException
ConfigurationAdminConfiguration.update(java.util.Dictionary) method is called.
It is not required that the factoryPid maps to a registered Managed Service Factory.
The Configuration is bound to the location specified. If this location is null it will be bound to the location of the first bundle that registers a Managed Service Factory with a corresponding PID.
This method requires AdminPermission.
createFactoryConfiguration in interface ConfigurationAdminfactoryPid - PID of factory (not null).location - a bundle location string, or null.
java.io.IOException - if access to persistent storage fails.
public Configuration getConfiguration(java.lang.String pid)
throws java.io.IOException
ConfigurationAdminElse, if the location of the existing Configuration object is null, set it to the calling bundle's location.
If the location of the Configuration object does not match the calling bundle, throw a SecurityException.
getConfiguration in interface ConfigurationAdminpid - persistent identifier.
java.io.IOException - if access to persistent storage fails.
public Configuration getConfiguration(java.lang.String pid,
java.lang.String location)
throws java.io.IOException
ConfigurationAdminIf a Configuration with this PID already exists in Configuration Admin service return it. The location parameter is ignored in this case.
Else, return a new Configuration object. This new object is bound to the location and the properties are set to null. If the location parameter is null, it will be set when a Managed Service with the corresponding PID is registered for the first time.
This method requires AdminPermission.
getConfiguration in interface ConfigurationAdminpid - persistent identifier.location - the bundle location string, or null.
java.io.IOException - if access to persistent storage fails.
public Configuration[] listConfigurations(java.lang.String filter)
throws java.io.IOException,
InvalidSyntaxException
ConfigurationAdminOnly Configuration objects with non-null properties are considered current. That is, Configuration.getProperties() is guaranteed not to return null for each of the returned Configuration objects.
Normally only Configuration objects that are bound to the location of the calling bundle are returned. If the caller has AdminPermission, then all matching Configuration objects are returned.
The syntax of the filter string is as defined in the Filter class. The filter can test any configuration parameters including the following system properties:
listConfigurations in interface ConfigurationAdminfilter - a Filter object, or null to retrieve all
Configuration objects.
java.io.IOException - if access to persistent storage fails
InvalidSyntaxException - if the filter string is invalid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||