Aligned MetaType annotations on DependencyManager API: the configuration metadata is now specified when declaring the ConfigurationDependency annotation. Renamed "Param" annotation to "Property" annotation for consistency and clarity reasons

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@919878 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
index 7ff1016..f820d4e 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AdapterService.java
@@ -46,7 +46,7 @@
      * The adapter service properites. They will be added to the adapted service properties.
      * @return additional properties to use with the adapter service registration
      */
-    Param[] adapterProperties() default {};
+    Property[] adapterProperties() default {};
 
     /**
      * The adapted service interface
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
index 5836e4f..854faf5 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/AspectService.java
@@ -52,7 +52,7 @@
      * Additional properties to use with the aspect service registration
      * @return additional properties to use with the aspect service registration
      */
-    Param[] properties() default {};
+    Property[] properties() default {};
     
     /**
      * Ranking of this aspect. Since aspects are chained, the ranking defines the order in which they are chained.
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
index 7d0d3d2..53a099a 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/BundleAdapterService.java
@@ -57,7 +57,7 @@
     /**
      * Additional properties to use with the service registration
      */
-    Param[] properties() default {};
+    Property[] properties() default {};
     
     /**
      * Specifies if properties from the bundle should be propagated to the service.
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ConfigurationDependency.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ConfigurationDependency.java
index f0d19d4..ed13e16 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ConfigurationDependency.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ConfigurationDependency.java
@@ -42,4 +42,22 @@
      * @return true if configuration must be published along with the service, false if not.
      */
     boolean propagate() default false;
