You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2017/04/11 18:04:51 UTC

[5/5] camel git commit: CAMEL-11135: Polished. This closes #1614

CAMEL-11135: Polished. This closes #1614


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

Branch: refs/heads/master
Commit: ab184230708b868ac643de4db5609c1a18f36fcf
Parents: 04d584f
Author: Claus Ibsen <da...@apache.org>
Authored: Tue Apr 11 20:04:39 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Apr 11 20:04:39 2017 +0200

----------------------------------------------------------------------
 .../org/apache/camel/model/dataformat/ProtobufDataFormat.java | 7 ++++---
 .../camel-protobuf/src/main/docs/protobuf-dataformat.adoc     | 2 +-
 .../protobuf/springboot/ProtobufDataFormatConfiguration.java  | 5 +++--
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
index dee0ec4..1d1146b1 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/ProtobufDataFormat.java
@@ -38,7 +38,7 @@ import org.apache.camel.spi.Metadata;
 public class ProtobufDataFormat extends DataFormatDefinition {
     @XmlAttribute
     private String instanceClass;
-    @XmlAttribute
+    @XmlAttribute @Metadata(enums = "native,json", defaultValue = "native")
     private String contentTypeFormat;
     @XmlTransient
     private Object defaultInstance;
@@ -71,8 +71,9 @@ public class ProtobufDataFormat extends DataFormatDefinition {
     
     /**
      * Defines a content type format in which protobuf message will be
-     * serialized/deserialized from(to) the Java been. It can be native protobuf
-     * format or json fields representation. The default value is 'native'.
+     * serialized/deserialized from(to) the Java been.
+     * The format can either be native or json for either native protobuf or json fields representation.
+     * The default value is native.
      */
     public void setContentTypeFormat(String contentTypeFormat) {
         this.contentTypeFormat = contentTypeFormat;

http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
----------------------------------------------------------------------
diff --git a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
index 61276e3..c832c73 100644
--- a/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
+++ b/components/camel-protobuf/src/main/docs/protobuf-dataformat.adoc
@@ -32,7 +32,7 @@ The Protobuf dataformat supports 3 options which are listed below.
 |=======================================================================
 | Name | Default | Java Type | Description
 | instanceClass |  | String | Name of class to use when unarmshalling
-| contentTypeFormat |  | String | Defines a content type format in which protobuf message will be serialized/deserialized from(to) the Java been. It can be native protobuf format or json fields representation. The default value is 'native'.
+| contentTypeFormat | native | String | Defines a content type format in which protobuf message will be serialized/deserialized from(to) the Java been. The format can either be native or json for either native protobuf or json fields representation. The default value is native.
 | contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML or application/json for data formats marshalling to JSon etc.
 |=======================================================================
 // dataformat options: END

http://git-wip-us.apache.org/repos/asf/camel/blob/ab184230/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
----------------------------------------------------------------------
diff --git a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
index be7267c..7b693cc 100644
--- a/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
+++ b/platforms/spring-boot/components-starter/camel-protobuf-starter/src/main/java/org/apache/camel/dataformat/protobuf/springboot/ProtobufDataFormatConfiguration.java
@@ -32,8 +32,9 @@ public class ProtobufDataFormatConfiguration {
     private String instanceClass;
     /**
      * Defines a content type format in which protobuf message will be
-     * serialized/deserialized from(to) the Java been. It can be native protobuf
-     * format or json fields representation. The default value is 'native'.
+     * serialized/deserialized from(to) the Java been. The format can either be
+     * native or json for either native protobuf or json fields representation.
+     * The default value is native.
      */
     private String contentTypeFormat;
     /**