felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1724517 [1/2] - in /felix/sandbox/pderop/dependencymanager-lambda: ./ org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/depe...
Date Wed, 13 Jan 2016 22:20:12 GMT
Author: pderop
Date: Wed Jan 13 22:20:11 2016
New Revision: 1724517

URL: http://svn.apache.org/viewvc?rev=1724517&view=rev
Log:
Added factory methods in DependencyActivatorBase in order to create builders, and simplified tests.
Added more "provides" method in ComponentBuilder.

Added:
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/Cb.java
Removed:
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/CB.java
Modified:
    felix/sandbox/pderop/dependencymanager-lambda/TODO
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AbstractServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterAndConsumerTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterNoAutoConfigIfInstanceCallbackIsUsed.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithCallbackInstanceTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithExtraDependenciesTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithInstanceBoundDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithModifiedInstanceBoundDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithPropagationTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithoutPropagationTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectBaseTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectChainTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectDynamicsTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyWithSwapCallbackTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWhiteboardTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithCallbacksServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithPropagationTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/BundleDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ComponentTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ModifiedBundleDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyThroughCallbackInstanceTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceUpdateTest.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/compositefactory/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/device/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/factory/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/future/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/hello/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/rx/completable/Activator.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/ComponentBuilder.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/ComponentBuilderBase.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/DependencyActivatorBase.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/ServiceCallbacksBuilder.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/impl/AdapterBase.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/impl/ComponentBuilderImpl.java
    felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/builder/lambda/impl/ServiceCallbacksBuilderImpl.java

Modified: felix/sandbox/pderop/dependencymanager-lambda/TODO
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/TODO?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/TODO (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/TODO Wed Jan 13 22:20:11 2016
@@ -1,68 +1,15 @@
-- Check if method reference method signatures are consistent for refective method signature.
-
 - in ServiceDependencyBuilder:
+
   * add support for method references in the "propagateTo" method
-  * add a withService method that takes a string (class name), instead of a Class object.
+  * add a withService method that takes a string (class name)
 
 - Finish to adapt all DependencyManager integration tests
 
-- Add BundeAdapter component
-
-- Add support for BundleAdapter
-
-- simplify completablefuture examples ("WordCount" demo).
+- add BundeAdapter
 
 - Javadocs
 
+- rework callbacks for ComponentBuilder, ConfigurationDependencyBuilder, BundleDepnendencyBuilder
 
 
-    cb(String add)
-    cb(String add, String remove)
-    cb(String add, String change, String remove)
-    cb(String add, String change, String remove, String swap)
-  
-    enum CbType { ADD, CHG, REM}
-    
-*   B cb(CbType cbType, CbTypeService<T, S> add);
-    B cb(CbType cbType, CbTypeServiceMap<T, S> add);
-    B cb(CbType cbType, CbTypeServiceDict<T, S> add);
-    B cb(CbType cbType, CbTypeRef<T, S> add);
-    B cb(CbType cbType, CbTypeRefService<T, S> add);
-    B cb(CbType cbType, CbTypeComponentService<T, S> add);
-    B cb(CbType cbType, CbTypeComponentServiceMap<T, S> add);
-    B cb(CbType cbType, CbTypeComponentServiceDict<T, S> add);
-    B cb(CbType cbType, CbTypeComponentRef<T, S> add);
-    B cb(CbType cbType, CbTypeComponentRefService<T, S> add);
-
-    B cb(CbType cbType, CbService<S> add);
-    B cb(CbType cbType, CbServiceMap<S> add);
-    B cb(CbType cbType, CbServiceDict<S> add);
-    B cb(CbType cbType, CbRef<S> add);
-    B cb(CbType cbType, CbRefService<S> add);
-*   B cb(CbType cbType, CbComponentService<S> add);  
-    B cb(CbType cbType, CbComponentServiceMap<S> add);
-    B cb(CbType cbType, CbComponentServiceDict<S> add);
-    B cb(CbType cbType, CbComponentRef<S> add);
-    B cb(CbType cbType, CbComponentRefService<S> add);
-
-    B swap(CbTypeServiceService<T, S> swap);
-    B swap(CbTypeRefServiceRefService<T, S> swap);
-    B swap(CbTypeMapServiceMapService<T, S> swap);
-    B swap(CbTypeDictServiceDictService<T, S> swap);
-    B swap(CbTypeComponentServiceService<T, S> swap);
-    B swap(CbTypeComponentRefServiceRefService<T, S> swap);
-    B swap(CbTypeComponentMapServiceMapService<T, S> swap);
-    B swap(CbTypeComponentDictServiceDictService<T, S> swap);
-    B swap(CbServiceService<S> swap);
-    B swap(CbRefServiceRefService<S> swap);
-    B swap(CbMapServiceMapService<S> swap);
-    B swap(CbDictServiceDictService<S> swap);
-    B swap(CbComponentServiceService<S> swap);
-    B swap(CbComponentRefServiceRefService<S> swap);
-    B swap(CbComponentMapServiceMapService<S> swap);
-    B swap(CbComponentDictServiceDictService<S> swap);
-    
-    withServices(s -> s.cb(ADD, inst::bind)).cb(CHG, inst::change).cb(REM, inst::remove)
-	
-    withServices(s -> s.add().cb(inst::bind)).chg().cb(inst::change).rm().cbinst::remove)
 

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AbstractServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AbstractServiceDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AbstractServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AbstractServiceDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import org.apache.felix.dm.Component;
@@ -35,12 +35,14 @@ public class AbstractServiceDependencyTe
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
-       Component sp = component(m, comp -> comp
-           .autoAdd(false).provides(ServiceAbstract.class).impl(new ServiceProvider(e)));
        
-       Component sc = component(m, comp -> comp
-           .autoAdd(false).impl(new ServiceConsumer(e))
-           .withService(ServiceAbstract.class, srv -> srv.cb(ADD, ServiceConsumer::bind).cb(REM, ServiceConsumer::unbind)));
+       Component sp = component(m)
+           .provides(ServiceAbstract.class).impl(new ServiceProvider(e)).build();
+
+       Component sc = component(m)
+           .impl(new ServiceConsumer(e)).withService(ServiceAbstract.class, srv -> srv.cb(ADD, ServiceConsumer::bind).cb(REM, ServiceConsumer::unbind))
+           .build();
+           
        m.add(sp);
        m.add(sc);
        m.remove(sp);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterAndConsumerTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterAndConsumerTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterAndConsumerTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterAndConsumerTest.java Wed Jan 13 22:20:11 2016
