camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1310491 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/builder/ test/java/org/apache/camel/component/bean/issues/ test/java/org/apache/camel/component/file/stress/ test/java/org/apache/camel/issues/ test/java/org/apache/camel...
Date Fri, 06 Apr 2012 17:28:26 GMT
Author: davsclaus
Date: Fri Apr  6 17:28:25 2012
New Revision: 1310491

URL: http://svn.apache.org/viewvc?rev=1310491&view=rev
Log:
CAMEL-5147: Java DSL method call expression should be named method and not bean, to make it
consistent between DSLs.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanNonRegistryTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/MulticastPipelineAggregateIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListParallelIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListParallelIssueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceWhenBeanExpressionWithExceptionTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListThrowExceptionSubRouteTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutingSlipNoSuchEndpointExceptionTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceWithDefaultErrorHandlerTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java Fri
Apr  6 17:28:25 2012
@@ -157,20 +157,22 @@ public abstract class BuilderSupport {
     }
 
     /**
-     * Returns a <a href="http://camel.apache.org/bean-language.html">bean expression</a>
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
      * value builder
      * <p/>
      * This method accepts dual parameters. Either an bean instance or a reference to a bean
(String).
      *
      * @param beanOrBeanRef  either an instanceof a bean or a reference to bean to lookup
in the Registry
      * @return the builder
+     * @deprecated use {@link #method(Object)} instead
      */
+    @Deprecated
     public ValueBuilder bean(Object beanOrBeanRef) {
         return bean(beanOrBeanRef, null);
     }
     
     /**
-     * Returns a <a href="http://camel.apache.org/bean-language.html">bean expression</a>
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
      * value builder
      * <p/>
      * This method accepts dual parameters. Either an bean instance or a reference to a bean
(String).
@@ -178,7 +180,9 @@ public abstract class BuilderSupport {
      * @param beanOrBeanRef  either an instanceof a bean or a reference to bean to lookup
in the Registry
      * @param method   name of method to invoke
      * @return the builder
+     * @deprecated use {@link #method(Object, String)} instead
      */
