cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1412455 - in /cxf/dosgi/trunk/dsw/cxf-dsw/src: main/java/org/apache/cxf/dosgi/dsw/ main/java/org/apache/cxf/dosgi/dsw/handlers/ test/java/org/apache/cxf/dosgi/dsw/handlers/
Date Thu, 22 Nov 2012 08:59:10 GMT
Author: cschneider
Date: Thu Nov 22 08:59:09 2012
New Revision: 1412455

URL: http://svn.apache.org/viewvc?rev=1412455&view=rev
Log:
DOSGI-147 Deprecate constants that are defined in the spec or old

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/ConfigTypeHandlerFactory.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.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=1412455&r1=1412454&r2=1412455&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 Thu
Nov 22 08:59:09 2012
@@ -18,22 +18,34 @@
   */
 package org.apache.cxf.dosgi.dsw;
 
+import org.osgi.service.remoteserviceadmin.RemoteConstants;
+
 public class Constants {
     // Constants from RFC 119, they should ultimately be picked up from an OSGi class.
-    public static final String EXPORTED_INTERFACES = "service.exported.interfaces";
+    @Deprecated
+    public static final String EXPORTED_INTERFACES = RemoteConstants.SERVICE_EXPORTED_INTERFACES;
+    @Deprecated
     public static final String EXPORTED_INTERFACES_OLD = "osgi.remote.interfaces"; // for
BW compatibility
 
-    public static final String EXPORTED_CONFIGS = "service.exported.configs";
+    @Deprecated
+    public static final String EXPORTED_CONFIGS = RemoteConstants.SERVICE_EXPORTED_CONFIGS;
+    @Deprecated
     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";
+    @Deprecated
+    public static final String EXPORTED_INTENTS = RemoteConstants.SERVICE_EXPORTED_INTENTS;
+    @Deprecated
+    public static final String EXPORTED_INTENTS_EXTRA = RemoteConstants.SERVICE_EXPORTED_INTENTS_EXTRA;
+    @Deprecated
     public static final String EXPORTED_INTENTS_OLD = "osgi.remote.requires.intents";
     
-    public static final String IMPORTED = "service.imported";
-    public static final String IMPORTD_CONFIGS = "service.imported.configs";
+    @Deprecated
+    public static final String IMPORTED = RemoteConstants.SERVICE_IMPORTED;
+    @Deprecated
+    public static final String IMPORTD_CONFIGS = RemoteConstants.SERVICE_IMPORTED_CONFIGS;
     
-    public static final String INTENTS = "service.intents";
+    @Deprecated
+    public static final String INTENTS = RemoteConstants.SERVICE_INTENTS;
         
     // WSDL
     public static final String WSDL_CONFIG_TYPE = "wsdl";

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java?rev=1412455&r1=1412454&r2=1412455&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactory.java
Thu Nov 22 08:59:09 2012
@@ -27,6 +27,7 @@ import org.apache.cxf.dosgi.dsw.qos.Inte
 import org.apache.cxf.dosgi.dsw.qos.IntentUtils;
 import org.apache.cxf.dosgi.dsw.util.OsgiUtils;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.remoteserviceadmin.RemoteConstants;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -75,7 +76,7 @@ public final class ConfigTypeHandlerFact
         }
 
         if (types.contains(Constants.RS_CONFIG_TYPE)) {
-            String intentsProperty = OsgiUtils.getProperty(serviceProperties, Constants.EXPORTED_INTENTS);
+            String intentsProperty = OsgiUtils.getProperty(serviceProperties, RemoteConstants.SERVICE_EXPORTED_INTENTS);
             boolean hasHttpIntent = false, hasSoapIntent = false;
             if (intentsProperty != null) {
                 String[] intents = IntentUtils.parseIntents(intentsProperty);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java?rev=1412455&r1=1412454&r2=1412455&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
Thu Nov 22 08:59:09 2012
@@ -31,6 +31,7 @@ import org.apache.cxf.dosgi.dsw.qos.Inte
 import org.apache.cxf.dosgi.dsw.qos.IntentMap;
 import org.easymock.EasyMock;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.remoteserviceadmin.RemoteConstants;
 
 public class ConfigTypeHandlerFactoryTest extends TestCase {
 
@@ -62,7 +63,7 @@ public class ConfigTypeHandlerFactoryTes
         IntentManager intentManager = new IntentManagerImpl(intentMap);
         ConfigTypeHandlerFactory f = new ConfigTypeHandlerFactory(intentManager);
         configs.add(Constants.RS_CONFIG_TYPE);
-        serviceProps.put(Constants.EXPORTED_INTENTS, "HTTP");
+        serviceProps.put(RemoteConstants.SERVICE_EXPORTED_INTENTS, "HTTP");
 
         ConfigurationTypeHandler handler = f.getHandler(bc, configs, serviceProps, null);
         assertTrue(handler instanceof JaxRSPojoConfigurationTypeHandler);
@@ -79,7 +80,7 @@ public class ConfigTypeHandlerFactoryTes
         IntentManager intentManager = new IntentManagerImpl(intentMap);
         ConfigTypeHandlerFactory f = new ConfigTypeHandlerFactory(intentManager);
         configs.add(Constants.RS_CONFIG_TYPE);
-        serviceProps.put(Constants.EXPORTED_INTENTS, "SOAP HTTP");
+        serviceProps.put(RemoteConstants.SERVICE_EXPORTED_INTENTS, "SOAP HTTP");
 
         ConfigurationTypeHandler handler = f.getHandler(bc, configs, serviceProps, null);
         assertTrue(handler instanceof PojoConfigurationTypeHandler);



Mime
View raw message