Removed core/runtime/shell 3.2.0 bundles from the release repo, and replaced them by the new 4.0.0 version.
Added annotation 4.0.0 in release repo.
FELIX-4833: Fixed some javadocs in the annotations.
Updated changelogs with FELIX-4833, and FELIX-4832.
Updated runtime version to 4.0.1 (automatic baselining).
Updated core version to 4.0.1 (automatic baselining).
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1667855 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/cnf/localrepo/index.xml b/dependencymanager/cnf/localrepo/index.xml
index 72a68d9..c261d3a 100644
--- a/dependencymanager/cnf/localrepo/index.xml
+++ b/dependencymanager/cnf/localrepo/index.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<repository increment="1425156877273" name="Local" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
+<repository increment="1426793170988" name="Local" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity" value="de.twentyeleven.skysail.org.json-osgi"/>
diff --git a/dependencymanager/cnf/localrepo/index.xml.sha b/dependencymanager/cnf/localrepo/index.xml.sha
index 1308154..83ab9ec 100644
--- a/dependencymanager/cnf/localrepo/index.xml.sha
+++ b/dependencymanager/cnf/localrepo/index.xml.sha
@@ -1 +1 @@
-6985dc81e95848d75021052d7dd392b0f3eae258fdc1ed883c10f6b2be40555b
\ No newline at end of file
+2ebc056763851c77351f864aab070f3f7f808fe1fd23c24d7590140705dd0882
\ No newline at end of file
diff --git a/dependencymanager/cnf/releaserepo/index.xml b/dependencymanager/cnf/releaserepo/index.xml
index 9a86204..1b2d23a 100644
--- a/dependencymanager/cnf/releaserepo/index.xml
+++ b/dependencymanager/cnf/releaserepo/index.xml
@@ -1,27 +1,86 @@
<?xml version="1.0" encoding="utf-8"?>
-<repository increment="1425156877252" name="Release" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
+<repository increment="1426793170963" name="Release" xmlns="http://www.osgi.org/xmlns/repository/v1.0.0">
+ <resource>
+ <capability namespace="osgi.identity">
+ <attribute name="osgi.identity" value="org.apache.felix.dependencymanager.annotation"/>
+ <attribute name="type" value="osgi.bundle"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
+ </capability>
+ <capability namespace="osgi.content">
+ <attribute name="osgi.content" value="abbf6a81daccc472530b216fdaacf3c184dd901ec28900666e7aad288bb8daf2"/>
+ <attribute name="url" value="org.apache.felix.dependencymanager.annotation/org.apache.felix.dependencymanager.annotation-4.0.0.jar"/>
+ <attribute name="size" type="Long" value="93763"/>
+ <attribute name="mime" value="application/vnd.osgi.bundle"/>
+ </capability>
+ <capability namespace="osgi.wiring.bundle">
+ <attribute name="osgi.wiring.bundle" value="org.apache.felix.dependencymanager.annotation"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ </capability>
+ <capability namespace="osgi.wiring.host">
+ <attribute name="osgi.wiring.host" value="org.apache.felix.dependencymanager.annotation"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ </capability>
+ <capability namespace="osgi.wiring.package">
+ <attribute name="osgi.wiring.package" value="org.apache.felix.dm.annotation.api"/>
+ <attribute name="version" type="Version" value="1.0.0"/>
+ <attribute name="bundle-symbolic-name" value="org.apache.felix.dependencymanager.annotation"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ </capability>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=aQute.bnd.osgi)(version>=2.3.0)(!(version>=3.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=aQute.bnd.service)(version>=4.1.0)(!(version>=5.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=aQute.service.reporter)(version>=1.0.0)(!(version>=2.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm.annotation.api)(version>=1.0.0)(!(version>=2.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.ee">
+ <directive name="filter" value="(&(osgi.ee=JavaSE)(version=1.7))"/>
+ </requirement>
+ </resource>
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity" value="org.apache.felix.dependencymanager.runtime"/>
<attribute name="type" value="osgi.bundle"/>
- <attribute name="version" type="Version" value="3.2.0"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.content">
- <attribute name="osgi.content" value="ca2ae8e0ea60a77153ec79ea540e28f01c6fd558d389d3813440ab82c942d6ec"/>
- <attribute name="url" value="org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-3.2.0.jar"/>
- <attribute name="size" type="Long" value="104762"/>
+ <attribute name="osgi.content" value="661d603a4d94dc69f9e2b0b7ab8c6a8de17bf2fc593906cd9dc2bc04b6330bec"/>
+ <attribute name="url" value="org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-4.0.0.jar"/>
+ <attribute name="size" type="Long" value="106750"/>
<attribute name="mime" value="application/vnd.osgi.bundle"/>
</capability>
<capability namespace="osgi.wiring.bundle">
<attribute name="osgi.wiring.bundle" value="org.apache.felix.dependencymanager.runtime"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.wiring.host">
<attribute name="osgi.wiring.host" value="org.apache.felix.dependencymanager.runtime"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ </capability>
+ <capability namespace="osgi.wiring.package">
+ <attribute name="osgi.wiring.package" value="org.apache.felix.dm.runtime.api"/>
+ <attribute name="version" type="Version" value="1.0.0"/>
+ <attribute name="bundle-symbolic-name" value="org.apache.felix.dependencymanager.runtime"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ </capability>
+ <capability namespace="osgi.extender">
+ <attribute name="osgi.extender" value="org.apache.felix.dependencymanager.runtime"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
+ <directive name="uses" value="org.apache.felix.dm"/>
</capability>
<requirement namespace="osgi.wiring.package">
- <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm)(version>=3.1.0)(!(version>=4.0.0)))"/>
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm)(version>=4.0.0)(!(version>=5.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm.context)(version>=4.0.0)(!(version>=5.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm.runtime.api)(version>=1.0.0)(!(version>=2.0.0)))"/>
</requirement>
<requirement namespace="osgi.wiring.package">
<directive name="filter" value="(&(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0)))"/>
@@ -32,29 +91,32 @@
<requirement namespace="osgi.wiring.package">
<directive name="filter" value="(&(osgi.wiring.package=org.osgi.service.packageadmin)(version>=1.2.0)(!(version>=2.0.0)))"/>
</requirement>
+ <requirement namespace="osgi.ee">
+ <directive name="filter" value="(&(osgi.ee=JavaSE)(version=1.7))"/>
+ </requirement>
</resource>
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity" value="org.apache.felix.dependencymanager.shell"/>
<attribute name="type" value="osgi.bundle"/>
- <attribute name="version" type="Version" value="3.2.0"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.content">
- <attribute name="osgi.content" value="8abdc97de5abe96aac15c2090d5544ddf7ccc06440d7a20f2daccee2efbf340d"/>
- <attribute name="url" value="org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-3.2.0.jar"/>
- <attribute name="size" type="Long" value="21257"/>
+ <attribute name="osgi.content" value="6828e22e1e765659c1a0c6abb30515b6887d6cd7a7b61fd8cad14ad625f1c51b"/>
+ <attribute name="url" value="org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.0.jar"/>
+ <attribute name="size" type="Long" value="21409"/>
<attribute name="mime" value="application/vnd.osgi.bundle"/>
</capability>
<capability namespace="osgi.wiring.bundle">
<attribute name="osgi.wiring.bundle" value="org.apache.felix.dependencymanager.shell"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.wiring.host">
<attribute name="osgi.wiring.host" value="org.apache.felix.dependencymanager.shell"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
</capability>
<requirement namespace="osgi.wiring.package">
- <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm)(version>=3.1.0)(!(version>=4.0.0)))"/>
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm)(version>=4.0.0)(!(version>=5.0.0)))"/>
</requirement>
<requirement namespace="osgi.wiring.package">
<attribute name="status" value="provisional"/>
@@ -63,43 +125,53 @@
<requirement namespace="osgi.wiring.package">
<directive name="filter" value="(&(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0)))"/>
</requirement>
+ <requirement namespace="osgi.ee">
+ <directive name="filter" value="(&(osgi.ee=JavaSE)(version=1.7))"/>
+ </requirement>
</resource>
<resource>
<capability namespace="osgi.identity">
<attribute name="osgi.identity" value="org.apache.felix.dependencymanager"/>
<attribute name="type" value="osgi.bundle"/>
- <attribute name="version" type="Version" value="3.2.0"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.content">
- <attribute name="osgi.content" value="31cc27a67c457face02ababd9901dfc19bd80c01ce22f1bab25be9c7c948f265"/>
- <attribute name="url" value="org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.2.0.jar"/>
- <attribute name="size" type="Long" value="193078"/>
+ <attribute name="osgi.content" value="1ca7488357f6933a1e5db8e518e445f190dec7abca41b45c8125a4a4bf574891"/>
+ <attribute name="url" value="org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.0.0.jar"/>
+ <attribute name="size" type="Long" value="220414"/>
<attribute name="mime" value="application/vnd.osgi.bundle"/>
</capability>
<capability namespace="osgi.wiring.bundle">
<attribute name="osgi.wiring.bundle" value="org.apache.felix.dependencymanager"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.wiring.host">
<attribute name="osgi.wiring.host" value="org.apache.felix.dependencymanager"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
</capability>
<capability namespace="osgi.wiring.package">
<attribute name="osgi.wiring.package" value="org.apache.felix.dm"/>
- <attribute name="version" type="Version" value="3.1.0"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
<attribute name="bundle-symbolic-name" value="org.apache.felix.dependencymanager"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
<directive name="uses" value="org.osgi.framework"/>
</capability>
<capability namespace="osgi.wiring.package">
<attribute name="osgi.wiring.package" value="org.apache.felix.dm.tracker"/>
- <attribute name="version" type="Version" value="3.1.0"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
<attribute name="bundle-symbolic-name" value="org.apache.felix.dependencymanager"/>
- <attribute name="bundle-version" type="Version" value="3.2.0"/>
- <directive name="uses" value="org.osgi.framework,org.apache.felix.dm"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ <directive name="uses" value="org.osgi.framework"/>
+ </capability>
+ <capability namespace="osgi.wiring.package">
+ <attribute name="osgi.wiring.package" value="org.apache.felix.dm.context"/>
+ <attribute name="version" type="Version" value="4.0.0"/>
+ <attribute name="bundle-symbolic-name" value="org.apache.felix.dependencymanager"/>
+ <attribute name="bundle-version" type="Version" value="4.0.0"/>
+ <directive name="uses" value="org.apache.felix.dm,org.osgi.framework"/>
</capability>
<requirement namespace="osgi.wiring.package">
- <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm.tracker)(version>=3.1.0)(!(version>=3.2.0)))"/>
+ <directive name="filter" value="(&(osgi.wiring.package=org.apache.felix.dm.context)(version>=4.0.0)(!(version>=5.0.0)))"/>
</requirement>
<requirement namespace="osgi.wiring.package">
<directive name="filter" value="(&(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0)))"/>
@@ -110,5 +182,11 @@
<requirement namespace="osgi.wiring.package">
<directive name="filter" value="(&(osgi.wiring.package=org.osgi.service.metatype)(version>=1.1.0)(!(version>=2.0.0)))"/>
</requirement>
+ <requirement namespace="osgi.wiring.package">
+ <directive name="filter" value="(&(osgi.wiring.package=org.osgi.util.tracker)(version>=1.4.0)(!(version>=2.0.0)))"/>
+ </requirement>
+ <requirement namespace="osgi.ee">
+ <directive name="filter" value="(&(osgi.ee=JavaSE)(version=1.7))"/>
+ </requirement>
</resource>
</repository>
\ No newline at end of file
diff --git a/dependencymanager/cnf/releaserepo/index.xml.sha b/dependencymanager/cnf/releaserepo/index.xml.sha
index 9321c6e..91e7459 100644
--- a/dependencymanager/cnf/releaserepo/index.xml.sha
+++ b/dependencymanager/cnf/releaserepo/index.xml.sha
@@ -1 +1 @@
-52327447e0d3fc0d7d29dd203c14473caad9388425a7d7dff83adfcb0d814765
\ No newline at end of file
+c60665646276baa2aeaf7b160059286bf32c4a4f5fefc361135868d07b66a5c9
\ No newline at end of file
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.annotation/org.apache.felix.dependencymanager.annotation-4.0.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.annotation/org.apache.felix.dependencymanager.annotation-4.0.0.jar
new file mode 100644
index 0000000..164454f
--- /dev/null
+++ b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.annotation/org.apache.felix.dependencymanager.annotation-4.0.0.jar
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-3.2.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-3.2.0.jar
deleted file mode 100644
index b9148fe..0000000
--- a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-3.2.0.jar
+++ /dev/null
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-4.0.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-4.0.0.jar
new file mode 100644
index 0000000..5e23325
--- /dev/null
+++ b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.runtime/org.apache.felix.dependencymanager.runtime-4.0.0.jar
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-3.2.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-3.2.0.jar
deleted file mode 100644
index 90f5dd0..0000000
--- a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-3.2.0.jar
+++ /dev/null
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.0.jar
new file mode 100644
index 0000000..8b72f3f
--- /dev/null
+++ b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager.shell/org.apache.felix.dependencymanager.shell-4.0.0.jar
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.2.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.2.0.jar
deleted file mode 100644
index 36f36d9..0000000
--- a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-3.2.0.jar
+++ /dev/null
Binary files differ
diff --git a/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.0.0.jar b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.0.0.jar
new file mode 100644
index 0000000..7ad4ef3
--- /dev/null
+++ b/dependencymanager/cnf/releaserepo/org.apache.felix.dependencymanager/org.apache.felix.dependencymanager-4.0.0.jar
Binary files differ
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/bnd.bnd b/dependencymanager/org.apache.felix.dependencymanager.annotation/bnd.bnd
index 392161c..127d496 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/bnd.bnd
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/bnd.bnd
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-Bundle-Version:4.0.0
+Bundle-Version: 4.0.1
-buildpath: \
osgi.core;version=4.2,\
de.twentyeleven.skysail.org.json-osgi;version=20080701.0,\
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/resources/changelog.txt b/dependencymanager/org.apache.felix.dependencymanager.annotation/resources/changelog.txt
index 7d4278f..0efc4c0 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/resources/changelog.txt
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/resources/changelog.txt
@@ -1,3 +1,8 @@
+Release org.apache.felix.dependencymanager.r2:
+---------------------------------------------
+
+FELIX-4833: Revisit some javadocs in the DM annotations.
+
Release org.apache.felix.dependencymanager.r1:
---------------------------------------------
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/BundleDependency.java b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/BundleDependency.java
index 87d8204..2c0adaf 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/BundleDependency.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/BundleDependency.java
@@ -102,6 +102,8 @@
* All unnamed dependencies will be injected before the init() method; so from the init() method, you can
* then pick up whatever information needed from already injected (unnamed) dependencies, and configure dynamically
* your named dependencies, which will then be calculated once the init() method returns.
+ *
+ * <p> See {@link Init} annotation for an example usage of a dependency dynamically configured from the init method.
*/
String name() default "";
}
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/Init.java b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/Init.java
index c18cd67..0bc5448 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/Init.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/Init.java
@@ -24,33 +24,66 @@
import java.lang.annotation.Target;
/**
- * Annotates a method which will be invoked when the Service is initializing.
- * All required dependencies are already injected before the annotated method is called, and
- * optional dependencies on class fields are injected with NullObjects if the optional
- * dependencies are not currently available.<p>
+ * Annotates a method used to configure dynamic dependencies.
+ * When this method is invoked, all required dependencies (except the ones declared with a <code>name</code>
+ * attribute) are already injected, and optional dependencies on class fields
+ * are also already injected (possibly with NullObjects).<p>
*
- * If some dependencies are declared using a <b>named</b> @{@link ServiceDependency} annotation,
- * then the annotated method may optionally return a Map used to dynamically configure such
- * dependencies (Please refer to @{@link ServiceDependency#name()} attribute for more
- * information about this feature).<p>
+ * The purpose of the @Init method is to either declare more dynamic dependencies using the DM API, or to
+ * return a Map used to dynamically configure dependencies that are annotated using a <code>name</code> attribute.
*
- * After the init method returns, the component is then invoked in the method annotated with
- * @{@link Start}, in order to notify that the component is about to be registered into the OSGi
- * registry (if this one provides a service). However, you can take control of when the service is registered,
- * using the @{@link LifecycleController} annotation).
+ * After the init method returns, the added or configured dependencies are then tracked, and when all dynamic
+ * dependencies are injected, then the start method (annotated with @Start) is then invoked.
*
* <h3>Usage Examples</h3>
- * Here, the "VideoPlayer" init method is called after the "log" dependency is injected.
+ * In this sample, the "PersistenceImpl" component dynamically configures the "storage" dependency from the "init" method.
+ * The dependency "required" flag and filter string are derived from an xml configuration that is already injected before the init
+ * method.
+ *
* <blockquote>
* <pre>
*
* @Component
- * public class VideoPlayer {
+ * public class PersistenceImpl implements Persistence {
+ * // Injected before init.
* @ServiceDependency
* LogService log;
*
+ * // Injected before init.
+ * @ConfigurationDependency
+ * void updated(Dictionary conf) {
+ * if (conf != null) {
+ * _xmlConfiguration = parseXmlConfiguration(conf.get("xmlConfiguration"));
+ * }
+ * }
+ *
+ * // Parsed xml configuration, where we'll get our storage service filter and required dependency flag.
+ * XmlConfiguration _xmlConfiguration;
+ *
+ * // Injected after init (dependency filter is defined dynamically from our init method).
+ * @ServiceDependency(name="storage")
+ * Storage storage;
+ *
+ * // Dynamically configure the dependency declared with a "storage" name.
* @Init
- * void init() {} // initialize our service (the "log" dependency is already injected).
+ * Map<String, String> init() {
+ * log.log(LogService.LOG_WARNING, "init: storage type=" + storageType + ", storageRequired=" + storageRequired);
+ * Map<String, String> props = new HashMap<>();
+ * props.put("storage.required", Boolean.toString(_xmlConfiguration.isStorageRequired()))
+ * props.put("storage.filter", "(type=" + _xmlConfiguration.getStorageType() + ")");
+ * return props;
+ * }
+ *
+ * // All dependencies injected, including dynamic dependencies defined from init method.
+ * @Start
+ * void start() {
+ * log.log(LogService.LOG_WARNING, "start");
+ * }
+ *
+ * @Override
+ * void store(String key, String value) {
+ * storage.store(key, value);
+ * }
* }
* </pre>
* </blockquote>
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ResourceDependency.java b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ResourceDependency.java
index ebeac18..5da30ff 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ResourceDependency.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ResourceDependency.java
@@ -150,6 +150,8 @@
* All unnamed dependencies will be injected before the init() method; so from the init() method, you can
* then pick up whatever information needed from already injected (unnamed) dependencies, and configure dynamically
* your named dependencies, which will then be calculated once the init() method returns.
+ *
+ * <p> See {@link Init} annotation for an example usage of a dependency dynamically configured from the init method.
*/
String name() default "";
}
diff --git a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ServiceDependency.java b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ServiceDependency.java
index f935992..50105a1 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ServiceDependency.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.annotation/src/org/apache/felix/dm/annotation/api/ServiceDependency.java
@@ -126,54 +126,7 @@
* then pick up whatever information needed from already injected (unnamed) dependencies, and configure dynamically
* your named dependencies, which will then be calculated once the init() method returns.
*
- * <p> Usage example of a Service whose dependency filter is configured from ConfigAdmin:
- *
- * <blockquote><pre>
- * /**
- * * A Service whose service dependency "otherService" filter is configured from ConfigAdmin
- * */
- * @Service
- * class X {
- * private Dictionary m_config;
- *
- * /**
- * * Initialize our service from config ... and store the config for later usage (from our init method)
- * */
- * @ConfigurationDependency(pid="MyPid")
- * void configure(Dictionary conf) {
- * m_config = config;
- * }
- *
- * /**
- * * All unnamed dependencies are injected: we can now configure other named
- * * dependencies, using the already injected configuration.
- * * The returned Map will be used to configure our "otherService" Dependency.
- * */
- * @Init
- * Map init() {
- * return new HashMap() {{
- * put("otherService.filter", m_config.get("filter"));
- * put("otherService.required", m_config.get("required"));
- * }};
- * }
- *
- * /**
- * * This named dependency filter/required flag will be configured by our init method (see above).
- * */
- * @ServiceDependency(name="otherService")
- * void bindOtherService(OtherService other) {
- * }
- *
- * /**
- * * All dependencies are injected and our service is now ready to be published.
- * * Notice that you can also use the publisher service attribute if you need
- * * to take control on service exposition.
- * */
- * @Start
- * void start() {
- * }
- * }
- * </pre></blockquote>
+ * <p> See {@link Init} annotation for an example usage of a dependency dynamically configured from the init method.
*/
String name() default "";
diff --git a/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd b/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd
index 087aae0..21d2bfd 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd
+++ b/dependencymanager/org.apache.felix.dependencymanager.runtime/bnd.bnd
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
-Bundle-Version: 4.0.0
+Bundle-Version: 4.0.1
-buildpath: \
osgi.core;version=4.2,\
osgi.cmpn;version=4.2,\
diff --git a/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd b/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd
index 6d93dba..08e99e2 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd
+++ b/dependencymanager/org.apache.felix.dependencymanager.shell/bnd.bnd
@@ -24,7 +24,7 @@
Private-Package: \
org.apache.felix.dm.shell
Bundle-Activator:org.apache.felix.dm.shell.Activator
-Bundle-Version: 4.0.0
+Bundle-Version: 4.0.1
Include-Resource: META-INF/=resources/LICENSE,\
META-INF/=resources/NOTICE,\
META-INF/=resources/DEPENDENCIES,\
diff --git a/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd b/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd
index 435bc97..22424a4 100644
--- a/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd
+++ b/dependencymanager/org.apache.felix.dependencymanager/bnd.bnd
@@ -34,7 +34,7 @@
META-INF/=resources/changelog.txt
Import-Package: !org.junit,!org.mockito.*,*
Bundle-Activator: org.apache.felix.dm.impl.Activator
-Bundle-Version: 4.0.0
+Bundle-Version: 4.0.1
Bundle-Name: Apache Felix Dependency Manager
Bundle-Description: Provides dynamic service and component dependency management
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
diff --git a/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt b/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt
index 1e64922..ff48cf3 100644
--- a/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt
+++ b/dependencymanager/org.apache.felix.dependencymanager/resources/changelog.txt
@@ -1,3 +1,8 @@
+Release org.apache.felix.dependencymanager.r2:
+---------------------------------------------
+
+FELIX-4832: ClassCastException with autoconfig Iterable fields.
+
Release org.apache.felix.dependencymanager.r1:
---------------------------------------------