camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1130555 - in /camel/trunk/components: camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/ camel-cxf/src/main/java/org/apache/camel/component/cxf/ camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/ ...
Date Thu, 02 Jun 2011 13:57:36 GMT
Author: ningjiang
Date: Thu Jun  2 13:57:35 2011
New Revision: 1130555

URL: http://svn.apache.org/viewvc?rev=1130555&view=rev
Log:
CAMEL-2389 added the CxfConstants back with @Deprecated, will removed when we move to camel
3.0

Added:
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
      - copied, changed from r1130544, camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
Modified:
    camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
    camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/CxfBeanDestination.java
    camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHeaderTest.java

Modified: camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java?rev=1130555&r1=1130554&r2=1130555&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
(original)
+++ camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
Thu Jun  2 13:57:35 2011
@@ -21,46 +21,43 @@ package org.apache.camel.component.cxf.c
  *
  * @version 
  */
-public interface CxfConstants {
-    String METHOD = "method";
-    String SERVICE_CLASS = "serviceClass";
+public final class CxfConstants {
+    public static final String METHOD = "method";
+    public static final String SERVICE_CLASS = "serviceClass";
     // CamelCXFDataFormat is used as exchange property key
-    String DATA_FORMAT_PROPERTY = "CamelCXFDataFormat";
-    String SET_DEFAULT_BUS = "setDefaultBus";
-    String WSDL_URL = "wsdlURL";
-    String ADDRESS = "address";
-    String SERVICE_NAME = "serviceName";
-    String PORT_NAME = "portName";
-    String SERVICE_LOCALNAME = "serviceLocalName";
-    String SERVICE_NAMESPACE = "serviceNamespace";
-    String PORT_LOCALNAME = "endpointLocalName";
-    String PORT_NAMESPACE = "endpointNamespace";
-    String PROTOCOL_NAME_RES = "res";
-    String OPERATION_NAME = "operationName";
-    String OPERATION_NAMESPACE = "operationNamespace";
-    String SPRING_CONTEXT_ENDPOINT = "bean:";
-    @Deprecated
-    // This constants will be removed in Camel 3.0
-    // Please use that one in camel-cxf-transport
-    String CAMEL_TRANSPORT_PREFIX = "camel:";
-    String JAXWS_CONTEXT = "jaxwsContext";
-    @Deprecated
-    String CXF_EXCHANGE = "org.apache.cxf.message.exchange";
-    String DISPATCH_NAMESPACE = "http://camel.apache.org/cxf/jaxws/dispatch";
-    String DISPATCH_DEFAULT_OPERATION_NAMESPACE = "Invoke";    
-    @Deprecated
-    String CAMEL_EXCHANGE = "org.apache.camel.exchange";
-    String CAMEL_CXF_MESSAGE = "CamelCxfMessage";
-    String CAMEL_CXF_RS_USING_HTTP_API = "CamelCxfRsUsingHttpAPI";
-    String CAMEL_CXF_RS_VAR_VALUES = "CamelCxfRsVarValues";
-    String CAMEL_CXF_RS_RESPONSE_CLASS = "CamelCxfRsResponseClass";
-    String CAMEL_CXF_RS_RESPONSE_GENERIC_TYPE = "CamelCxfRsResponseGenericType";
-    String CAMEL_CXF_RS_QUERY_MAP = "CamelCxfRsQueryMap";
-    String CAMEL_CXF_RS_EXTRACT_ENTITY = "CamelCxfRsExtractEntity";
-    String CAMEL_CXF_RS_OPERATION_RESOURCE_INFO_STACK = "CamelCxfRsOperationResourceInfoStack";
-    String CAMEL_CXF_ATTACHMENTS = "CamelAttachments";
-    String CAMEL_CXF_RS_THROW_EXCEPTION_ON_FAILURE = "CamelCxfRsThrowExceptionOnFailure";
+    public static final String DATA_FORMAT_PROPERTY = "CamelCXFDataFormat";
+    public static final String SET_DEFAULT_BUS = "setDefaultBus";
+    public static final String WSDL_URL = "wsdlURL";
+    public static final String ADDRESS = "address";
+    public static final String SERVICE_NAME = "serviceName";
+    public static final String PORT_NAME = "portName";
+    public static final String SERVICE_LOCALNAME = "serviceLocalName";
+    public static final String SERVICE_NAMESPACE = "serviceNamespace";
+    public static final String PORT_LOCALNAME = "endpointLocalName";
+    public static final String PORT_NAMESPACE = "endpointNamespace";
+    public static final String PROTOCOL_NAME_RES = "res";
+    public static final String OPERATION_NAME = "operationName";
+    public static final String OPERATION_NAMESPACE = "operationNamespace";
+    public static final String SPRING_CONTEXT_ENDPOINT = "bean:";
+    
+    public static final String JAXWS_CONTEXT = "jaxwsContext";
+    public static final String DISPATCH_NAMESPACE = "http://camel.apache.org/cxf/jaxws/dispatch";
+    public static final String DISPATCH_DEFAULT_OPERATION_NAMESPACE = "Invoke";    
+    
+    public static final String CAMEL_CXF_MESSAGE = "CamelCxfMessage";
+    public static final String CAMEL_CXF_RS_USING_HTTP_API = "CamelCxfRsUsingHttpAPI";
+    public static final String CAMEL_CXF_RS_VAR_VALUES = "CamelCxfRsVarValues";
+    public static final String CAMEL_CXF_RS_RESPONSE_CLASS = "CamelCxfRsResponseClass";
+    public static final String CAMEL_CXF_RS_RESPONSE_GENERIC_TYPE = "CamelCxfRsResponseGenericType";
+    public static final String CAMEL_CXF_RS_QUERY_MAP = "CamelCxfRsQueryMap";
+    public static final String CAMEL_CXF_RS_EXTRACT_ENTITY = "CamelCxfRsExtractEntity";
+    public static final String CAMEL_CXF_RS_OPERATION_RESOURCE_INFO_STACK = "CamelCxfRsOperationResourceInfoStack";
+    public static final String CAMEL_CXF_ATTACHMENTS = "CamelAttachments";
+    public static final String CAMEL_CXF_RS_THROW_EXCEPTION_ON_FAILURE = "CamelCxfRsThrowExceptionOnFailure";
 
+    private CxfConstants() {
+        // Utility class
+    }
 }
 
 

Copied: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
(from r1130544, camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java)
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java?p2=camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java&p1=camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java&r1=1130544&r2=1130555&rev=1130555&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/message/CxfConstants.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfConstants.java
Thu Jun  2 13:57:35 2011
@@ -14,13 +14,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.cxf.common.message;
+package org.apache.camel.component.cxf;
 
 /**
  * Constants used in this module
- *
- * @version 
+ * Please use the org.apache.camel.component.cxf.common.message.CxfConstants in the camel-cxf-transport
module
+ * This class will be removed in Camel 3.0
  */
+@Deprecated
 public interface CxfConstants {
     String METHOD = "method";
     String SERVICE_CLASS = "serviceClass";
@@ -41,14 +42,18 @@ public interface CxfConstants {
     String SPRING_CONTEXT_ENDPOINT = "bean:";
     @Deprecated
     // This constants will be removed in Camel 3.0
-    // Please use that one in camel-cxf-transport
+    // Please use org.apache.camel.component.cxf.transport.CamelTransportConstants in camel-cxf-transport
     String CAMEL_TRANSPORT_PREFIX = "camel:";
     String JAXWS_CONTEXT = "jaxwsContext";
     @Deprecated
+    // This constants will be removed in Camel 3.0
+    // Please use org.apache.camel.component.cxf.transport.CamelTransportConstants in camel-cxf-transport
     String CXF_EXCHANGE = "org.apache.cxf.message.exchange";
     String DISPATCH_NAMESPACE = "http://camel.apache.org/cxf/jaxws/dispatch";
     String DISPATCH_DEFAULT_OPERATION_NAMESPACE = "Invoke";    
     @Deprecated
+    // This constants will be removed in Camel 3.0
+    // Please use org.apache.camel.component.cxf.transport.CamelTransportConstants in camel-cxf-transport
     String CAMEL_EXCHANGE = "org.apache.camel.exchange";
     String CAMEL_CXF_MESSAGE = "CamelCxfMessage";
     String CAMEL_CXF_RS_USING_HTTP_API = "CamelCxfRsUsingHttpAPI";

Modified: camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/CxfBeanDestination.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/CxfBeanDestination.java?rev=1130555&r1=1130554&r2=1130555&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/CxfBeanDestination.java
(original)
+++ camel/trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/cxfbean/CxfBeanDestination.java
Thu Jun  2 13:57:35 2011
@@ -22,6 +22,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.component.cxf.common.message.CxfConstants;
 import org.apache.camel.component.cxf.transport.CamelDestination;
+import org.apache.camel.component.cxf.transport.CamelTransportConstants;
 import org.apache.cxf.Bus;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
@@ -75,7 +76,7 @@ public class CxfBeanDestination extends 
             endpoint.getCxfBeanBinding().createCxfMessageFromCamelExchange(camelExchange,
                     endpoint.getHeaderFilterStrategy());
                       
-        cxfMessage.put(CxfConstants.CAMEL_EXCHANGE, camelExchange);
+        cxfMessage.put(CamelTransportConstants.CAMEL_EXCHANGE, camelExchange);
         ((MessageImpl)cxfMessage).setDestination(this);
 
         // Handling the incoming message

Modified: camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHeaderTest.java?rev=1130555&r1=1130554&r2=1130555&view=diff
==============================================================================
--- camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHeaderTest.java
(original)
+++ camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/jaxrs/CxfRsProducerHeaderTest.java
Thu Jun  2 13:57:35 2011
@@ -16,10 +16,6 @@
  */
 package org.apache.camel.component.cxf.jaxrs;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
 import java.io.InputStream;
 
 import javax.ws.rs.core.Response;
@@ -36,6 +32,10 @@ import org.springframework.beans.factory
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
 /**
  * Unit test that verify header propagation functionality for CxfRsProducer
  * that uses WebClient API.



Mime
View raw message