felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r889164 - in /felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm: DependencyManager.java dependencies/ResourceDependency.java impl/ResourceAdapterImpl.java
Date Thu, 10 Dec 2009 09:57:11 GMT
Author: marrs
Date: Thu Dec 10 09:57:06 2009
New Revision: 889164

URL: http://svn.apache.org/viewvc?rev=889164&view=rev
Log:
made sure that resource adapters can let their adapters use propagation of properties, if
they want to

Modified:
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/DependencyManager.java
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/dependencies/ResourceDependency.java
    felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java

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=889164&r1=889163&r2=889164&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
Thu Dec 10 09:57:06 2009
@@ -182,9 +182,9 @@
     
     // TODO note to self, there are Dependency's and DependencyCollections 
     // (being a dependency on more than one, fi ServiceDendency, ResourceDependency
-    public Service createResourceAdapterService(String resourceFilter, Class iface2, Object
impl) {
+    public Service createResourceAdapterService(String resourceFilter, Class iface2, Object
impl, boolean propagate) {
         return createService()
-            .setImplementation(new ResourceAdapterImpl(impl, iface2))
+            .setImplementation(new ResourceAdapterImpl(impl, iface2, propagate))
             .add(createResourceDependency()
                 .setFilter(resourceFilter)
                 .setAutoConfig(false)

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/dependencies/ResourceDependency.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/dependencies/ResourceDependency.java?rev=889164&r1=889163&r2=889164&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/dependencies/ResourceDependency.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/dependencies/ResourceDependency.java
Thu Dec 10 09:57:06 2009
@@ -99,4 +99,6 @@
      ResourceDependency setRequired(boolean required);
 
      ResourceDependency setFilter(String resourceFilter);
+     
+     ResourceDependency setPropagate(boolean propagate);
 }

Modified: felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java?rev=889164&r1=889163&r2=889164&view=diff
==============================================================================
--- felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
(original)
+++ felix/trunk/dependencymanager/core/src/main/java/org/apache/felix/dm/impl/ResourceAdapterImpl.java
Thu Dec 10 09:57:06 2009
@@ -25,10 +25,12 @@
 	private volatile DependencyManager m_manager;
 	private final Object m_impl;
 	private final Class m_iface;
+    private final boolean m_propagate;
 
-	public ResourceAdapterImpl(Object impl, Class iface) {
+	public ResourceAdapterImpl(Object impl, Class iface, boolean propagate) {
 		m_impl = impl;
 		m_iface = iface;
+		m_propagate = propagate;
 	}
 
 	public void added(Resource resource) {
@@ -39,6 +41,7 @@
 			.add(m_manager.createResourceDependency()
 				.setResource(resource)
 				.setRequired(true)
+				.setPropagate(m_propagate)
 				)
 			);
 	}



Mime
View raw message