org.apache.felix.dm
Interface ConfigurationDependency

All Superinterfaces:
ComponentDependencyDeclaration, Dependency
All Known Implementing Classes:
ConfigurationDependencyImpl

public interface ConfigurationDependency
extends Dependency, ComponentDependencyDeclaration

Configuration dependency that can track the availability of a (valid) configuration. To use it, specify a PID for the configuration. The dependency is always required, because if it is not, it does not make sense to use the dependency manager. In that scenario, simply register your component as a ManagedService(Factory) and handle everything yourself. Also, only managed services are supported, not factories. There are a couple of things you need to be aware of when implementing the updated(Dictionary) method:

Author:
Felix Project Team

Field Summary
 
Fields inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration
STATE_AVAILABLE_OPTIONAL, STATE_AVAILABLE_REQUIRED, STATE_NAMES, STATE_UNAVAILABLE_OPTIONAL, STATE_UNAVAILABLE_REQUIRED
 
Method Summary
 ConfigurationDependency add(PropertyMetaData properties)
          Adds a MetaData regarding a given configuration property.
 ConfigurationDependency setCallback(String callback)
           
 ConfigurationDependency setDescription(String description)
          A human readable description of the PID this configuration is associated with.
 ConfigurationDependency setHeading(String heading)
          The label used to display the tab name (or section) where the properties are displayed.
 ConfigurationDependency setInstanceBound(boolean isInstanceBound)
           
 ConfigurationDependency setLocalization(String path)
          Points to the basename of the Properties file that can localize the Meta Type informations.
 ConfigurationDependency setPid(String pid)
          Sets the service.pid of the configuration you are depending on.
 ConfigurationDependency setPropagate(boolean propagate)
          Sets propagation of the configuration properties to the service properties.
 
Methods inherited from interface org.apache.felix.dm.Dependency
createCopy, getAutoConfigInstance, getAutoConfigName, getAutoConfigType, getProperties, invokeAdded, invokeRemoved, isAutoConfig, isAvailable, isInstanceBound, isPropagated, isRequired
 
Methods inherited from interface org.apache.felix.dm.ComponentDependencyDeclaration
getName, getState, getType
 

Method Detail

setCallback

ConfigurationDependency setCallback(String callback)

setPid

ConfigurationDependency setPid(String pid)
Sets the service.pid of the configuration you are depending on.


setPropagate

ConfigurationDependency setPropagate(boolean propagate)
Sets propagation of the configuration properties to the service properties. Any additional service properties specified directly are merged with these.


setHeading

ConfigurationDependency setHeading(String heading)
The label used to display the tab name (or section) where the properties are displayed. Example: "Printer Service".

Returns:
The label used to display the tab name where the properties are displayed (may be localized)

setDescription

ConfigurationDependency setDescription(String description)
A human readable description of the PID this configuration is associated with. Example: "Configuration for the PrinterService bundle".

Returns:
A human readable description of the PID this configuration is associated with (may be localized)

setLocalization

ConfigurationDependency setLocalization(String path)
Points to the basename of the Properties file that can localize the Meta Type informations. The default localization base name for the properties is OSGI-INF/l10n/bundle, but can be overridden by the manifest Bundle-Localization header (see core specification, in section Localization on page 68). You can specify a specific localization basename file using this method (e.g. setLocalization("person") will match person_du_NL.properties in the root bundle directory.


add

ConfigurationDependency add(PropertyMetaData properties)
Adds a MetaData regarding a given configuration property.


setInstanceBound

ConfigurationDependency setInstanceBound(boolean isInstanceBound)


Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.