@@ -34,9 +34,9 @@ public class AdapterAndConsumerTest exte
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
 
-        Component provider = component(m, comp-> comp.autoAdd(false).provides(OriginalService.class).impl(new ServiceProvider(e)));
-        Component consumer = component(m, comp-> comp.autoAdd(false).impl(new ServiceConsumer(e)).withService(AdaptedService.class));
-        Component adapter = adapter(m, OriginalService.class, a -> a.provides(AdaptedService.class).impl(ServiceAdapter.class));
+        Component provider = component(m).provides(OriginalService.class).impl(new ServiceProvider(e)). build();
+        Component consumer = component(m).impl(new ServiceConsumer(e)).withService(AdaptedService.class).build();
+        Component adapter = adapter(m, OriginalService.class).provides(AdaptedService.class).impl(ServiceAdapter.class).build();
         		        
         // add the provider and the adapter
         m.add(provider);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterNoAutoConfigIfInstanceCallbackIsUsed.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterNoAutoConfigIfInstanceCallbackIsUsed.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterNoAutoConfigIfInstanceCallbackIsUsed.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterNoAutoConfigIfInstanceCallbackIsUsed.java Wed Jan 13 22:20:11 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.adapter;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithCallbackInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithCallbackInstanceTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithCallbackInstanceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithCallbackInstanceTest.java Wed Jan 13 22:20:11 2016
@@ -18,9 +18,9 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.CHG;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.CHG;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.adapter;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -43,14 +43,13 @@ public class AdapterWithCallbackInstance
         Ensure e = new Ensure();
 
         ServiceProvider serviceProvider = new ServiceProvider(e);
-        Component provider = component(m, comp -> comp.autoAdd(false).provides(OriginalService.class).impl(serviceProvider));
-        Component consumer = component(m, comp -> comp.autoAdd(false).impl(new ServiceConsumer(e)).withService(AdaptedService.class));
+        Component provider = component(m).provides(OriginalService.class).impl(serviceProvider).build();
+        Component consumer = component(m).impl(new ServiceConsumer(e)).withService(AdaptedService.class).build();
         
         ServiceAdapterCallbackInstance callbackInstance = new ServiceAdapterCallbackInstance(e);
-        Component adapter = adapter(m, OriginalService.class, adp -> adp
-            .provides(AdaptedService.class).impl(new ServiceAdapter(e))
-            .autoAdd(false).autoConfig("m_originalService").propagate(true)
-            .cb("set", "changed", "unset").cbInst(callbackInstance));
+        Component adapter = adapter(m, OriginalService.class)
+            .provides(AdaptedService.class).impl(new ServiceAdapter(e)).autoConfig("m_originalService").propagate(true).cb("set", "changed", "unset").cbInst(callbackInstance)
+            .build();
        
         // add the provider and the adapter
         m.add(provider);
@@ -83,9 +82,8 @@ public class AdapterWithCallbackInstance
         Ensure e = new Ensure();
 
         ServiceProvider serviceProvider = new ServiceProvider(e);
-        Component provider = component(m, comp -> comp.autoAdd(false).provides(OriginalService.class).impl(serviceProvider));
-        
-        Component consumer = component(m, comp -> comp.autoAdd(false).impl(new ServiceConsumer(e)).withService(AdaptedService.class));
+        Component provider = component(m).provides(OriginalService.class).impl(serviceProvider).build();
+        Component consumer = component(m).impl(new ServiceConsumer(e)).withService(AdaptedService.class).build();
         
         ServiceAdapterCallbackInstance callbackInstance = new ServiceAdapterCallbackInstance(e);
         Component adapter = adapter(m, OriginalService.class, adp -> adp

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithExtraDependenciesTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithExtraDependenciesTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithExtraDependenciesTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithExtraDependenciesTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.adapter;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -38,19 +38,19 @@ public class AdapterWithExtraDependencie
         Ensure e = new Ensure();
         
         // create a service adapter that adapts to services S1 and has an optional dependency on services S2
-        Component sa = adapter(m, S1.class, a -> a.autoAdd(false).impl(SA.class).withService(S2.class, s2 -> s2.cb("add", "remove")));
+        Component sa = adapter(m, S1.class).impl(SA.class).withService(S2.class, s2 -> s2.cb("add", "remove")).build();
         m.add(sa);
         
         // create a service S1, which triggers the creation of the first adapter instance (A1)
-        Component s1 = component(m, c -> c.autoAdd(false).provides(S1.class).impl(new S1Impl()));
+        Component s1 = component(m).provides(S1.class).impl(new S1Impl()).build();
         m.add(s1);
         
         // create a service S2, which will be added to A1
-        Component s2 = component(m, c -> c.autoAdd(false).provides(S2.class).impl(new S2Impl(e)));
+        Component s2 = component(m).provides(S2.class).impl(new S2Impl(e)).build();
         m.add(s2);
         
         // create a second service S1, which triggers the creation of the second adapter instance (A2)
-        Component s1b = component(m, c -> c.autoAdd(false).provides(S1.class).impl(new S1Impl()));
+        Component s1b = component(m).provides(S1.class).impl(new S1Impl()).build();
         m.add(s1b);
         
         // observe that S2 is also added to A2
@@ -73,19 +73,19 @@ public class AdapterWithExtraDependencie
         Ensure e = new Ensure();
         
         // create a service adapter that adapts to services S1 and has an optional dependency on services S2
-        Component sa = adapter(m, S1.class, a -> a.autoAdd(false).impl(SA.class).withService(S2.class, s2 -> s2.cb(ADD, SA::add).cb(REM, SA::remove)));
+        Component sa = adapter(m, S1.class).impl(SA.class).withService(S2.class, s2 -> s2.cb(ADD, SA::add).cb(REM, SA::remove)).build();
         m.add(sa);
         
         // create a service S1, which triggers the creation of the first adapter instance (A1)
-        Component s1 = component(m, c -> c.autoAdd(false).provides(S1.class).impl(new S1Impl()));
+        Component s1 = component(m).provides(S1.class).impl(new S1Impl()).build();
         m.add(s1);
         
         // create a service S2, which will be added to A1
-        Component s2 = component(m, c -> c.autoAdd(false).provides(S2.class).impl(new S2Impl(e)));
+        Component s2 = component(m).provides(S2.class).impl(new S2Impl(e)).build();
         m.add(s2);
         
         // create a second service S1, which triggers the creation of the second adapter instance (A2)
-        Component s1b = component(m, c -> c.autoAdd(false).provides(S1.class).impl(new S1Impl()));
+        Component s1b = component(m).provides(S1.class).impl(new S1Impl()).build();
         m.add(s1b);
         
         // observe that S2 is also added to A2

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithInstanceBoundDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithInstanceBoundDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithInstanceBoundDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithInstanceBoundDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -36,10 +36,10 @@ public class AdapterWithInstanceBoundDep
         Ensure e = new Ensure();
         // create a service provider and consumer
         
-        Component sp = component(m, c->c.provides(ServiceInterface.class).impl(new ServiceProvider(e)).autoAdd(false));
-        Component sp2 = component(m, c->c.provides(ServiceInterface2.class).impl(new ServiceProvider2(e)).autoAdd(false));
-        Component sc = component(m, c->c.impl(new ServiceConsumer(e)).autoAdd(false).withService(ServiceInterface3.class));
-        Component sa = adapter(m, ServiceInterface.class, a->a.autoAdd(false).provides(ServiceInterface3.class).impl(new ServiceAdapter(e)));
+        Component sp = component(m).provides(ServiceInterface.class).impl(new ServiceProvider(e)).build();
+        Component sp2 = component(m).provides(ServiceInterface2.class).impl(new ServiceProvider2(e)).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).autoAdd(false).withService(ServiceInterface3.class).build();
+        Component sa = adapter(m, ServiceInterface.class).provides(ServiceInterface3.class).impl(new ServiceAdapter(e)).build();
         m.add(sc);
         m.add(sp);
         m.add(sp2);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithModifiedInstanceBoundDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithModifiedInstanceBoundDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithModifiedInstanceBoundDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithModifiedInstanceBoundDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -18,9 +18,9 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.CHG;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.CHG;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.adapter;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -118,9 +118,9 @@ public class AdapterWithModifiedInstance
         DependencyManager m = getDM();
         Ensure e = new Ensure();
 
