Renamed DependencyManagerActivator.init() method to DependencyManagerActivator.activate().


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1728312 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
index 6dbf187..2aab3bc 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/compositefactory/Activator.java
@@ -20,9 +20,7 @@
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.log.LogService;
 
@@ -41,7 +39,7 @@
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
     	// Create the Factory used to instantiate ProvuderImpl, ProviderComposite1 and ProviderComposite2
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
index b9a86ae..3ccfd09 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/device/Activator.java
@@ -20,9 +20,7 @@
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -30,7 +28,7 @@
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception { 
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
     	// Create a pair of Device/DeviceParameter service with id=1
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
index 3fc5a4f..9d3bb7a 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/dictionary/Activator.java
@@ -19,20 +19,18 @@
 package org.apache.felix.dm.lambda.samples.dictionary;
 
 import static java.lang.System.out;
-
-import org.apache.felix.dm.DependencyManager;
-import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.log.LogService;
 import static org.apache.felix.service.command.CommandProcessor.COMMAND_FUNCTION;
 import static org.apache.felix.service.command.CommandProcessor.COMMAND_SCOPE;
 
+import org.apache.felix.dm.lambda.DependencyManagerActivator;
+import org.osgi.service.log.LogService;
+
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
         // Create the factory configuration for our DictionaryImpl service. An instance of the DictionaryImpl is created for each
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
index 54bbee3..73a3b64 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/factory/Activator.java
@@ -20,9 +20,7 @@
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -30,7 +28,7 @@
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {   
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
 
         component(comp -> comp
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
index ec580ae..117af23 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/future/Activator.java
@@ -20,9 +20,7 @@
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 
 /**
@@ -40,7 +38,7 @@
      * Initialize our components using new DM-lambda activator base.
      */
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
     	
     	// System.setProperty("http.proxyHost","your.http.proxy.host");
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
index 8da879d..8dfd611 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda.samples/src/org/apache/felix/dm/lambda/samples/hello/Activator.java
@@ -20,9 +20,7 @@
 
 import static java.lang.System.out;
 
-import org.apache.felix.dm.DependencyManager;
 import org.apache.felix.dm.lambda.DependencyManagerActivator;
-import org.osgi.framework.BundleContext;
 import org.osgi.service.cm.ConfigurationAdmin;
 import org.osgi.service.event.EventAdmin;
 import org.osgi.service.log.LogService;
@@ -32,7 +30,7 @@
  */
 public class Activator extends DependencyManagerActivator {
     @Override
-    public void init(BundleContext ctx, DependencyManager dm) throws Exception {
+    public void activate() throws Exception {
     	out.println("type \"log info\" to see the logs emitted by this test.");
     	
     	// Creates a Service Provider (property names are deduced from lambda parameter names).
diff --git a/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java b/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
index 60724c8..aa68f05 100644
--- a/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
+++ b/dependencymanager/org.apache.felix.dependencymanager.lambda/src/org/apache/felix/dm/lambda/DependencyManagerActivator.java
@@ -80,7 +80,7 @@
     @Override
     public void start(BundleContext context) throws Exception {
         m_manager = new DependencyManager(context);
-        init(context, m_manager);
+        activate();
     }
 
     /**
@@ -88,23 +88,21 @@
      */
     @Override
     public void stop(BundleContext context) throws Exception {
-        destroy();
+        deactivate();
     }
 
     /**
      * Sub classes must override this method in order to build some DM components.
      * 
-     * @param ctx the BundleContext associated to the bundle activator.
-     * @param dm the DependencyManager object that can be used to add/remove components.
      * @throws Exception if the activation fails
      */
-    protected abstract void init(BundleContext ctx, DependencyManager dm) throws Exception;
+    protected abstract void activate() throws Exception;
 
     /**
      * Sub classes may override this method that is called when the Activator is stopped.
      * @throws Exception if the deactivation fails
      */
-    protected void destroy() throws Exception {
+    protected void deactivate() throws Exception {
     }
     
     /**
@@ -112,7 +110,7 @@
      * 
      * @return the DependencyManager associated to this Activator
      */
-    protected DependencyManager getDependencyManager() {
+    public DependencyManager getDM() {
         return m_manager;
     }
     
@@ -121,7 +119,7 @@
      * 
      * @return the bundle context
      */
-    protected BundleContext getBundleContext() {
+    public BundleContext getBC() {
         return m_manager.getBundleContext();
     }