camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r747428 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/ main/java/org/apache/camel/component/bean/ test/java/org/apache/camel/component/bean/ test/java/org/apache/camel/language/ test/java/org/apache/camel/processor/ test/java...
Date Tue, 24 Feb 2009 16:57:42 GMT
Author: davsclaus
Date: Tue Feb 24 16:57:37 2009
New Revision: 747428

URL: http://svn.apache.org/viewvc?rev=747428&view=rev
Log:
CAMEL-1378: @Header, @Property now uses a default value for the input so no need to spcecify
name = xxx when using the annotation.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Header.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/InOnly.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/InOut.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/Property.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BodyInAggregatingStrategy.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyAggregationStrategy.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Header.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Header.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Header.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Header.java Tue Feb 24 16:57:37
2009
@@ -32,5 +32,5 @@
 @Documented
 @Target({ElementType.PARAMETER })
 public @interface Header {
-    String name();
+    String value();
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/InOnly.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/InOnly.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/InOnly.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/InOnly.java Tue Feb 24 16:57:37
2009
@@ -38,6 +38,7 @@
  * @see org.apache.camel.ExchangePattern
  * @see org.apache.camel.Exchange#getPattern()
  * @see InOut
+ * @see Pattern
  *
  * @version $Revision$
  */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/InOut.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/InOut.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/InOut.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/InOut.java Tue Feb 24 16:57:37 2009
@@ -36,7 +36,8 @@
  *
  * @see org.apache.camel.ExchangePattern
  * @see org.apache.camel.Exchange#getPattern()
- * @see InOut
+ * @see InOnly
+ * @see Pattern
  *
  * @version $Revision$
  */

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Property.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Property.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Property.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Property.java Tue Feb 24 16:57:37
2009
@@ -32,5 +32,5 @@
 @Documented
 @Target({ElementType.PARAMETER })
 public @interface Property {
-    String name();
+    String value();
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java Tue
Feb 24 16:57:37 2009
@@ -430,12 +430,12 @@
                                                                          Annotation annotation)
{
         if (annotation instanceof Property) {
             Property propertyAnnotation = (Property)annotation;
-            return ExpressionBuilder.propertyExpression(propertyAnnotation.name());
+            return ExpressionBuilder.propertyExpression(propertyAnnotation.value());
         } else if (annotation instanceof Properties) {
             return ExpressionBuilder.propertiesExpression();
         } else if (annotation instanceof Header) {
             Header headerAnnotation = (Header)annotation;
-            return ExpressionBuilder.headerExpression(headerAnnotation.name());
+            return ExpressionBuilder.headerExpression(headerAnnotation.value());
         } else if (annotation instanceof Headers) {
             return ExpressionBuilder.headersExpression();
         } else if (annotation instanceof OutHeaders) {

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/BeanWithAnnotationAndExchangeTest.java
Tue Feb 24 16:57:37 2009
@@ -62,7 +62,7 @@
     public static class MyBean {
 
         // START SNIPPET: e1
-        public void doSomething(@Header(name = "user") String user, @Body String body, Exchange
exchange) {
+        public void doSomething(@Header("user") String user, @Body String body, Exchange
exchange) {
             assertEquals("admin", user);
 
             exchange.getIn().setBody(body + "MyBean");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/language/BeanTest.java Tue Feb 24
16:57:37 2009
@@ -82,7 +82,7 @@
             return in.getHeader("foo");
         }
 
-        public boolean isFooHeaderAbc(@Header(name = "foo")String foo) {
+        public boolean isFooHeaderAbc(@Header("foo") String foo) {
             return "abc".equals(foo);
         }
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BeanWithExceptionTest.java
Tue Feb 24 16:57:37 2009
@@ -84,7 +84,7 @@
     public static class ValidationBean {
         private static final transient Log LOG = LogFactory.getLog(ValidationBean.class);
 
-        public void someMethod(String body, @Header(name = "foo")
+        public void someMethod(String body, @Header("foo")
                                String header) throws ValidationException {
             if ("bar".equals(header)) {
                 LOG.info("someMethod() called with valid header and body: " + body);

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BodyInAggregatingStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BodyInAggregatingStrategy.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BodyInAggregatingStrategy.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/BodyInAggregatingStrategy.java
Tue Feb 24 16:57:37 2009
@@ -35,9 +35,7 @@
     /**
      * An expression used to determine if the aggregation is complete
      */
-    public boolean isCompleted(@Header(name = Exchange.AGGREGATED_SIZE)
-                               Integer aggregated) {
-
+    public boolean isCompleted(@Header(Exchange.AGGREGATED_SIZE) Integer aggregated) {
         if (aggregated == null) {
             return false;
         }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ClaimCheckTest.java Tue
Feb 24 16:57:37 2009
@@ -86,7 +86,7 @@
     
     // START SNIPPET: e3
     public static final class DataEnricherBean {
-        public void addDataBackIn(Exchange exchange, @Header(name = "claimCheck") String
claimCheck) { 
+        public void addDataBackIn(Exchange exchange, @Header("claimCheck") String claimCheck)
{ 
             // query the data store using the claim check as the key and add the data
             // back into the message body
             exchange.getIn().setBody(dataStore.get(claimCheck));

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MethodFilterTest.java
Tue Feb 24 16:57:37 2009
@@ -66,7 +66,7 @@
 
     // START SNIPPET: filter
     public static class MyBean {
-        public boolean matches(@Header(name = "foo")String location) {
+        public boolean matches(@Header("foo")String location) {
             return "London".equals(location);
         }
     }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyAggregationStrategy.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyAggregationStrategy.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyAggregationStrategy.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/MyAggregationStrategy.java
Tue Feb 24 16:57:37 2009
@@ -38,7 +38,7 @@
     /**
      * An expression used to determine if the aggregation is complete
      */
-    public boolean isCompleted(@Header(name = "aggregated")
+    public boolean isCompleted(@Header("aggregated")
                                Integer aggregated) {
         if (aggregated == null) {
             return false;

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java?rev=747428&r1=747427&r2=747428&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
Tue Feb 24 16:57:37 2009
@@ -72,7 +72,7 @@
     public class MyRetryBean {
 
         // using bean binding we can bind the information from the exchange to the types
we have in our method signature
-        public boolean retryUntil(@Header(name = Exchange.REDELIVERY_COUNTER) Integer counter,
@Body String body, @ExchangeException Exception causedBy) {
+        public boolean retryUntil(@Header(Exchange.REDELIVERY_COUNTER) Integer counter, @Body
String body, @ExchangeException Exception causedBy) {
             // NOTE: counter is the redelivery attempt, will start from 1
             invoked++;
 



Mime
View raw message