-        Component a = component(m, c -> c.autoAdd(false).impl(new AImpl(e)).provides(A.class).properties(foo -> "bar"));
-        Component b = adapter(m, A.class, builder -> builder.autoAdd(false).cb("addA", "changeA", "removeA").provides(B.class).impl(new BImpl(e)));
-        Component c = component(m, comp -> comp.autoAdd(false).impl(new CImpl()).provides(C.class).withService(A.class, s -> s.filter("(foo=bar)")));
+        Component a = component(m).impl(new AImpl(e)).provides(A.class).properties(foo -> "bar").build();
+        Component b = adapter(m, A.class).cb("addA", "changeA", "removeA").provides(B.class).impl(new BImpl(e)).build();
+        Component c = component(m).impl(new CImpl()).provides(C.class).withService(A.class, s -> s.filter("(foo=bar)")).build();
                       
         m.add(a);
         m.add(c);
@@ -146,14 +146,13 @@ public class AdapterWithModifiedInstance
         DependencyManager m = getDM();
         Ensure e = new Ensure();
 
-        Component a = component(m, c -> c.autoAdd(false).impl(new AImpl(e)).provides(A.class).properties(foo -> "bar"));
+        Component a = component(m).impl(new AImpl(e)).provides(A.class).properties(foo -> "bar").build();
         
-        Component b = adapter(m, A.class, builder -> builder
-            .autoAdd(false).impl(new BImpl(e)).provides(B.class)
-            .cb(ADD, BImpl::addA).cb(CHG, BImpl::changeA).cb(REM, BImpl::removeA));
+        Component b = adapter(m, A.class)
+            .impl(new BImpl(e)).provides(B.class).cb(ADD, BImpl::addA).cb(CHG, BImpl::changeA).cb(REM, BImpl::removeA)
+            .build();
         
-        Component c = component(m, comp -> comp
-            .autoAdd(false).impl(new CImpl()).provides(C.class).withService(A.class, s -> s.filter("(foo=bar)")));
+        Component c = component(m).impl(new CImpl()).provides(C.class).withService(A.class, s -> s.filter("(foo=bar)")).build();
                       
         m.add(a);
         m.add(c);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithPropagationTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithPropagationTest.java Wed Jan 13 22:20:11 2016
@@ -101,14 +101,9 @@ public class AdapterWithPropagationTest
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure(); 
         
-        Component s1 = component(m, 
-            c -> c.autoAdd(false).impl(new S1Impl(e)).provides(S1.class).properties(p1 -> "v1", p2 -> "v2overriden"));
-        
-        Component s1Adapter = adapter(m, S1.class, 
-            a->a.autoAdd(false).cb("add", "change", null).impl(new S1Adapter(e)).provides(S2.class).properties(p2 -> "v2"));       
-        
-        Component s3 = component(m, 
-            c -> c.autoAdd(false).impl(new S3(e)).withService(S2.class, s -> s.cb("add", "change", null)));
+        Component s1 = component(m).impl(new S1Impl(e)).provides(S1.class).properties(p1 -> "v1", p2 -> "v2overriden").build();
+        Component s1Adapter = adapter(m, S1.class).cb("add", "change", null).impl(new S1Adapter(e)).provides(S2.class).properties(p2 -> "v2").build();   
+        Component s3 = component(m).impl(new S3(e)).withService(S2.class, s -> s.cb("add", "change", null)).build();
                                           
         m.add(s1);
         m.add(s1Adapter);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithoutPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithoutPropagationTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithoutPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AdapterWithoutPropagationTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.CHG;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.CHG;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.adapter;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -43,16 +43,15 @@ public class AdapterWithoutPropagationTe
 
         // The provider has a "foo=bar" property
         ServiceProvider serviceProvider = new ServiceProvider(e);
-        Component provider = component(m, 
-            c -> c.autoAdd(false).provides(OriginalService.class).properties(foo -> "bar").impl(serviceProvider));
+        Component provider = component(m).provides(OriginalService.class).properties(foo -> "bar").impl(serviceProvider).build();
 
         // The Adapter will see the "foo=bar" property from the adaptee
-        Component adapter = adapter(m, OriginalService.class, 
-            a -> a.autoAdd(false).propagate(false).cb("set", "change", null).provides(AdaptedService.class).impl(new ServiceAdapter(e)));
+        Component adapter = adapter(m, OriginalService.class)
+            .propagate(false).cb("set", "change", null).provides(AdaptedService.class).impl(new ServiceAdapter(e)).build();
 
         // The consumer depends on the AdaptedService, but won't see foo=bar property from the adaptee 
