camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r560182 - in /activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl: CustomerEntity.java CustomerTransformer.java EtlRoutes.java Main.java PersonDocument.java
Date Fri, 27 Jul 2007 10:14:40 GMT
Author: jstrachan
Date: Fri Jul 27 03:14:37 2007
New Revision: 560182

URL: http://svn.apache.org/viewvc?view=rev&rev=560182
Log:
added snippet macros

Modified:
    activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
    activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
    activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
    activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java
    activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java?view=diff&rev=560182&r1=560181&r2=560182
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
(original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerEntity.java
Fri Jul 27 03:14:37 2007
@@ -38,7 +38,7 @@
     private String phone;
 
     public String toString() {
-        return "Customer[userName: "+ userName + " firstName: " + firstName + " surname:
" + surname + "]";
+        return "Customer[userName: " + userName + " firstName: " + firstName + " surname:
" + surname + "]";
     }
 
     @Id

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java?view=diff&rev=560182&r1=560181&r2=560182
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
(original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/CustomerTransformer.java
Fri Jul 27 03:14:37 2007
@@ -29,6 +29,7 @@
  *
  * @version $Revision: 1.1 $
  */
+// START SNIPPET: example
 @Converter
 public class CustomerTransformer {
     private static final transient Log log = LogFactory.getLog(CustomerTransformer.class);
@@ -72,3 +73,4 @@
         }
     }
 }
+// END SNIPPET: example

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java?view=diff&rev=560182&r1=560181&r2=560182
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
(original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/EtlRoutes.java
Fri Jul 27 03:14:37 2007
@@ -18,27 +18,16 @@
 package org.apache.camel.example.etl;
 
 import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.Processor;
-import org.apache.camel.Exchange;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision: 1.1 $
  */
+// START SNIPPET: example
 public class EtlRoutes extends RouteBuilder {
-    private static final transient Log log = LogFactory.getLog(EtlRoutes.class);
-
     public void configure() throws Exception {
-        from("file:src/data?noop=true").convertBodyTo(PersonDocument.class).to("jpa:org.apache.camel.example.etl.CustomerEntity");
-
-/*
-        from("file:src/data?noop=true").convertBodyTo(PersonDocument.class).process(new Processor()
{
-            public void process(Exchange exchange) throws Exception {
-                System.out.println("Body is: " + exchange.getIn().getBody());
-                log.info("Body is: " + exchange.getIn().getBody());
-            }
-        });
-*/
+        from("file:src/data?noop=true").
+                convertBodyTo(PersonDocument.class).
+                to("jpa:org.apache.camel.example.etl.CustomerEntity");
     }
 }
+// END SNIPPET: example

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java?view=diff&rev=560182&r1=560181&r2=560182
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java
(original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/Main.java
Fri Jul 27 03:14:37 2007
@@ -23,7 +23,6 @@
  * @version $Revision: 1.1 $
  */
 public class Main extends org.apache.camel.spring.Main {
-
     public static void main(String[] args) {
         new Main().run(args);
     }

Modified: activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java?view=diff&rev=560182&r1=560181&r2=560182
==============================================================================
--- activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java
(original)
+++ activemq/camel/trunk/examples/camel-example-etl/src/main/java/org/apache/camel/example/etl/PersonDocument.java
Fri Jul 27 03:14:37 2007
@@ -17,16 +17,16 @@
  */
 package org.apache.camel.example.etl;
 
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
 import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
 
 /**
  * @version $Revision: 1.1 $
  */
-@XmlRootElement(name="person")
+@XmlRootElement(name = "person")
 @XmlAccessorType(XmlAccessType.FIELD)
 public class PersonDocument {
     @XmlAttribute



Mime
View raw message