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/fee86db4
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/fee86db4
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/fee86db4

Branch: refs/heads/camel-2.12.x
Commit: fee86db47797b046835e55564dba377677dab2b9
Parents: 7bebdc9
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:54 2013 +0100

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


http://git-wip-us.apache.org/repos/asf/camel/blob/fee86db4/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 c9ffe8d..d670720 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
@@ -36,6 +36,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;
 
@@ -64,6 +66,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) {
@@ -82,6 +92,9 @@ public class JibxDataFormat extends DataFormatDefinition {
         if (unmarshallClass != null) {
             setProperty(camelContext, dataFormat, "unmarshallClass", 
unmarshallClass);
         }
+        if (bindingName != null) {
+            setProperty(camelContext, dataFormat, "bindingName", bindingName);
+        }
     }
 
 }
\ No newline at end of file

Reply via email to