-        Component consumer = component(m, 
-            c -> c.autoAdd(false).impl(new ServiceConsumer(e)).withService(AdaptedService.class, b -> b.cb("set", "change", null)));
+        Component consumer = component(m) 
+            .impl(new ServiceConsumer(e)).withService(AdaptedService.class, b -> b.cb("set", "change", null)).build();
         
         // add the provider and the adapter
         m.add(provider);
@@ -79,19 +78,16 @@ public class AdapterWithoutPropagationTe
 
         // The provider has a "foo=bar" property
         ServiceProvider serviceProvider = new ServiceProvider(e);
-        Component provider = component(m, c -> c
-            .autoAdd(false).provides(OriginalService.class).properties(foo -> "bar").impl(serviceProvider));
+        Component provider = component(m).provides(OriginalService.class).properties(foo -> "bar").impl(serviceProvider).build();
 
         // The Adapter will see the "foo=bar" property from the adaptee
         ServiceAdapter saimpl = new ServiceAdapter(e);
-        Component adapter = adapter(m, OriginalService.class, a -> a
-            .autoAdd(false).propagate(false).impl(saimpl)
-            .cbi(ADD, saimpl::set).cbi(CHG, saimpl::change).provides(AdaptedService.class));
+        Component adapter = adapter(m, OriginalService.class)
+            .propagate(false).impl(saimpl).cbi(ADD, saimpl::set).cbi(CHG, saimpl::change).provides(AdaptedService.class).build();
 
         // The consumer depends on the AdaptedService, but won't see foo=bar property from the adaptee 
         ServiceConsumer scimpl = new ServiceConsumer(e);
-        Component consumer = component(m, c -> c
-            .autoAdd(false).impl(scimpl).withService(AdaptedService.class, s -> s.cbi(ADD, scimpl::set).cbi(CHG, scimpl::change)));
+        Component consumer = component(m).impl(scimpl).withService(AdaptedService.class, s -> s.cbi(ADD, scimpl::set).cbi(CHG, scimpl::change)).build();
         
         // add the provider and the adapter
         m.add(provider);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectBaseTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectBaseTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectBaseTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectBaseTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -46,13 +46,9 @@ public class AspectBaseTest extends Test
         ServiceProvider p = new ServiceProvider(e, "a");
         ServiceConsumer c = new ServiceConsumer(e);
         
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(p).provides(ServiceInterface.class).properties(name -> "a"));
-        
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove").autoConfig("m_service")));
-        
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp.autoAdd(false).rank(20).impl(ServiceAspect.class));
+        Component sp = component(m).impl(p).provides(ServiceInterface.class).properties(name -> "a").build();
+        Component sc = component(m).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove").autoConfig("m_service")).build();
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
             
         m.add(sc);
         m.add(sp);
@@ -85,13 +81,10 @@ public class AspectBaseTest extends Test
         ServiceProvider p = new ServiceProvider(e, "a");
         ServiceConsumer c = new ServiceConsumer(e);
         
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(p).provides(ServiceInterface.class).properties(name -> "a"));
-        
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove).autoConfig("m_service")));
-        
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp.autoAdd(false).rank(20).impl(ServiceAspect.class));
+        Component sp = component(m).impl(p).provides(ServiceInterface.class).properties(name -> "a").build();        
+        Component sc = component(m)
+            .impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove).autoConfig("m_service")).build();
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
         
         m.add(sc);
         m.add(sp);
@@ -124,14 +117,9 @@ public class AspectBaseTest extends Test
         // create a service provider and consumer
         ServiceProvider p = new ServiceProvider(e, "a");
         ServiceConsumer c = new ServiceConsumer(e);
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(p).provides(ServiceInterface.class).properties(name -> "a"));
-            
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove").autoConfig("m_service")));
-        
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp
-            .autoAdd(false).rank(20).impl(ServiceAspect.class));
+        Component sp = component(m).impl(p).provides(ServiceInterface.class).properties(name -> "a").build();            
+        Component sc = component(m).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove").autoConfig("m_service")).build();
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
 
         // we first add the aspect
         m.add(sa);
@@ -171,14 +159,9 @@ public class AspectBaseTest extends Test
         ServiceProvider p = new ServiceProvider(e, "a");
         ServiceConsumer c = new ServiceConsumer(e);
         
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(p).provides(ServiceInterface.class).properties(name -> "a"));
-            
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove).autoConfig("m_service")));
-        
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp
-            .autoAdd(false).rank(20).impl(ServiceAspect.class));
+        Component sp = component(m).impl(p).provides(ServiceInterface.class).properties(name -> "a").build();
+        Component sc = component(m).impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove).autoConfig("m_service")).build();
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
 
         // we first add the aspect
         m.add(sa);
@@ -216,15 +199,12 @@ public class AspectBaseTest extends Test
         
         // create service providers and consumers
         ServiceConsumer c = new ServiceConsumer(e);
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(new ServiceProvider(e, "a")).provides(ServiceInterface.class).properties(name -> "a"));
-        Component sp2 = component(m, comp -> comp
-            .autoAdd(false).impl(new ServiceProvider(e, "b")).provides(ServiceInterface.class).properties(name -> "b"));
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove")));
+        Component sp = component(m).impl(new ServiceProvider(e, "a")).provides(ServiceInterface.class).properties(name -> "a").build();
+        Component sp2 = component(m).impl(new ServiceProvider(e, "b")).provides(ServiceInterface.class).properties(name -> "b").build();
+        Component sc = component(m).impl(c).withService(ServiceInterface.class, srv -> srv.cb("add", "remove")).build();
 
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp.rank(20).impl(ServiceAspect.class));
-        Component sa2 = aspect(m, ServiceInterface.class, asp -> asp.rank(10).impl(ServiceAspect.class));
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
+        Component sa2 = aspect(m, ServiceInterface.class).rank(10).impl(ServiceAspect.class).build();
 
         m.add(sp);
         m.add(sp2);
@@ -261,15 +241,12 @@ public class AspectBaseTest extends Test
         
         // create service providers and consumers
         ServiceConsumer c = new ServiceConsumer(e);
