felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fmesc...@apache.org
Subject svn commit: r822290 - in /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager: AbstractComponentManager.java ComponentFactoryImpl.java ServiceFactoryComponentManager.java
Date Tue, 06 Oct 2009 14:20:19 GMT
Author: fmeschbe
Date: Tue Oct  6 14:20:17 2009
New Revision: 822290

URL: http://svn.apache.org/viewvc?rev=822290&view=rev
Log:
FELIX-1530 Add methods to ask for the activate/deactivate method names and whether
they have been declared or not.

Modified:
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
    felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java?rev=822290&r1=822289&r2=822290&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java
Tue Oct  6 14:20:17 2009
@@ -595,6 +595,38 @@
         return m_componentMetadata.isEnabled();
     }
 
+
+    public String getActivate()
+    {
+        return m_componentMetadata.getActivate();
+    }
+
+
+    public boolean isActivateDeclared()
+    {
+        return m_componentMetadata.isActivateDeclared();
+    }
+
+
+    public String getDeactivate()
+    {
+        return m_componentMetadata.getDeactivate();
+    }
+
+
+    public boolean isDeactivateDeclared()
+    {
+        return m_componentMetadata.isDeactivateDeclared();
+    }
+
+
+    public String getModified()
+    {
+        return m_componentMetadata.getModified();
+
+    }
+
+
     public boolean isServiceFactory()
     {
         return m_componentMetadata.getServiceMetadata() != null

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java?rev=822290&r1=822289&r2=822290&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ComponentFactoryImpl.java
Tue Oct  6 14:20:17 2009
@@ -199,6 +199,16 @@
         return this;
     }
 
+    //---------- Component interface
+
+
+    public ComponentInstance getComponentInstance()
+    {
+        // a ComponentFactory is not a real component and as such does
+        // not have a ComponentInstance
+        return null;
+    }
+
 
     //---------- ComponentHolder interface
 

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java?rev=822290&r1=822289&r2=822290&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ServiceFactoryComponentManager.java
Tue Oct  6 14:20:17 2009
@@ -29,6 +29,7 @@
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.component.ComponentConstants;
 import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.ComponentInstance;
 import org.osgi.service.log.LogService;
 
 
@@ -155,6 +156,15 @@
         }
     }
 
+    //---------- Component interface
+
+    public ComponentInstance getComponentInstance()
+    {
+        // TODO: should return the component instance corresponding to the
+        // bundle owning ScrService
+        return super.getComponentInstance();
+    }
+
     private static class BundleComponentContext extends ComponentContextImpl
     {
 



Mime
View raw message