You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/11/15 12:34:22 UTC
svn commit: r595273 -
/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java
Author: jstrachan
Date: Thu Nov 15 03:34:15 2007
New Revision: 595273
URL: http://svn.apache.org/viewvc?rev=595273&view=rev
Log:
minor tweak for https://issues.apache.org/activemq/browse/CAMEL-219 to add string() to the DataFormat expression clause
Modified:
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java
Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java?rev=595273&r1=595272&r2=595273&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/DataTypeExpression.java Thu Nov 15 03:34:15 2007
@@ -23,6 +23,7 @@
import org.apache.camel.model.dataformat.DataFormatType;
import org.apache.camel.model.dataformat.JaxbDataFormat;
import org.apache.camel.model.dataformat.SerializationDataFormat;
+import org.apache.camel.model.dataformat.StringDataFormat;
import org.apache.camel.model.dataformat.XMLBeansDataFormat;
import org.apache.camel.model.dataformat.XStreamDataFormat;
import org.apache.camel.spi.DataFormat;
@@ -47,41 +48,6 @@
}
/**
- * Uses the Java Serialization data format
- */
- public T serialization() {
- return dataFormat(new SerializationDataFormat());
- }
-
- /**
- * Uses the JAXB data format
- */
- public T jaxb() {
- return dataFormat(new JaxbDataFormat());
- }
-
- /**
- * Uses the XStream data format
- */
- public T xstream() {
- return dataFormat(new XStreamDataFormat());
- }
-
- /**
- * Uses the JAXB data format turning pretty printing on or off
- */
- public T jaxb(boolean prettyPrint) {
- return dataFormat(new JaxbDataFormat(prettyPrint));
- }
-
- /**
- * Uses the JAXB data format
- */
- public T xmlBeans() {
- return dataFormat(new XMLBeansDataFormat());
- }
-
- /**
* Uses the
* <a href="http://activemq.apache.org/camel/artix-data-services.html">Artix Data Services</a>
* data format for dealing with lots of different message formats such as SWIFT etc.
@@ -119,6 +85,48 @@
*/
public T artixDS(ArtixDSContentType contentType) {
return dataFormat(new ArtixDSDataFormat(contentType));
+ }
+
+ /**
+ * Uses the JAXB data format
+ */
+ public T jaxb() {
+ return dataFormat(new JaxbDataFormat());
+ }
+
+ /**
+ * Uses the JAXB data format turning pretty printing on or off
+ */
+ public T jaxb(boolean prettyPrint) {
+ return dataFormat(new JaxbDataFormat(prettyPrint));
+ }
+
+ /**
+ * Uses the Java Serialization data format
+ */
+ public T serialization() {
+ return dataFormat(new SerializationDataFormat());
+ }
+
+ /**
+ * Uses the String data format
+ */
+ public T string() {
+ return dataFormat(new StringDataFormat());
+ }
+
+ /**
+ * Uses the JAXB data format
+ */
+ public T xmlBeans() {
+ return dataFormat(new XMLBeansDataFormat());
+ }
+
+ /**
+ * Uses the XStream data format
+ */
+ public T xstream() {
+ return dataFormat(new XStreamDataFormat());
}
private T dataFormat(DataFormatType dataFormatType) {