+    
+    /**
+     * The label used to display the tab name (or section) where the properties are displayed. Example: "Printer Service".
+     * @return The label used to display the tab name where the properties are displayed.
+     */
+    String heading() default "";
+
+    /**
+     * A human readable description of the PID this annotation is associated with. Example: "Configuration for the PrinterService bundle".
+     * @return A human readable description of the PID this annotation is associated with.
+     */
+    String description() default "";
+
+    /**
+     * The list of properties types used to expose properties in web console. 
+     * @return The list of properties types used to expose properties in web console. 
+     */
+    PropertyMetaData[] properties() default {};
 }
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Param.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Param.java
deleted file mode 100644
index 1516586..0000000
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Param.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.dm.annotation.api;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Annotation used to describe a property key-value pair. It is used when
- * declaring {@link Service#properties()} attribute, as well as {@link Property#options()} attribute.
- */
-@Retention(RetentionPolicy.CLASS)
-@Target( { ElementType.ANNOTATION_TYPE })
-public @interface Param
-{
-    /**
-     * Returns the property name.
-     * @return this property name
-     */
-    String name();
-
-    /**
-     * Returns the property value
-     * @return this property value
-     */
-    String value();
-}
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Properties.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Properties.java
deleted file mode 100644
index 7d76fd3..0000000
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Properties.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.felix.dm.annotation.api;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * Describes configuration properties MetaData informations. This annotation is used to generate
- * a MetaType xml file under OSGI-INF/metatype/metatype.xml and is used to configure
- * Service Component properties through web console.
- */
-@Retention(RetentionPolicy.CLASS)
-@Target(ElementType.TYPE)
-public @interface Properties
-{
-    /**
-     * Sets the PID that is associated with this annotation. By default, the PID is the full java class name.
-     * @return The PID that is associated with this annotation.
-     */
-    String pid() default "";
-
-    /**
-     * The label used to display the tab name (or section) where the properties are displayed. Example: "Printer Service".
-     * @return The label used to display the tab name where the properties are displayed.
-     */
-    String heading();
-
-    /**
-     * A human readable description of the PID this annotation is associated with. Example: "Configuration for the PrinterService bundle".
-     * @return A human readable description of the PID this annotation is associated with.
-     */
-    String description();
-
-    /**
-     * The list of properties types used to expose properties in web console. 
-     * @return The list of properties types used to expose properties in web console. 
-     */
-    Property[] properties();
-}
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Property.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Property.java
index 30e14bf..6800747 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Property.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Property.java
@@ -24,79 +24,22 @@
 import java.lang.annotation.Target;
 
 /**
- * This annotation describes the data types of a configuration Property.
+ * Annotation used to describe a property key-value pair. It is used when
+ * declaring {@link Service#properties()} attribute, as well as {@link PropertyMetaData#options()} attribute.
  */
 @Retention(RetentionPolicy.CLASS)
-@Target(ElementType.ANNOTATION_TYPE)
+@Target( { ElementType.ANNOTATION_TYPE })
 public @interface Property
 {
     /**
-     * The label used to display the property. Example: "Log Level".
-     * @return The label used to display the property
+     * Returns the property name.
+     * @return this property name
      */
-    String heading();
+    String name();
 
     /**
-     * The key of a ConfigurationAdmin property. Example: "printer.logLevel"
-     * @return The Configuration Admin property name
+     * Returns the property value
+     * @return this property value
      */
-    String id();
-
-    /**
-     * Return the property primitive type. If must be either one of the following types:<p>
-     * <ul>
-     *    <li>String.class</li>
-     *    <li>Long.class</li>
-     *    <li>Integer.class</li>
-     *    <li>Character.class</li>
-     *    <li>Byte.class</li>
-     *    <li>Double.class</li>
-     *    <li>Float.class</li>
-     *    <li>Boolean.class</li>
-     * </ul>
-     */
-    Class<?> type() default String.class;
-
-    /**
-     * Return a default for this property. The object must be of the appropriate type as defined by the cardinality and getType(). 
-     * The return type is a list of String  objects that can be converted to the appropriate type. The cardinality of the return 
-     * array must follow the absolute cardinality of this type. E.g. if the cardinality = 0, the array must contain 1 element. 
-     * If the cardinality is 1, it must contain 0 or 1 elements. If it is -5, it must contain from 0 to max 5 elements. Note that 
-     * the special case of a 0 cardinality, meaning a single value, does not allow arrays or vectors of 0 elements. 
-     */
-    String[] defaults() default {};
-
-    /**
-     * Returns the property description. The description may be localized and must describe the semantics of this type and any 
-     * constraints. Example: "Select the log level for the Printer Service".
-     * @return The localized description of the definition.
-     */
-    String description();
-
-    /**
-     * Return the cardinality of this property. The OSGi environment handles multi valued properties in arrays ([]) or in Vector objects. 
-     * The return value is defined as follows:<p>
-     *
-     * <ul>
-     * <li> x = Integer.MIN_VALUE    no limit, but use Vector</li>
-     * <li> x < 0                    -x = max occurrences, store in Vector</li>
-     * <li> x > 0                     x = max occurrences, store in array []</li>
-     * <li> x = Integer.MAX_VALUE    no limit, but use array []</li>
-     * <li> x = 0                     1 occurrence required</li>
-     * </ul>
-     */
-    int cardinality() default 0;
-
-    /**
-     * Tells if this property is required or not.
-     */
-    boolean required() default true;
-
-    /**
-     * Return a list of valid options for this property.
-     * The Options are defined using the {@link Param} annotation, where the {@link Param#name()} attribute is used to
-     * reference the option label, and the {@link Param#value()} attribute is used to reference the option value.
-     * @return the list of valid options for this property.
-     */
-    Param[] options() default {};
+    String value();
 }
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/PropertyMetaData.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/PropertyMetaData.java
new file mode 100644
index 0000000..0ece247
--- /dev/null
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/PropertyMetaData.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.felix.dm.annotation.api;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This annotation describes the data types of a configuration Property.
+ */
+@Retention(RetentionPolicy.CLASS)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface PropertyMetaData
+{
+    /**
+     * The label used to display the property. Example: "Log Level".
+     * @return The label used to display the property
+     */
+    String heading();
+
+    /**
+     * The key of a ConfigurationAdmin property. Example: "printer.logLevel"
+     * @return The Configuration Admin property name
+     */
+    String id();
+
+    /**
+     * Return the property primitive type. If must be either one of the following types:<p>
+     * <ul>
+     *    <li>String.class</li>
+     *    <li>Long.class</li>
+     *    <li>Integer.class</li>
+     *    <li>Character.class</li>
+     *    <li>Byte.class</li>
+     *    <li>Double.class</li>
+     *    <li>Float.class</li>
+     *    <li>Boolean.class</li>
+     * </ul>
+     */
+    Class<?> type() default String.class;
+
+    /**
+     * Return a default for this property. The object must be of the appropriate type as defined by the cardinality and getType(). 
+     * The return type is a list of String  objects that can be converted to the appropriate type. The cardinality of the return 
+     * array must follow the absolute cardinality of this type. E.g. if the cardinality = 0, the array must contain 1 element. 
+     * If the cardinality is 1, it must contain 0 or 1 elements. If it is -5, it must contain from 0 to max 5 elements. Note that 
+     * the special case of a 0 cardinality, meaning a single value, does not allow arrays or vectors of 0 elements. 
+     */
+    String[] defaults() default {};
+
+    /**
+     * Returns the property description. The description may be localized and must describe the semantics of this type and any 
+     * constraints. Example: "Select the log level for the Printer Service".
+     * @return The localized description of the definition.
+     */
+    String description();
+
+    /**
+     * Return the cardinality of this property. The OSGi environment handles multi valued properties in arrays ([]) or in Vector objects. 
+     * The return value is defined as follows:<p>
+     *
+     * <ul>
+     * <li> x = Integer.MIN_VALUE    no limit, but use Vector</li>
+     * <li> x < 0                    -x = max occurrences, store in Vector</li>
+     * <li> x > 0                     x = max occurrences, store in array []</li>
+     * <li> x = Integer.MAX_VALUE    no limit, but use array []</li>
+     * <li> x = 0                     1 occurrence required</li>
+     * </ul>
+     */
+    int cardinality() default 0;
+
+    /**
+     * Tells if this property is required or not.
+     */
+    boolean required() default true;
+
+    /**
+     * Return a list of valid options for this property.
+     * The Options are defined using the {@link Property} annotation, where the {@link Property#name()} attribute is used to
+     * reference the option label, and the {@link Property#value()} attribute is used to reference the option value.
+     * @return the list of valid options for this property.
+     */
+    Property[] options() default {};
+}
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
index cd6c689..3aebcac 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/ResourceAdapterService.java
@@ -49,7 +49,7 @@
     /**
      * Additional properties to use with the adapter service registration
      */
-    Param[] properties() default {};
+    Property[] properties() default {};
 
     /**
      * <code>true</code> if properties from the resource should be propagated to the service.
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Service.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Service.java
index e0c8c27..8c69541 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Service.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/api/Service.java
@@ -40,7 +40,7 @@
      * Returns the list of provided service properties.
      * @return The list of provided service properties.
      */
-    Param[] properties() default {};
+    Property[] properties() default {};
     
     /**
      * Returns the Class of the class which acts as a factory for this Service. The default method
diff --git a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
index bf47e81..aa77182 100644
--- a/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
+++ b/dependencymanager/annotation/src/main/java/org/apache/felix/dm/annotation/plugin/bnd/AnnotationCollector.java
@@ -37,7 +37,6 @@
 import org.apache.felix.dm.annotation.api.ConfigurationDependency;
 import org.apache.felix.dm.annotation.api.Destroy;
 import org.apache.felix.dm.annotation.api.Init;
-import org.apache.felix.dm.annotation.api.Properties;
 import org.apache.felix.dm.annotation.api.ResourceAdapterService;
 import org.apache.felix.dm.annotation.api.ResourceDependency;
 import org.apache.felix.dm.annotation.api.Service;
@@ -76,8 +75,6 @@
         + BundleDependency.class.getName().replace('.', '/') + ";";
     private final static String A_RESOURCE_DEPENDENCY = "L"
         + ResourceDependency.class.getName().replace('.', '/') + ";";
-    private final static String A_PROPERTIES = "L"
-        + Properties.class.getName().replace('.', '/') + ";";
     private final static String A_ASPECT_SERVICE = "L"
         + AspectService.class.getName().replace('.', '/') + ";";
     private final static String A_ADAPTER_SERVICE = "L"
@@ -424,10 +421,6 @@
         {
             parseServiceDependencyAnnotation(annotation, true);
         } 
-        else if (annotation.getName().equals(A_PROPERTIES)) 
-        {
-            parsePropertiesMetaData(annotation);
-        }
         else if (annotation.getName().equals(A_BUNDLE_DEPENDENCY)) 
         {
             parseBundleDependencyAnnotation(annotation);
@@ -571,47 +564,47 @@
 
         // propagate attribute
         info.addParam(annotation, Params.propagate, null);
-    }
 
-    /**
-     * Parses a Properties annotation which declares Config Admin Properties meta data.
-     * @param properties the Properties annotation to be parsed.
-     */
-    private void parsePropertiesMetaData(Annotation properties)
-    {
-        String propertiesPid = get(properties, "pid", m_className);
-        String propertiesHeading = properties.get("heading");
-        String propertiesDesc = properties.get("description");
-
-        MetaType.OCD ocd = new MetaType.OCD(propertiesPid, propertiesHeading, propertiesDesc);
-        for (Object p : (Object[]) properties.get("properties"))
+        // Property Meta Types
+        if (annotation.get("properties") != null)
         {
-            Annotation property = (Annotation) p;
-            String heading = property.get("heading");
-            String id = property.get("id");
-            String type = (String) property.get("type");
-            type = (type != null) ? parseClass(type, m_classPattern, 1) : null;
-            Object[] defaults = (Object[]) property.get("defaults");
-            String description = property.get("description");
-            Integer cardinality = property.get("cardinality");
-            Boolean required = property.get("required");
+            String propertiesPid = get(annotation, "pid", m_className);
+            String propertiesHeading = annotation.get("heading");
+            String propertiesDesc = annotation.get("description");
 
-            MetaType.AD ad = new MetaType.AD(id, type, defaults, heading, description, cardinality, required);
-            Object[] options = property.get("options");
-            if (options != null) {
-                for (Object o : (Object[]) property.get("options"))
+            MetaType.OCD ocd = new MetaType.OCD(propertiesPid, propertiesHeading, propertiesDesc);
+            for (Object p : (Object[]) annotation.get("properties"))
+            {
+                Annotation property = (Annotation) p;
+                String heading = property.get("heading");
+                String id = property.get("id");
+                String type = (String) property.get("type");
+                type = (type != null) ? parseClass(type, m_classPattern, 1) : null;
+                Object[] defaults = (Object[]) property.get("defaults");
+                String description = property.get("description");
+                Integer cardinality = property.get("cardinality");
+                Boolean required = property.get("required");
+
+                MetaType.AD ad = new MetaType.AD(id, type, defaults, heading, description,
+                    cardinality, required);
+                Object[] options = property.get("options");
+                if (options != null)
                 {
-                    Annotation option = (Annotation) o;
-                    ad.add(new MetaType.Option((String) option.get("name"), (String) option.get("value")));
+                    for (Object o : (Object[]) property.get("options"))
+                    {
+                        Annotation option = (Annotation) o;
+                        ad.add(new MetaType.Option((String) option.get("name"),
+                            (String) option.get("value")));
+                    }
                 }
+                ocd.add(ad);
             }
-            ocd.add(ad);
-        }
 
-        m_metaType.add(ocd);
-        MetaType.Designate designate = new MetaType.Designate(propertiesPid);
-        m_metaType.add(designate);
-        m_reporter.warning("Parsed MetaType Properties from class " + m_className);
+            m_metaType.add(ocd);
+            MetaType.Designate designate = new MetaType.Designate(propertiesPid);
+            m_metaType.add(designate);
+            m_reporter.warning("Parsed MetaType Properties from class " + m_className);
+        }
     }
 
     /**
diff --git a/dependencymanager/samples.annotation/src/main/java/org/apache/felix/dm/samples/annotation/EnglishDictionary.java b/dependencymanager/samples.annotation/src/main/java/org/apache/felix/dm/samples/annotation/EnglishDictionary.java
index 1f16ff6..5a2ee2e 100644
--- a/dependencymanager/samples.annotation/src/main/java/org/apache/felix/dm/samples/annotation/EnglishDictionary.java
+++ b/dependencymanager/samples.annotation/src/main/java/org/apache/felix/dm/samples/annotation/EnglishDictionary.java
@@ -22,29 +22,15 @@
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.felix.dm.annotation.api.ConfigurationDependency;
-import org.apache.felix.dm.annotation.api.Param;
-import org.apache.felix.dm.annotation.api.Properties;
 import org.apache.felix.dm.annotation.api.Property;
+import org.apache.felix.dm.annotation.api.PropertyMetaData;
 import org.apache.felix.dm.annotation.api.Service;
 
 /**
  * An English Dictionary Service. We provide here our Properties MetaData in order to let webconsole configure us.
  * You must configure the PID that corresponds to this class through web console in order to activate this service.
  */
-@Service(properties={@Param(name="language", value="en")})
-@Properties(
-    heading="English Dictionary", 
-    description = "Configuration for the EnglishDictionary Service",
-    properties={
-        @Property(
-            heading="English Words",
-            description="Declare here some valid english words",
-            defaults={"hello", "world"},
-            id=EnglishDictionary.WORDS,
-            cardinality=Integer.MAX_VALUE
-        )
-    }
-)
+@Service(properties={@Property(name="language", value="en")})
 public class EnglishDictionary implements DictionaryService
 {
     /**
@@ -63,7 +49,18 @@
      * (by default, our PID is our full class name).
      * @param config The configuration where we'll lookup our words list (key="words").
      */
-    @ConfigurationDependency
+    @ConfigurationDependency(
+        heading="English Dictionary", 
+        description = "Configuration for the EnglishDictionary Service",
+        properties={
+            @PropertyMetaData(
+                heading="English Words",
+                description="Declare here some valid english words",
+                defaults={"hello", "world"},
+                id=EnglishDictionary.WORDS,
+                cardinality=Integer.MAX_VALUE)
+        }
+    )
     protected void updated(Dictionary<String, ?> config) {
         m_words.clear();
         String[] words = (String[]) config.get(WORDS);
diff --git a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProvider.java b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProvider.java
index 31c72d0..1651e83 100644
--- a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProvider.java
+++ b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProvider.java
@@ -18,12 +18,12 @@
  */
 package org.apache.felix.dm.test.bundle.annotation.adapter;
 
-import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Property;
 import org.apache.felix.dm.annotation.api.Service;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.test.bundle.annotation.sequencer.Sequencer;
 
-@Service(properties = { @Param(name = "param1", value = "value1") })
+@Service(properties = { @Property(name = "param1", value = "value1") })
 public class ServiceProvider implements ServiceInterface
 {
     @ServiceDependency
diff --git a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProviderAdapter.java b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProviderAdapter.java
index 3bca23f..e99fa22 100644
--- a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProviderAdapter.java
+++ b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/adapter/ServiceProviderAdapter.java
@@ -19,11 +19,11 @@
 package org.apache.felix.dm.test.bundle.annotation.adapter;
 
 import org.apache.felix.dm.annotation.api.AdapterService;
-import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Property;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.test.bundle.annotation.sequencer.Sequencer;
 
-@AdapterService(adapteeService = ServiceInterface.class, adapterProperties={@Param(name="param2", value="value2")})
+@AdapterService(adapteeService = ServiceInterface.class, adapterProperties={@Property(name="param2", value="value2")})
 public class ServiceProviderAdapter implements ServiceInterface3
 {
     // This is the adapted service
diff --git a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/bundledependency/ServiceProvider.java b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/bundledependency/ServiceProvider.java
index f1550f1..6c20e9a 100644
--- a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/bundledependency/ServiceProvider.java
+++ b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/bundledependency/ServiceProvider.java
@@ -19,7 +19,7 @@
 package org.apache.felix.dm.test.bundle.annotation.bundledependency;
 
 import org.apache.felix.dm.annotation.api.BundleAdapterService;
-import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Property;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.annotation.api.Start;
 import org.apache.felix.dm.test.bundle.annotation.sequencer.Sequencer;
@@ -32,7 +32,7 @@
     filter = "(Bundle-SymbolicName=org.apache.felix.dependencymanager)",
     stateMask = Bundle.INSTALLED | Bundle.RESOLVED | Bundle.ACTIVE,
     propagate = true,
-    properties = { @Param(name = "foo", value = "bar") })
+    properties = { @Property(name = "foo", value = "bar") })
 public class ServiceProvider implements ServiceInterface
 {
     // Adapted bundle (injected by reflection).
diff --git a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/multiple/ServiceProvider.java b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/multiple/ServiceProvider.java
index ce4d92f..419caf7 100644
--- a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/multiple/ServiceProvider.java
+++ b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/multiple/ServiceProvider.java
@@ -18,14 +18,14 @@
  */
 package org.apache.felix.dm.test.bundle.annotation.multiple;
 
-import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Property;
 import org.apache.felix.dm.annotation.api.Service;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.annotation.api.Start;
 import org.apache.felix.dm.annotation.api.Stop;
 import org.apache.felix.dm.test.bundle.annotation.sequencer.Sequencer;
 
-@Service(properties = { @Param(name = "foo", value = "bar") }, factory = Factory.class, factoryMethod = "createServiceProvider")
+@Service(properties = { @Property(name = "foo", value = "bar") }, factory = Factory.class, factoryMethod = "createServiceProvider")
 public class ServiceProvider implements ServiceInterface
 {
     @ServiceDependency
diff --git a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/resource/ServiceProvider.java b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/resource/ServiceProvider.java
index 465a429..4939414 100644
--- a/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/resource/ServiceProvider.java
+++ b/dependencymanager/test/src/main/java/org/apache/felix/dm/test/bundle/annotation/resource/ServiceProvider.java
@@ -20,7 +20,7 @@
 
 import junit.framework.Assert;
 
-import org.apache.felix.dm.annotation.api.Param;
+import org.apache.felix.dm.annotation.api.Property;
 import org.apache.felix.dm.annotation.api.ResourceAdapterService;
 import org.apache.felix.dm.annotation.api.ServiceDependency;
 import org.apache.felix.dm.resources.Resource;
@@ -28,7 +28,7 @@
 
 @ResourceAdapterService(
     filter = "(&(path=/test)(name=test1.txt)(repository=TestRepository))", 
-    properties = {@Param(name="foo", value="bar")},
+    properties = {@Property(name="foo", value="bar")},
     propagate = true)
 public class ServiceProvider implements ServiceInterface
 {