CAMEL-6962 Allow binding name to be specified in JibxDataFormat with thanks to 
Peter


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

Branch: refs/heads/camel-2.11.x
Commit: e99e6c5a0e5e9549a10370d780f9a186673b13b4
Parents: f1a530b
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Nov 14 09:35:00 2013 +0100
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Nov 14 09:35:40 2013 +0100

----------------------------------------------------------------------
 .../apache/camel/model/dataformat/JibxDataFormat.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e99e6c5a/camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
index 24bf47c..60da79b 100644
--- 
a/camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
+++ 
b/camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
@@ -35,6 +35,8 @@ import org.apache.camel.util.ObjectHelper;
 public class JibxDataFormat extends DataFormatDefinition {
     @XmlAttribute(name = "unmarshallClass")
     private String unmarshallTypeName;
+    @XmlAttribute
+    private String bindingName;
     @XmlTransient
     private Class<?> unmarshallClass;
 
@@ -63,6 +65,14 @@ public class JibxDataFormat extends DataFormatDefinition {
         this.unmarshallTypeName = unmarshallTypeName;
     }
 
+    public String getBindingName() {
+        return bindingName;
+    }
+
+    public void setBindingName(String bindingName) {
+        this.bindingName = bindingName;
+    }
+
     @Override
     protected DataFormat createDataFormat(RouteContext routeContext) {
         if (unmarshallClass == null && unmarshallTypeName != null) {
@@ -81,6 +91,9 @@ public class JibxDataFormat extends DataFormatDefinition {
         if (unmarshallClass != null) {
             setProperty(dataFormat, "unmarshallClass", unmarshallClass);
         }
+        if (bindingName != null) {
+            setProperty(camelContext, dataFormat, "bindingName", bindingName);
+        }
     }
 
 }
\ No newline at end of file

Reply via email to