FELIX-4689: Create a more fluent syntax for the dependency manager builder.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1727869 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Configurator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Configurator.java
new file mode 100644
index 0000000..544c7cb
--- /dev/null
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Configurator.java
@@ -0,0 +1,20 @@
+package org.apache.felix.dm.lambda.samples.hello;
+
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+
+public class Configurator {
+ volatile ConfigurationAdmin m_cm; // injected by reflection.
+
+ void start() throws IOException {
+ // Configure the ServiceConsumer component
+ Configuration c = m_cm.getConfiguration(ServiceConsumer.class.getName(), null);
+ Dictionary<String, Object> props = new Hashtable<>();
+ props.put("foo", "bar");
+ c.update(props);
+ }
+}