felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r1533850 - in /felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager: ComponentFactoryImpl.java ConfigurationComponentFactoryImpl.java
Date Sun, 20 Oct 2013 05:38:39 GMT
Author: djencks
Date: Sun Oct 20 05:38:38 2013
New Revision: 1533850

URL: http://svn.apache.org/r1533850
Log:
FELIX-3536 (additional minor fix) Only put non-spec-required properties on non-spec ConfigurableComponentFactory

Modified:
    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/ConfigurationComponentFactoryImpl.java

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=1533850&r1=1533849&r2=1533850&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
Sun Oct 20 05:38:38 2013
@@ -248,12 +248,6 @@ public class ComponentFactoryImpl<S> ext
         props.put( ComponentConstants.COMPONENT_NAME, getComponentMetadata().getName() );
         props.put( ComponentConstants.COMPONENT_FACTORY, getComponentMetadata().getFactoryIdentifier()
);
 
-        // also register with the factory PID
-        props.put( Constants.SERVICE_PID, getComponentMetadata().getName() );
-
-        // descriptive service properties
-        props.put( Constants.SERVICE_DESCRIPTION, "ManagedServiceFactory for Factory Component"
-            + getComponentMetadata().getName() );
         props.put( Constants.SERVICE_VENDOR, "The Apache Software Foundation" );
 
         return props;

Modified: felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurationComponentFactoryImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurationComponentFactoryImpl.java?rev=1533850&r1=1533849&r2=1533850&view=diff
==============================================================================
--- felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurationComponentFactoryImpl.java
(original)
+++ felix/trunk/scr/src/main/java/org/apache/felix/scr/impl/manager/ConfigurationComponentFactoryImpl.java
Sun Oct 20 05:38:38 2013
@@ -31,6 +31,7 @@ import org.apache.felix.scr.impl.Targete
 import org.apache.felix.scr.impl.config.ComponentHolder;
 import org.apache.felix.scr.impl.helper.ComponentMethods;
 import org.apache.felix.scr.impl.metadata.ComponentMetadata;
+import org.osgi.framework.Constants;
 import org.osgi.service.log.LogService;
 
 /**
@@ -65,6 +66,21 @@ public class ConfigurationComponentFacto
     }
 
 
+    @Override
+    public Dictionary<String, Object> getServiceProperties()
+    {
+        Dictionary<String, Object> props = super.getServiceProperties();
+        // also register with the factory PID
+        props.put( Constants.SERVICE_PID, getComponentMetadata().getConfigurationPid() );
+
+        // descriptive service properties
+        props.put( Constants.SERVICE_DESCRIPTION, "Configurable (nonstandard) Factory Component
"
+            + getComponentMetadata().getName() );
+        
+        return props;
+    }
+
+
     /**
      * The component factory does not have a component to create.
      * <p>



Mime
View raw message