felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r887380 - in /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm: DependencyActivatorBase.java DependencyManager.java
Date Fri, 04 Dec 2009 22:08:06 GMT
Author: pderop
Date: Fri Dec  4 22:08:05 2009
New Revision: 887380

URL: http://svn.apache.org/viewvc?rev=887380&view=rev
Log:
moved org.apache.felix.dependencymanager package to org.apache.felix.dm. Reworked API

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyActivatorBase.java
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyActivatorBase.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyActivatorBase.java?rev=887380&r1=887379&r2=887380&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyActivatorBase.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyActivatorBase.java
Fri Dec  4 22:08:05 2009
@@ -16,17 +16,18 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.dependencymanager;
+package org.apache.felix.dm;
 
 import java.util.Dictionary;
 import java.util.List;
 
-import org.apache.felix.dependencymanager.dependencies.BundleDependency;
-import org.apache.felix.dependencymanager.dependencies.ConfigurationDependency;
-import org.apache.felix.dependencymanager.dependencies.ServiceDependency;
-import org.apache.felix.dependencymanager.dependencies.TemporalServiceDependency;
-import org.apache.felix.dependencymanager.impl.Logger;
-import org.apache.felix.dependencymanager.impl.ServiceImpl;
+import org.apache.felix.dm.dependencies.BundleDependency;
+import org.apache.felix.dm.dependencies.ConfigurationDependency;
+import org.apache.felix.dm.dependencies.ServiceDependency;
+import org.apache.felix.dm.dependencies.TemporalServiceDependency;
+import org.apache.felix.dm.impl.Logger;
+import org.apache.felix.dm.impl.ServiceImpl;
+import org.apache.felix.dm.service.Service;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java?rev=887380&r1=887379&r2=887380&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
Fri Dec  4 22:08:05 2009
@@ -16,21 +16,27 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.felix.dependencymanager;
+package org.apache.felix.dm;
 
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Dictionary;
 import java.util.List;
 
-import org.apache.felix.dependencymanager.dependencies.BundleDependency;
-import org.apache.felix.dependencymanager.dependencies.ConfigurationDependency;
-import org.apache.felix.dependencymanager.dependencies.ResourceDependency;
-import org.apache.felix.dependencymanager.dependencies.ServiceDependency;
-import org.apache.felix.dependencymanager.dependencies.TemporalServiceDependency;
-import org.apache.felix.dependencymanager.impl.AspectImpl;
-import org.apache.felix.dependencymanager.impl.Logger;
-import org.apache.felix.dependencymanager.impl.ServiceImpl;
+import org.apache.felix.dm.dependencies.BundleDependency;
+import org.apache.felix.dm.dependencies.ConfigurationDependency;
+import org.apache.felix.dm.dependencies.ResourceDependency;
+import org.apache.felix.dm.dependencies.ServiceDependency;
+import org.apache.felix.dm.dependencies.TemporalServiceDependency;
+import org.apache.felix.dm.impl.AspectImpl;
+import org.apache.felix.dm.impl.Logger;
+import org.apache.felix.dm.impl.ServiceImpl;
+import org.apache.felix.dm.impl.dependencies.BundleDependencyImpl;
+import org.apache.felix.dm.impl.dependencies.ConfigurationDependencyImpl;
+import org.apache.felix.dm.impl.dependencies.ResourceDependencyImpl;
+import org.apache.felix.dm.impl.dependencies.ServiceDependencyImpl;
+import org.apache.felix.dm.impl.dependencies.TemporalServiceDependencyImpl;
+import org.apache.felix.dm.service.Service;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -49,11 +55,21 @@
      * @param context the bundle context
      * @param logger 
      */
+    public DependencyManager(BundleContext context) {
+        this(context, new Logger(context));
+    }
+    
+    /**
+     * Creates a new dependency manager.
+     * 
+     * @param context the bundle context
+     * @param logger 
+     */
     public DependencyManager(BundleContext context, Logger logger) {
         m_context = context;
         m_logger = logger;
     }
-    
+
     /**
      * Adds a new service to the dependency manager. After the service was added
      * it will be started immediately.
@@ -91,7 +107,7 @@
      * @return the service dependency
      */
     public ServiceDependency createServiceDependency() {
-        return new ServiceDependency(m_context, m_logger);
+        return new ServiceDependencyImpl(m_context, m_logger);
     }
     
     /**
@@ -101,7 +117,7 @@
      * @return the service dependency
      */
     public TemporalServiceDependency createTemporalServiceDependency() {
-        return new TemporalServiceDependency(m_context, m_logger);
+        return new TemporalServiceDependencyImpl(m_context, m_logger);
     }
 
     /**
@@ -110,7 +126,7 @@
      * @return
      */
     public ConfigurationDependency createConfigurationDependency() {
-        return new ConfigurationDependency(m_context, m_logger);
+        return new ConfigurationDependencyImpl(m_context, m_logger);
     }
     
     /**
@@ -119,7 +135,7 @@
      * @return
      */
     public BundleDependency createBundleDependency() {
-        return new BundleDependency(m_context, m_logger);
+        return new BundleDependencyImpl(m_context, m_logger);
     }
     
     /**
@@ -128,7 +144,7 @@
      * @return
      */
     public ResourceDependency createResourceDependency() {
-        return new ResourceDependency(m_context, m_logger);
+        return new ResourceDependencyImpl(m_context, m_logger);
     }
 
     /**



Mime
View raw message