-        Component sp = component(m, comp -> comp
-            .autoAdd(false).impl(new ServiceProvider(e, "a")).provides(ServiceInterface.class).properties(name -> "a"));
-        Component sp2 = component(m, comp -> comp
-            .autoAdd(false).impl(new ServiceProvider(e, "b")).provides(ServiceInterface.class).properties(name -> "b"));
-        Component sc = component(m, comp -> comp
-            .autoAdd(false).impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove)));
+        Component sp = component(m).impl(new ServiceProvider(e, "a")).provides(ServiceInterface.class).properties(name -> "a").build();
+        Component sp2 = component(m).impl(new ServiceProvider(e, "b")).provides(ServiceInterface.class).properties(name -> "b").build();
+        Component sc = component(m).impl(c).withService(ServiceInterface.class, srv -> srv.cbi(ADD, c::add).cbi(REM, c::remove)).build();
 
-        Component sa = aspect(m, ServiceInterface.class, asp -> asp.rank(20).impl(ServiceAspect.class));
-        Component sa2 = aspect(m, ServiceInterface.class, asp -> asp.rank(10).impl(ServiceAspect.class));
+        Component sa = aspect(m, ServiceInterface.class).rank(20).impl(ServiceAspect.class).build();
+        Component sa2 = aspect(m, ServiceInterface.class).rank(10).impl(ServiceAspect.class).build();
 
         m.add(sp);
         m.add(sp2);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectChainTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectChainTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectChainTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectChainTest.java Wed Jan 13 22:20:11 2016
@@ -34,11 +34,11 @@ public class AspectChainTest extends Tes
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c -> c.impl(new ServiceProvider(e)).provides(ServiceInterface.class));
-        Component sc = component(m, c -> c.impl(new ServiceConsumer(e)).withService(ServiceInterface.class));
-        Component sa2 = aspect(m, ServiceInterface.class, a -> a.rank(20).impl(new ServiceAspect(e, 3)));
-        Component sa3 = aspect(m, ServiceInterface.class, a -> a.rank(30).impl(new ServiceAspect(e, 2)));
-        Component sa1 = aspect(m, ServiceInterface.class, a -> a.rank(10).impl(new ServiceAspect(e, 4)));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class).build();
+        Component sa2 = aspect(m, ServiceInterface.class).rank(20).impl(new ServiceAspect(e, 3)).build();
+        Component sa3 = aspect(m, ServiceInterface.class).rank(30).impl(new ServiceAspect(e, 2)).build();
+        Component sa1 = aspect(m, ServiceInterface.class).rank(10).impl(new ServiceAspect(e, 4)).build();
         m.add(sc);
 
         m.add(sp);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectDynamicsTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectDynamicsTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectDynamicsTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectDynamicsTest.java Wed Jan 13 22:20:11 2016
@@ -18,7 +18,7 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -36,10 +36,10 @@ public class AspectDynamicsTest extends
         Ensure e = new Ensure();
         Ensure aspectStopEnsure = new Ensure();
         // create a service provider and consumer
-        Component provider = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component provider2 = component(m, c->c.autoAdd(false).impl(new ServiceProvider2(e)).provides(ServiceInterface2.class.getName()));
-        Component consumer = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", null, null, "swap")));
-        Component aspect = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(1).impl(new ServiceAspect(e, aspectStopEnsure)));
+        Component provider = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component provider2 = component(m).impl(new ServiceProvider2(e)).provides(ServiceInterface2.class.getName()).build();
+        Component consumer = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", null, null, "swap")).build();
+        Component aspect = aspect(m, ServiceInterface.class).autoAdd(false).rank(1).impl(new ServiceAspect(e, aspectStopEnsure)).build();
         
         m.add(consumer);
         m.add(provider);
@@ -93,10 +93,10 @@ public class AspectDynamicsTest extends
         Ensure e = new Ensure();
         Ensure aspectStopEnsure = new Ensure();
         // create a service provider and consumer
-        Component provider = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component provider2 = component(m, c->c.autoAdd(false).impl(new ServiceProvider2(e)).provides(ServiceInterface2.class.getName()));
-        Component consumer = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb(ADD, ServiceConsumer::add).sw(ServiceConsumer::swap)));
-        Component aspect = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(1).impl(new ServiceAspect(e, aspectStopEnsure)));
+        Component provider = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component provider2 = component(m).impl(new ServiceProvider2(e)).provides(ServiceInterface2.class.getName()).build();
+        Component consumer = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb(ADD, ServiceConsumer::add).sw(ServiceConsumer::swap)).build();
+        Component aspect = aspect(m, ServiceInterface.class).autoAdd(false).rank(1).impl(new ServiceAspect(e, aspectStopEnsure)).build();
         
         m.add(consumer);
         m.add(provider);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -34,9 +34,9 @@ public class AspectServiceDependencyTest
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component sc = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")));
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(100).impl(ServiceProviderAspect.class));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")).build();
+        Component asp = aspect(m, ServiceInterface.class).rank(100).impl(ServiceProviderAspect.class).build();
         		
         m.add(sp);
         m.add(sc);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyWithSwapCallbackTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyWithSwapCallbackTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyWithSwapCallbackTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectServiceDependencyWithSwapCallbackTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -36,9 +36,9 @@ public class AspectServiceDependencyWith
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class));
-        Component sc = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", null, "remove", "swap")));
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(100).impl(ServiceProviderAspect.class));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", null, "remove", "swap")).build();
+        Component asp = aspect(m, ServiceInterface.class).rank(100).impl(ServiceProviderAspect.class).build();
         m.add(sp);
         m.add(sc);
         m.add(asp);
@@ -56,9 +56,9 @@ public class AspectServiceDependencyWith
         Ensure e = new Ensure();
         // create a service provider and consumer
         ServiceConsumer scimpl = new ServiceConsumer(e);
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class));
-        Component sc = component(m, c->c.autoAdd(false).impl(scimpl).withService(ServiceInterface.class, s->s.cbi(ADD, scimpl::add).cbi(REM, scimpl::remove).swi(scimpl::swap)));
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(100).impl(ServiceProviderAspect.class));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component sc = component(m).impl(scimpl).withService(ServiceInterface.class, s->s.cbi(ADD, scimpl::add).cbi(REM, scimpl::remove).swi(scimpl::swap)).build();
+        Component asp = aspect(m, ServiceInterface.class).rank(100).impl(ServiceProviderAspect.class).build();
         m.add(sp);
         m.add(sc);
         m.add(asp);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWhiteboardTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWhiteboardTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWhiteboardTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWhiteboardTest.java Wed Jan 13 22:20:11 2016
