cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r785151 - in /cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org: apache/cxf/dosgi/dsw/Constants.java apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java osgi/service/distribution/DistributionConstants.java
Date Tue, 16 Jun 2009 10:40:19 GMT
Author: davidb
Date: Tue Jun 16 10:40:18 2009
New Revision: 785151

URL: http://svn.apache.org/viewvc?rev=785151&view=rev
Log:
Further property updates.

Modified:
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java?rev=785151&r1=785150&r2=785151&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/Constants.java Tue
Jun 16 10:40:18 2009
@@ -26,6 +26,10 @@
     public static final String EXPORTED_CONFIGS = "service.exported.configs";
     public static final String EXPORTED_CONFIGS_OLD = "osgi.remote.configuration.type"; //
for BW comp.
     
+    public static final String EXPORTED_INTENTS = "service.exported.intents";
+    public static final String EXPORTED_INTENTS_EXTRA = "service.exported.intents.extra";
+    public static final String EXPORTED_INTENTS_OLD = "osgi.remote.requires.intents";
+    
     public static final String IMPORTED = "service.imported";    
     public static final String INTENTS = "service.intents";
         

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java?rev=785151&r1=785150&r2=785151&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/AbstractPojoConfigurationTypeHandler.java
Tue Jun 16 10:40:18 2009
@@ -44,7 +44,6 @@
 import org.apache.cxf.frontend.ServerFactoryBean;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.discovery.ServiceEndpointDescription;
-import org.osgi.service.distribution.DistributionConstants;
 
 public abstract class AbstractPojoConfigurationTypeHandler extends AbstractConfigurationHandler
{
     private static final Logger LOG = Logger.getLogger(AbstractPojoConfigurationTypeHandler.class.getName());
@@ -177,14 +176,20 @@
     }
 
     private static String[] getRequestedIntents(ServiceEndpointDescription sd) {
-        String property = OsgiUtils.getProperty(sd, 
-                DistributionConstants.REMOTE_REQUIRES_INTENTS);
-
-        String[] intents = OsgiUtils.parseIntents(property);
-        for (int i = 0; i < intents.length; i++) {
-            LOG.fine("Intent asserted: " + intents[i]);
-        } 
-        return intents;
+        Collection<String> intents = Arrays.asList(
+            OsgiUtils.parseIntents(OsgiUtils.getProperty(sd, Constants.EXPORTED_INTENTS)));
       
+        Collection<String> extraIntents = Arrays.asList(
+            OsgiUtils.parseIntents(OsgiUtils.getProperty(sd, Constants.EXPORTED_INTENTS_EXTRA)));
+        Collection<String> oldIntents = Arrays.asList(
+            OsgiUtils.parseIntents(OsgiUtils.getProperty(sd, Constants.EXPORTED_INTENTS_OLD)));

+        
+        Set<String> allIntents = new HashSet<String>(intents.size() + extraIntents.size()
+ oldIntents.size());
+        allIntents.addAll(intents);
+        allIntents.addAll(extraIntents);
+        allIntents.addAll(oldIntents);
+        
+        LOG.fine("Intents asserted: " + allIntents);
+        return allIntents.toArray(new String[allIntents.size()]);
     }
     
     private IntentMap mergeWithMaster(BundleContext dswContext, IntentMap intentMap) {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java?rev=785151&r1=785150&r2=785151&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/osgi/service/distribution/DistributionConstants.java
Tue Jun 16 10:40:18 2009
@@ -54,7 +54,7 @@
 	 * The value of this property is of type String, String[] or Collection of
 	 * String.
 	 */
-	public static final String	REMOTE_REQUIRES_INTENTS		= "osgi.remote.requires.intents";
+	// public static final String	REMOTE_REQUIRES_INTENTS		= "osgi.remote.requires.intents";
 
 	/**
 	 * This optional service registration property identifies the metadata type



Mime
View raw message