+    @Deprecated
     public ValueBuilder bean(Object beanOrBeanRef, String method) {
         MethodCallExpression expression;
         if (beanOrBeanRef instanceof String) {
@@ -190,31 +194,93 @@ public abstract class BuilderSupport {
     }
 
     /**
-     * Returns a <a href="http://camel.apache.org/bean-language.html">bean expression</a>
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
      * value builder
      *
      * @param beanType the Class of the bean which we want to invoke
      * @return the builder
+     * @deprecated use {@link #method(Class)} instead
      */
+    @Deprecated
     public ValueBuilder bean(Class<?> beanType) {
         MethodCallExpression expression = new MethodCallExpression(beanType);
         return new ValueBuilder(expression);
     }
     
     /**
-     * Returns a <a href="http://camel.apache.org/bean-language.html">bean expression</a>
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
      * value builder
      *
      * @param beanType the Class of the bean which we want to invoke
      * @param method   name of method to invoke
      * @return the builder
+     * @deprecated use {@link #method(Class, String)} instead
      */
+    @Deprecated
     public ValueBuilder bean(Class<?> beanType, String method) {
         MethodCallExpression expression = new MethodCallExpression(beanType, method);
         return new ValueBuilder(expression);
     }
 
     /**
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
+     * value builder
+     * <p/>
+     * This method accepts dual parameters. Either an bean instance or a reference to a bean
(String).
+     *
+     * @param beanOrBeanRef  either an instanceof a bean or a reference to bean to lookup
in the Registry
+     * @return the builder
+     */
+    public ValueBuilder method(Object beanOrBeanRef) {
+        return method(beanOrBeanRef, null);
+    }
+
+    /**
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
+     * value builder
+     * <p/>
+     * This method accepts dual parameters. Either an bean instance or a reference to a bean
(String).
+     *
+     * @param beanOrBeanRef  either an instanceof a bean or a reference to bean to lookup
in the Registry
+     * @param method   name of method to invoke
+     * @return the builder
+     */
+    public ValueBuilder method(Object beanOrBeanRef, String method) {
+        MethodCallExpression expression;
+        if (beanOrBeanRef instanceof String) {
+            expression = new MethodCallExpression((String) beanOrBeanRef, method);
+        } else {
+            expression = new MethodCallExpression(beanOrBeanRef, method);
+        }
+        return new ValueBuilder(expression);
+    }
+
+    /**
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
+     * value builder
+     *
+     * @param beanType the Class of the bean which we want to invoke
+     * @return the builder
+     */
+    public ValueBuilder method(Class<?> beanType) {
+        MethodCallExpression expression = new MethodCallExpression(beanType);
+        return new ValueBuilder(expression);
+    }
+
+    /**
+     * Returns a <a href="http://camel.apache.org/bean-language.html">method call expression</a>
+     * value builder
+     *
+     * @param beanType the Class of the bean which we want to invoke
+     * @param method   name of method to invoke
+     * @return the builder
+     */
+    public ValueBuilder method(Class<?> beanType, String method) {
+        MethodCallExpression expression = new MethodCallExpression(beanType, method);
+        return new ValueBuilder(expression);
+    }
+
+    /**
      * Returns an expression processing the exchange to the given endpoint uri
      *
      * @param uri endpoint uri to send the exchange to

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanNonRegistryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanNonRegistryTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanNonRegistryTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanNonRegistryTest.java
Fri Apr  6 17:28:25 2012
@@ -31,7 +31,7 @@ public class FilterBeanNonRegistryTest e
                 MyBean myBean = new MyBean();
 
                 from("direct:start")
-                    .filter().expression(bean(myBean, "isGoldCustomer"))
+                    .filter().method(myBean, "isGoldCustomer")
                     .to("mock:result");
             }
         });

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/bean/issues/FilterBeanRegistryTest.java
Fri Apr  6 17:28:25 2012
@@ -57,7 +57,7 @@ public class FilterBeanRegistryTest exte
             @Override
             public void configure() throws Exception {
                 from("direct:start")
-                    .filter().expression(bean("foo", "isGoldCustomer"))
+                    .filter().method("foo", "isGoldCustomer")
                     .to("mock:result");
             }
         });

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/stress/FileAsyncStressFileDropper.java
Fri Apr  6 17:28:25 2012
@@ -50,9 +50,9 @@ public class FileAsyncStressFileDropper 
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                // generate a new file continously
+                // generate a new file continuously
                 from("timer:foo?period=50")
-                    .setHeader(Exchange.FILE_NAME, bean(FileAsyncStressFileDropper.class,
"getFilename"))
+                    .setHeader(Exchange.FILE_NAME, method(FileAsyncStressFileDropper.class,
"getFilename"))
                     .setBody(constant("Hello World"))
                     .to("file:target/filestress")
                     .to("mock:result");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/MulticastPipelineAggregateIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/MulticastPipelineAggregateIssueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/MulticastPipelineAggregateIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/MulticastPipelineAggregateIssueTest.java
Fri Apr  6 17:28:25 2012
@@ -50,14 +50,14 @@ public class MulticastPipelineAggregateI
                 .to("mock:a");
 
                 from("direct:b").multicast(new SumAggregateBean())
-                    .pipeline().transform(bean(IncreaseOne.class)).bean(new IncreaseTwo()).end()
-                    .pipeline().transform(bean(IncreaseOne.class)).bean(new IncreaseTwo()).end()
+                    .pipeline().transform(method(IncreaseOne.class)).bean(new IncreaseTwo()).end()
+                    .pipeline().transform(method(IncreaseOne.class)).bean(new IncreaseTwo()).end()
                 .end()
                 .to("mock:b");
 
                 from("direct:c").multicast(new SumAggregateBean())
-                    .pipeline().transform(bean(IncreaseOne.class)).transform(bean(new IncreaseTwo())).end()
-                    .pipeline().transform(bean(IncreaseOne.class)).transform(bean(new IncreaseTwo())).end()
+                    .pipeline().transform(method(IncreaseOne.class)).transform(method(new
IncreaseTwo())).end()
+                    .pipeline().transform(method(IncreaseOne.class)).transform(method(new
IncreaseTwo())).end()
                 .end()
                 .to("mock:c");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListIssueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListIssueTest.java
Fri Apr  6 17:28:25 2012
@@ -28,7 +28,7 @@ public class RetryContextScopedUntilReci
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                onException(Exception.class).retryWhile(bean("myRetryBean")).end();
+                onException(Exception.class).retryWhile(method("myRetryBean")).end();
                 
                 from("seda:start")
                     .recipientList(header("recipientListHeader"))

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListParallelIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListParallelIssueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListParallelIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryContextScopedUntilRecipientListParallelIssueTest.java
Fri Apr  6 17:28:25 2012
@@ -28,7 +28,7 @@ public class RetryContextScopedUntilReci
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                onException(Exception.class).retryWhile(bean("myRetryBean")).end();
+                onException(Exception.class).retryWhile(method("myRetryBean")).end();
 
                 from("seda:start")
                     .recipientList(header("recipientListHeader")).parallelProcessing()

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListIssueTest.java
Fri Apr  6 17:28:25 2012
@@ -257,7 +257,7 @@ public class RetryRouteScopedUntilRecipi
             @Override
             public void configure() throws Exception {
                 from("seda:start")
-                    .onException(Exception.class).retryWhile(bean("myRetryBean")).end()
+                    .onException(Exception.class).retryWhile(method("myRetryBean")).end()
                     .recipientList(header("recipientListHeader"))
                     .to("mock:result");
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListParallelIssueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListParallelIssueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListParallelIssueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/issues/RetryRouteScopedUntilRecipientListParallelIssueTest.java
Fri Apr  6 17:28:25 2012
@@ -30,7 +30,7 @@ public class RetryRouteScopedUntilRecipi
             public void configure() throws Exception {
 
                 from("seda:start")
-                    .onException(Exception.class).retryWhile(bean("myRetryBean")).end()
+                    .onException(Exception.class).retryWhile(method("myRetryBean")).end()
                     .recipientList(header("recipientListHeader")).parallelProcessing()
                     .to("mock:result");
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceWhenBeanExpressionWithExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceWhenBeanExpressionWithExceptionTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceWhenBeanExpressionWithExceptionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/ChoiceWhenBeanExpressionWithExceptionTest.java
Fri Apr  6 17:28:25 2012
@@ -80,7 +80,7 @@ public class ChoiceWhenBeanExpressionWit
             public void configure() {                
                 from("direct:expression")
                     .choice()
-                        .when().expression(bean(MyBean.class, "isGradeA")).to("mock:gradeA")
+                        .when(method(MyBean.class, "isGradeA")).to("mock:gradeA")
                         .otherwise().to("mock:otherGrade")
                     .end();
                 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/DynamicRouterTest.java
Fri Apr  6 17:28:25 2012
@@ -58,7 +58,7 @@ public class DynamicRouterTest extends C
                 // START SNIPPET: e1
                 from("direct:start")
                     // use a bean as the dynamic router
-                    .dynamicRouter(bean(DynamicRouterTest.class, "slip"));
+                    .dynamicRouter(method(DynamicRouterTest.class, "slip"));
                 // END SNIPPET: e1
 
                 from("direct:foo").transform(constant("Bye World")).to("mock:foo");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListBeanTest.java
Fri Apr  6 17:28:25 2012
@@ -63,8 +63,8 @@ public class RecipientListBeanTest exten
     protected RouteBuilder createRouteBuilder() {
         return new RouteBuilder() {
             public void configure() {
-                from("direct:start").recipientList(bean("myBean", "foo")).to("mock:result");
-                from("direct:params").recipientList(bean("myBean", "bar(${header.one}, ${header.two})"),
",").to("mock:result");
+                from("direct:start").recipientList(method("myBean", "foo")).to("mock:result");
+                from("direct:params").recipientList(method("myBean", "bar(${header.one},
${header.two})"), ",").to("mock:result");
 
                 from("direct:a").transform(constant("Hello a"));
                 from("direct:b").transform(constant("Hello b"));

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListReturnValueTest.java
Fri Apr  6 17:28:25 2012
@@ -64,7 +64,7 @@ public class RecipientListReturnValueTes
                 getContext().addInterceptStrategy(new Tracer());
                 
                 from("direct:beanRef").beanRef("myBean", "route");
-                from("direct:recipientList").recipientList(bean("myBean", "recipientList"));
+                from("direct:recipientList").recipientList().method("myBean", "recipientList");
 
                 from("direct:a").transform(constant("Hello a")).to("mock:a");
                 from("direct:b").transform(constant("Hello b")).to("mock:b");

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListThrowExceptionSubRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListThrowExceptionSubRouteTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListThrowExceptionSubRouteTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RecipientListThrowExceptionSubRouteTest.java
Fri Apr  6 17:28:25 2012
@@ -44,7 +44,7 @@ public class RecipientListThrowException
                     .onException(Exception.class)
                         .to("mock:error")
                     .end()
-                    .recipientList(bean(Router.class));
+                    .recipientList(method(Router.class));
             }
         });
         context.start();
@@ -69,7 +69,7 @@ public class RecipientListThrowException
 
                 from("direct:child")
                     .errorHandler(noErrorHandler())
-                    .recipientList(bean(Router.class));
+                    .recipientList(method(Router.class));
             }
         });
         context.start();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutingSlipNoSuchEndpointExceptionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutingSlipNoSuchEndpointExceptionTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutingSlipNoSuchEndpointExceptionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/RoutingSlipNoSuchEndpointExceptionTest.java
Fri Apr  6 17:28:25 2012
@@ -44,7 +44,7 @@ public class RoutingSlipNoSuchEndpointEx
                     .onException(Exception.class)
                         .to("mock:error")
                     .end()
-                    .routingSlip(bean(Router.class));
+                    .routingSlip(method(Router.class));
             }
         });
         context.start();
@@ -69,7 +69,7 @@ public class RoutingSlipNoSuchEndpointEx
 
                 from("direct:child")
                     .errorHandler(noErrorHandler())
-                    .routingSlip(bean(Router.class));
+                    .routingSlip(method(Router.class));
             }
         });
         context.start();

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/DefaultErrorHandlerRetryWhileTest.java
Fri Apr  6 17:28:25 2012
@@ -47,7 +47,7 @@ public class DefaultErrorHandlerRetryWhi
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                errorHandler(defaultErrorHandler().retryWhile(bean("myRetryHandler")));
+                errorHandler(defaultErrorHandler().retryWhile(method("myRetryHandler")));
 
                 from("direct:start").process(new MyProcessor());
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceTest.java
Fri Apr  6 17:28:25 2012
@@ -97,7 +97,7 @@ public class OnExceptionFromChoiceTest e
 
                 from("direct:start")
                     .choice()
-                        .when(bean("myServiceBean").isEqualTo("James")).to("mock:when")
+                        .when(method("myServiceBean").isEqualTo("James")).to("mock:when")
                     .otherwise()
                         .to("mock:otherwise");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceUseOriginalBodyTest.java
Fri Apr  6 17:28:25 2012
@@ -104,7 +104,7 @@ public class OnExceptionFromChoiceUseOri
 
                 from("direct:route")
                     .choice()
-                        .when(bean("myServiceBean").isEqualTo("James")).to("mock:when")
+                        .when(method("myServiceBean").isEqualTo("James")).to("mock:when")
                     .otherwise()
                         .to("mock:otherwise");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceWithDefaultErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceWithDefaultErrorHandlerTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceWithDefaultErrorHandlerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionFromChoiceWithDefaultErrorHandlerTest.java
Fri Apr  6 17:28:25 2012
@@ -33,7 +33,7 @@ public class OnExceptionFromChoiceWithDe
 
                 from("direct:start")
                     .choice()
-                        .when(bean("myServiceBean").isEqualTo("James")).to("mock:when")
+                        .when(method("myServiceBean").isEqualTo("James")).to("mock:when")
                     .otherwise()
                         .to("mock:otherwise");
             }

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=1310491&r1=1310490&r2=1310491&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
Fri Apr  6 17:28:25 2012
@@ -52,7 +52,7 @@ public class OnExceptionRetryUntilTest e
                 // where we defined at most 1 redelivery attempt. Here we will continue until
                 // the predicate returns false
                 onException(MyFunctionalException.class)
-                        .retryWhile(bean("myRetryHandler"))
+                        .retryWhile(method("myRetryHandler"))
                         .handled(true)
                         .transform().constant("Sorry");
                 // END SNIPPET: e1

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/onexception/OnExceptionRetryUntilWithDefaultErrorHandlerTest.java
Fri Apr  6 17:28:25 2012
@@ -47,7 +47,7 @@ public class OnExceptionRetryUntilWithDe
                 errorHandler(defaultErrorHandler().maximumRedeliveries(1).logStackTrace(false));
 
                 onException(MyFunctionalException.class)
-                        .retryWhile(bean("myRetryHandler"))
+                        .retryWhile(method("myRetryHandler"))
                         .handled(true)
                         .transform().constant("Sorry").stop();
 

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java?rev=1310491&r1=1310490&r2=1310491&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/util/DumpModelAsXmlRouteExpressionTest.java
Fri Apr  6 17:28:25 2012
@@ -85,7 +85,7 @@ public class DumpModelAsXmlRouteExpressi
                    .to("mock:result");
 
                 from("direct:bean").routeId("myBeanRoute")
-                   .setHeader("foo", bean("myCoolBean"))
+                   .setHeader("foo", method("myCoolBean"))
                    .to("mock:result");
             }
         };



Mime
View raw message