@@ -17,8 +17,8 @@
  * under the License.
  */
 package org.apache.felix.dm.builder.lambda.itest;
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -42,12 +42,12 @@ public class AspectWhiteboardTest extend
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create service providers and consumer
-        Component sp1 = component(m, s->s.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component sp2 = component(m, s->s.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
+        Component sp1 = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component sp2 = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
         ServiceConsumer sci = new ServiceConsumer(e);
-        Component sc = component(m, s->s.autoAdd(false).impl(sci).withService(ServiceInterface.class, srv->srv.required(false).cb("add", "remove")));
-        Component sa2 = aspect(m, ServiceInterface.class, a->a.rank(20).autoAdd(false).impl(new ServiceAspect(e, 3)));
-        Component sa1 = aspect(m, ServiceInterface.class, a->a.rank(10).autoAdd(false).impl(new ServiceAspect(e, 4)));
+        Component sc = component(m).impl(sci).withService(ServiceInterface.class, srv->srv.required(false).cb("add", "remove")).build();
+        Component sa2 = aspect(m, ServiceInterface.class).rank(20).autoAdd(false).impl(new ServiceAspect(e, 3)).build();
+        Component sa1 = aspect(m, ServiceInterface.class).rank(10).autoAdd(false).impl(new ServiceAspect(e, 4)).build();
         
         // start with a service consumer
         System.out.println("Adding consumer");
@@ -119,12 +119,12 @@ public class AspectWhiteboardTest extend
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create service providers and consumer
-        Component sp1 = component(m, s->s.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component sp2 = component(m, s->s.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
+        Component sp1 = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component sp2 = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
         ServiceConsumer sci = new ServiceConsumer(e);
-        Component sc = component(m, s->s.autoAdd(false).impl(sci).withService(ServiceInterface.class, srv->srv.required(false).cbi(ADD, sci::add).cbi(REM, sci::remove)));
-        Component sa2 = aspect(m, ServiceInterface.class, a->a.rank(20).autoAdd(false).impl(new ServiceAspect(e, 3)));
-        Component sa1 = aspect(m, ServiceInterface.class, a->a.rank(10).autoAdd(false).impl(new ServiceAspect(e, 4)));
+        Component sc = component(m).impl(sci).withService(ServiceInterface.class, srv->srv.required(false).cbi(ADD, sci::add).cbi(REM, sci::remove)).build();
+        Component sa2 = aspect(m, ServiceInterface.class).rank(20).autoAdd(false).impl(new ServiceAspect(e, 3)).build();
+        Component sa1 = aspect(m, ServiceInterface.class).rank(10).autoAdd(false).impl(new ServiceAspect(e, 4)).build();
         
         // start with a service consumer
         System.out.println("Adding consumer");

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithCallbacksServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithCallbacksServiceDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithCallbacksServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithCallbacksServiceDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
@@ -36,9 +36,9 @@ public class AspectWithCallbacksServiceD
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component sc = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")));
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(100).cb("add", null, "remove", "swap").impl(ServiceProviderAspect.class));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")).build();
+        Component asp = aspect(m, ServiceInterface.class).rank(100).cb("add", null, "remove", "swap").impl(ServiceProviderAspect.class).build();
         		
         m.add(sp);
         m.add(sc);
@@ -56,11 +56,9 @@ public class AspectWithCallbacksServiceD
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()));
-        Component sc = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e))
-            .withService(ServiceInterface.class, s->s.cb(ADD, ServiceConsumer::add).cb(REM, ServiceConsumer::remove)));
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).impl(ServiceProviderAspect.class).rank(100)
-            .cb(ADD, ServiceProviderAspect::add).cb(REM, ServiceProviderAspect::remove).sw(ServiceProviderAspect::swap));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class.getName()).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb(ADD, ServiceConsumer::add).cb(REM, ServiceConsumer::remove)).build();            
+        Component asp = aspect(m, ServiceInterface.class).impl(ServiceProviderAspect.class).rank(100).cb(ADD, ServiceProviderAspect::add).cb(REM, ServiceProviderAspect::remove).sw(ServiceProviderAspect::swap).build();
                 
         m.add(sp);
         m.add(sc);
@@ -78,13 +76,13 @@ public class AspectWithCallbacksServiceD
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, c->c.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class));
-        Component sc = component(m, c->c.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class, s->s.cb("add", "remove")).build();
                 
         ServiceProviderAspect providerAspect = new ServiceProviderAspect();
         ServiceProviderAspectCallbackInstance aspectCb = new ServiceProviderAspectCallbackInstance(providerAspect);
-        Component asp = aspect(m, ServiceInterface.class, a->a.autoAdd(false).rank(100).impl(providerAspect)
-            .cbi(ADD, aspectCb::add).cbi(REM,aspectCb::remove).swi(aspectCb::swap));
+        Component asp = aspect(m, ServiceInterface.class).rank(100).impl(providerAspect).cbi(ADD, aspectCb::add).cbi(REM,aspectCb::remove).swi(aspectCb::swap).build();
+            
         m.add(sp);
         m.add(sc);
         m.add(asp);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithPropagationTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithPropagationTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithPropagationTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/AspectWithPropagationTest.java Wed Jan 13 22:20:11 2016
@@ -17,7 +17,7 @@
  * under the License.
  */
 package org.apache.felix.dm.builder.lambda.itest;
-import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.aspect;
+import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.*;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import java.util.Dictionary;
@@ -68,7 +68,7 @@ public class AspectWithPropagationTest e
 			public void invoke() {
 			}
         };
-		Component sComp = component(m, c->c.autoAdd(false).impl(s).provides(S.class).properties(p -> "s"));
+		Component sComp = component(m).impl(s).provides(S.class, p -> "s").build();
 
         // Create SA (aspect of S)
         S sa = new S() {
@@ -76,7 +76,7 @@ public class AspectWithPropagationTest e
 			public void invoke() {
 			}
         };
-        Component saComp = aspect(m, S.class, a->a.autoAdd(false).rank(1).impl(sa).properties(p -> "aspect"));
+        Component saComp = aspect(m, S.class).rank(1).impl(sa).properties(p -> "aspect").build();
                 
         // Create client depending on S
         Object client = new Object() {
@@ -98,7 +98,7 @@ public class AspectWithPropagationTest e
         		}
         	}
         };
