camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/2] git commit: CAMEL-6776 Added setProperty DSL into camel-scala
Date Sun, 22 Sep 2013 13:27:28 GMT
CAMEL-6776 Added setProperty DSL into camel-scala


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ef33795e
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ef33795e
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ef33795e

Branch: refs/heads/master
Commit: ef33795edfa9f7bd46648c814d5a9901bd8a02ce
Parents: 1882d55
Author: Willem Jiang <ningjiang@apache.org>
Authored: Sun Sep 22 12:04:18 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Sun Sep 22 19:35:34 2013 +0800

----------------------------------------------------------------------
 .../src/main/scala/org/apache/camel/scala/dsl/DSL.scala          | 1 +
 .../scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala   | 1 +
 .../scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala  | 1 +
 .../src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala | 4 ++++
 4 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ef33795e/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
index 983b36c..9fba58d 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/DSL.scala
@@ -84,6 +84,7 @@ trait DSL {
   def setBody(expression: Exchange => Any) : DSL
   def setFaultBody(expression: Exchange => Any) : DSL
   def setHeader(header: String, expression: Exchange => Any) : DSL
+  def setProperty(header: String, expression: Exchange => Any) : DSL
   def sort[T](expression: Exchange => Any, comparator: Comparator[T] = null) : DSL
   def split(expression: Exchange => Any) : SSplitDefinition
   def stop : DSL

http://git-wip-us.apache.org/repos/asf/camel/blob/ef33795e/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
index 9cc34c4..8b8e692 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/SAbstractDefinition.scala
@@ -129,6 +129,7 @@ abstract class SAbstractDefinition[P <: ProcessorDefinition[_]] extends
DSL with
   def setFaultBody(expression: Exchange => Any) = wrap(target.setFaultBody(expression))
   def setHeader(name: String, expression: Exchange => Any) = wrap(target.setHeader(name,
expression))
   def setExchangePattern(mep: ExchangePattern) = wrap(target.setExchangePattern(mep))
+  def setProperty(name: String, expression: Exchange => Any) = wrap(target.setProperty(name,
expression))
   def sort[T](expression: (Exchange) => Any, comparator: Comparator[T] = null) = wrap(target.sort(expression,
comparator))
   def split(expression: Exchange => Any) = SSplitDefinition(target.split(expression))
   def stop = wrap(target.stop)

http://git-wip-us.apache.org/repos/asf/camel/blob/ef33795e/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
index 16b42e0..bdfdea5 100644
--- a/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
+++ b/components/camel-scala/src/main/scala/org/apache/camel/scala/dsl/builder/RouteBuilder.scala
@@ -177,6 +177,7 @@ class RouteBuilder extends Preamble with DSL with RoutesBuilder with Languages
w
   def setBody(expression : Exchange => Any) = stack.top.setBody(expression)
   def setFaultBody(expression: Exchange => Any) = stack.top.setFaultBody(expression)
   def setHeader(name: String, expression: Exchange => Any) = stack.top.setHeader(name,
expression)
+  def setProperty(name: String, expression: Exchange => Any) = stack.top.setProperty(name,
expression)
   def sort[T](expression: (Exchange) => Any, comparator: Comparator[T] = null) = stack.top.sort(expression,
comparator)
   def split(expression: Exchange => Any) = stack.top.split(expression)
   def stop = stack.top.stop

http://git-wip-us.apache.org/repos/asf/camel/blob/ef33795e/components/camel-scala/src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala
----------------------------------------------------------------------
diff --git a/components/camel-scala/src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala
b/components/camel-scala/src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala
index 85c3699..f625407 100644
--- a/components/camel-scala/src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala
+++ b/components/camel-scala/src/test/scala/org/apache/camel/scala/RichMockEndpoint.scala
@@ -30,6 +30,10 @@ class RichMockEndpoint(val endpoint: MockEndpoint) {
     endpoint.expectedHeaderReceived(name, value)
   }
 
+  def propertyReceived(name: String, value : String) {
+    endpoint.expectedPropertyReceived(name, value)
+  }
+
   def count : Int = endpoint.getExpectedCount
   
   def count_=(count: Int) {


Mime
View raw message