Applied feedbacks that Jan Willem sent to me about the new dm-lambda library:
- renamed the DependencyManagerActivator.activate() method to init(BundleContext ctx, DependencyManager dm)
- Removed abbreviated names like "cb()" or "cbi" methods, and replaced them with niced method names like "add()/changed()/removed()" ...
- Added a system property "org.apache.felix.dependencymanager.lambda.dependencymode" that allows to control the default
mode of dependency (still to be discussed).
- added full support or new configuration types.
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1731147 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/lambda/itest/MultipleExtraDependenciesTest.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/lambda/itest/MultipleExtraDependenciesTest.java
index b48d5ee..c6cc634 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/lambda/itest/MultipleExtraDependenciesTest.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/lambda/itest/MultipleExtraDependenciesTest.java
@@ -38,8 +38,8 @@
DependencyManager m = getDM();
// Helper class that ensures certain steps get executed in sequence
Ensure e = new Ensure();
- Component c1 = component(m).provides(Service1.class).impl(new MyComponent1(e)).withSrv(Service2.class, srv->srv.autoConfig("m_service2")).build();
- Component c2 = component(m).impl(new MyComponent2(e)).withSrv(Service1.class, srv->srv.required(false).autoConfig(false).cb("added")).build();
+ Component c1 = component(m).provides(Service1.class).impl(new MyComponent1(e)).withSvc(Service2.class, srv->srv.autoConfig("m_service2")).build();
+ Component c2 = component(m).impl(new MyComponent2(e)).withSvc(Service1.class, srv->srv.required(false).autoConfig(false).add("added")).build();
Component c3 = component(m).provides(Service2.class).impl(Service2Impl.class).build();
Component c4 = component(m).impl(Service3Impl1.class).provides(Service3.class, type -> "xx").build();
Component c5 = component(m).impl(Service3Impl2.class).provides(Service3.class, type -> "yy").build();
@@ -72,8 +72,8 @@
DependencyManager m = getDM();
// Helper class that ensures certain steps get executed in sequence
Ensure e = new Ensure();
- Component c1 = component(m).provides(Service1.class).impl(new MyComponent1(e)).withSrv(Service2.class, srv->srv.autoConfig("m_service2")).build();
- Component c2 = component(m).impl(new MyComponent2(e)).withSrv(Service1.class, srv->srv.required(false).autoConfig(false).cb("added")).build();
+ Component c1 = component(m).provides(Service1.class).impl(new MyComponent1(e)).withSvc(Service2.class, srv->srv.autoConfig("m_service2")).build();
+ Component c2 = component(m).impl(new MyComponent2(e)).withSvc(Service1.class, srv->srv.required(false).autoConfig(false).add("added")).build();
Component c3 = component(m).provides(Service2.class).impl(Service2Impl.class).build();
Component c4 = component(m).impl(Service3Impl1.class).provides(Service3.class, type -> "xx").build();
Component c5 = component(m).impl(Service3Impl2.class).provides(Service3.class, type -> "yy").build();
@@ -121,8 +121,8 @@
// Service3/yy not yet available
component(c, comp -> comp
- .withSrv(Service3.class, srv->srv.filter("(type=xx)").autoConfig("m_service3_xx"))
- .withSrv(Service3.class, srv->srv.filter("(type=yy)").autoConfig("m_service3_yy")));
+ .withSvc(Service3.class, srv->srv.filter("(type=xx)").autoConfig("m_service3_xx"))
+ .withSvc(Service3.class, srv->srv.filter("(type=yy)").autoConfig("m_service3_yy")));
}
void start() {