-        Component clientComp = component(m, c->c.autoAdd(false).impl(client).withService(S.class, srv->srv.cb("add", "change", null)));
+        Component clientComp = component(m).impl(client).withService(S.class, srv->srv.cb("add", "change", null)).build();
         
         // Add components in dependency manager
         m.add(sComp);
@@ -146,24 +146,16 @@ public class AspectWithPropagationTest e
         // Create our original "S" service.
         Dictionary props = new Hashtable();
         props.put("foo", "bar");
-        Component s = m.createComponent()
-                .setImplementation(new SImpl())
-                .setInterface(S.class.getName(), props);
-        
+        Component s = component(m).impl(new SImpl()).provides(S.class, props).build();
+                
         // Create an aspect aware client, depending on "S" service.
         Client clientImpl;
-        Component client = m.createComponent()
-                .setImplementation((clientImpl = new Client()))
-                .add(m.createServiceDependency()
-                     .setService(S.class)
-                     .setRequired(true)
-                     .setCallbacks("add", "change", "remove", "swap"));
+        Component client = component(m).impl((clientImpl = new Client())).withService(S.class, srv -> srv.cb("add", "change", "remove", "swap")).build();     
 
         // Create some "S" aspects
         Component[] aspects = new Component[ASPECTS];
         for (int rank = 1; rank <= ASPECTS; rank ++) {
-            aspects[rank-1] = m.createAspectService(S.class, null, rank, "add", "change", "remove", "swap")
-                    .setImplementation(new A("A" + rank, rank));
+            aspects[rank-1] = aspect(m, S.class).rank(rank).cb("add", "change", "remove", "swap").impl(new A("A" + rank, rank)).build();
             props = new Hashtable();
             props.put("a" + rank, "v" + rank);
             aspects[rank-1].setServiceProperties(props);
@@ -264,24 +256,16 @@ public class AspectWithPropagationTest e
         // Create our original "S" service.
         Dictionary props = new Hashtable();
         props.put("foo", "bar");
-        Component s = m.createComponent()
-                .setImplementation(new SImpl())
-                .setInterface(S.class.getName(), props);
+        Component s = component(m).impl(new SImpl()).provides(S.class, props).build();
         
         // Create an aspect aware client, depending on "S" service.
         Client clientImpl;
-        Component client = m.createComponent()
-                .setImplementation((clientImpl = new Client()))
-                .add(m.createServiceDependency()
-                     .setService(S.class)
-                     .setRequired(true)
-                     .setCallbacks("add", "change", "remove"));
+        Component client = component(m).impl((clientImpl = new Client())).withService(S.class, srv->srv.cb("add", "change", "remove")).build();            
 
         // Create some "S" aspects
         Component[] aspects = new Component[ASPECTS];
         for (int rank = 1; rank <= ASPECTS; rank ++) {
-            aspects[rank-1] = m.createAspectService(S.class, null, rank)
-                    .setImplementation(new A("A" + rank, rank));
+            aspects[rank-1] = aspect(m, S.class).rank(rank).impl(new A("A" + rank, rank)).build();
             props = new Hashtable();
             props.put("a" + rank, "v" + rank);
             aspects[rank-1].setServiceProperties(props);
@@ -364,33 +348,23 @@ public class AspectWithPropagationTest e
         // Create our original "S" service.
         Dictionary props = new Hashtable();
         props.put("foo", "bar");
-        Component s = m.createComponent()
-                .setImplementation(new SImpl())
-                .setInterface(S.class.getName(), props);
+        Component s = component(m).impl(new SImpl()).provides(S.class, props).build();
         
         // Create some "S" aspects
         Component[] aspects = new Component[ASPECTS];
         for (int rank = 1; rank <= ASPECTS; rank ++) {
-            aspects[rank-1] = m.createAspectService(S.class, null, rank, "add", "change", "remove", "swap")
-                    .setImplementation(new A("A" + rank, rank));
+            aspects[rank-1] = aspect(m, S.class).rank(rank).cb("add", "change", "remove", "swap").impl(new A("A" + rank, rank)).build();
             props = new Hashtable();
             props.put("a" + rank, "v" + rank);
             aspects[rank-1].setServiceProperties(props);
         } 
         
         // Create S2 adapter (which adapts S1 to S2 interface)
-        Component adapter = m.createAdapterService(S.class, null, "add", "change", "remove", "swap")
-                .setInterface(S2.class.getName(), null)
-                .setImplementation(new S2Impl());
+        Component adapter = adapter(m, S.class).cb("add", "change", "remove", "swap").provides(S2.class).impl(new S2Impl()).build();
         
         // Create Client2, which depends on "S2" service.
         Client2 client2Impl;
-        Component client2 = m.createComponent()
-                .setImplementation((client2Impl = new Client2()))
-                .add(m.createServiceDependency()
-                     .setService(S2.class)
-                     .setRequired(true)
-                     .setCallbacks("add", "change", null));
+        Component client2 = component(m).impl((client2Impl = new Client2())).withService(S2.class, srv -> srv.cb("add", "change", null)).build();
               
         // Register client2
         m.add(client2);
@@ -460,33 +434,23 @@ public class AspectWithPropagationTest e
         // Create our original "S" service.
         Dictionary props = new Hashtable();
         props.put("foo", "bar");
-        Component s = m.createComponent()
-                .setImplementation(new SImpl())
-                .setInterface(S.class.getName(), props);
+        Component s = component(m).impl(new SImpl()).provides(S.class, props).build();
         
         // Create some "S" aspects
         Component[] aspects = new Component[ASPECTS];
         for (int rank = 1; rank <= ASPECTS; rank ++) {
-            aspects[rank-1] = m.createAspectService(S.class, null, rank)
-                    .setImplementation(new A("A" + rank, rank));
+            aspects[rank-1] = aspect(m, S.class).rank(rank).impl(new A("A" + rank, rank)).build();
             props = new Hashtable();
             props.put("a" + rank, "v" + rank);
             aspects[rank-1].setServiceProperties(props);
         } 
         
         // Create S2 adapter (which adapts S1 to S2 interface)
-        Component adapter = m.createAdapterService(S.class, null)
-                .setInterface(S2.class.getName(), null)
-                .setImplementation(new S2Impl());
+        Component adapter = adapter(m, S.class).provides(S2.class).impl(new S2Impl()).build();                                
         
         // Create Client2, which depends on "S2" service.
         Client2 client2Impl;
-        Component client2 = m.createComponent()
-                .setImplementation((client2Impl = new Client2()))
-                .add(m.createServiceDependency()
-                     .setService(S2.class)
-                     .setRequired(true)
-                     .setCallbacks("add", "change", null));
+        Component client2 = component(m).impl((client2Impl = new Client2())).withService(S2.class, srv->srv.cb("add", "change", null)).build();
               
         // Register client2
         m.add(client2);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/BundleDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/BundleDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/BundleDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/BundleDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -128,9 +128,8 @@ public class BundleDependencyTest extend
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         FilteredConsumerRequiredWithComponentArg impl = new FilteredConsumerRequiredWithComponentArg(e);
-        Component consumerWithFilter = component(m, c -> c
-        		.autoAdd(false).impl(impl)
-        		.withBundle(b -> b.filter("(Bundle-SymbolicName=" + BSN + ")").cb(impl::add, impl::remove)));
+        Component consumerWithFilter = component(m).impl(impl)
+        		.withBundle(b -> b.filter("(Bundle-SymbolicName=" + BSN + ")").cb(impl::add, impl::remove)).build();
         // add a consumer with a filter
         m.add(consumerWithFilter);
         e.waitForStep(1, 5000);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ComponentTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ComponentTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ComponentTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ComponentTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import java.util.Dictionary;

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ModifiedBundleDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ModifiedBundleDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ModifiedBundleDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ModifiedBundleDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -100,13 +100,11 @@ public class ModifiedBundleDependencyTes
         DependencyManager m = getDM();
         Ensure e = new Ensure();
 
-        Component a = 
-            component(m, comp -> comp.impl(new AImpl()).provides(A.class).autoAdd(false));
+        Component a = component(m).impl(new AImpl()).provides(A.class).build();
         
         String filter = "(Bundle-SymbolicName=org.apache.felix.metatype)";
         int mask = Bundle.INSTALLED|Bundle.ACTIVE|Bundle.RESOLVED|Bundle.STARTING;
-        Component b = component(m, comp -> comp.provides(B.class).impl(new BImpl(e)).autoAdd(false)         	
-            .withBundle(bundle -> bundle.filter(filter).mask(mask).cb("add", "change", "remove")));
+        Component b = component(m).provides(B.class).impl(new BImpl(e))    .withBundle(bundle -> bundle.filter(filter).mask(mask).cb("add", "change", "remove")).build();     	
         						                    
         Bundle dmtest = getBundle("org.apache.felix.metatype");
         try {
@@ -141,8 +139,7 @@ public class ModifiedBundleDependencyTes
         BImpl impl = new BImpl(e);
         String filter = "(Bundle-SymbolicName=org.apache.felix.metatype)";
         int mask = Bundle.INSTALLED|Bundle.ACTIVE|Bundle.RESOLVED|Bundle.STARTING;
-        Component b = component(m, comp -> comp.provides(B.class).impl(impl).autoAdd(false)        	
-            .withBundle(bundle -> bundle.filter(filter).mask(mask).cb(impl::add, impl::change, impl::remove)));        				
+        Component b = component(m).provides(B.class).impl(impl).withBundle(bundle -> bundle.filter(filter).mask(mask).cb(impl::add, impl::change, impl::remove)).build();        	
         
         Bundle dmtest = getBundle("org.apache.felix.metatype");
         try {

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import org.apache.felix.dm.Component;
@@ -34,11 +34,12 @@ public class ServiceDependencyTest exten
         // helper class that ensures certain steps get executed in sequence
         Ensure e = new Ensure();
         // create a service provider and consumer
-        Component sp = component(m, comp -> comp.autoAdd(false).impl(new ServiceProvider(e)).provides(ServiceInterface.class));
-        Component sc = component(m, comp -> comp.autoAdd(false).impl(new ServiceConsumer(e)).withService(ServiceInterface.class));
+        Component sp = component(m).impl(new ServiceProvider(e)).provides(ServiceInterface.class).build();
+        Component sc = component(m).impl(new ServiceConsumer(e)).withService(ServiceInterface.class).build();
         		
-        Component sc2 = component(m, comp -> comp.autoAdd(false).impl(new ServiceConsumerCallbacks(e))
-        		.withService(ServiceInterface.class, srv -> srv.required(false).cb(ADD, ServiceConsumerCallbacks::add).cb(REM, ServiceConsumerCallbacks::remove)));
+        Component sc2 = component(m).impl(new ServiceConsumerCallbacks(e))
+        		.withService(ServiceInterface.class, srv -> srv.required(false).cb(ADD, ServiceConsumerCallbacks::add).cb(REM, ServiceConsumerCallbacks::remove))
+        		.build();
 
         m.add(sp);
         m.add(sc);

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyThroughCallbackInstanceTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyThroughCallbackInstanceTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyThroughCallbackInstanceTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceDependencyThroughCallbackInstanceTest.java Wed Jan 13 22:20:11 2016
@@ -18,8 +18,8 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import org.apache.felix.dm.DependencyManager;

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceUpdateTest.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceUpdateTest.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceUpdateTest.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.itest/src/org/apache/felix/dm/builder/lambda/itest/ServiceUpdateTest.java Wed Jan 13 22:20:11 2016
@@ -18,9 +18,9 @@
  */
 package org.apache.felix.dm.builder.lambda.itest;
 
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
-import static org.apache.felix.dm.builder.lambda.CB.CHG;
-import static org.apache.felix.dm.builder.lambda.CB.REM;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.CHG;
+import static org.apache.felix.dm.builder.lambda.Cb.REM;
 import static org.apache.felix.dm.builder.lambda.DependencyActivatorBase.component;
 
 import java.net.URL;

Modified: felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/compositefactory/Activator.java
URL: http://svn.apache.org/viewvc/felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/compositefactory/Activator.java?rev=1724517&r1=1724516&r2=1724517&view=diff
==============================================================================
--- felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/compositefactory/Activator.java (original)
+++ felix/sandbox/pderop/dependencymanager-lambda/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dependencymanager/lambda/samples/compositefactory/Activator.java Wed Jan 13 22:20:11 2016
@@ -19,7 +19,7 @@
 package org.apache.felix.dependencymanager.lambda.samples.compositefactory;
 
 import static java.lang.System.out;
-import static org.apache.felix.dm.builder.lambda.CB.ADD;
+import static org.apache.felix.dm.builder.lambda.Cb.ADD;
 
 import org.apache.felix.dm.builder.lambda.DependencyActivatorBase;
 import org.osgi.service.cm.ConfigurationAdmin;




Mime
View raw message