camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r555020 - in /activemq/camel/trunk/components/camel-spring/src: main/java/org/apache/camel/spring/model/ test/java/org/apache/camel/spring/model/ test/resources/org/apache/camel/spring/model/
Date Tue, 10 Jul 2007 17:56:40 GMT
Author: jstrachan
Date: Tue Jul 10 10:56:39 2007
New Revision: 555020

URL: http://svn.apache.org/viewvc?view=rev&rev=555020
Log:
some minor refactoring and moved a test file to the correct source root

Added:
    activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/dynamicRecipientList.xml
  (contents, props changed)
      - copied, changed from r555016, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/dynamicRecipientList.xml
Removed:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/dynamicRecipientList.xml
Modified:
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
    activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/GenerateXmlTest.java
    activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java?view=diff&rev=555020&r1=555019&r2=555020
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/FilterType.java
Tue Jul 10 10:56:39 2007
@@ -35,7 +35,7 @@
 
     @Override
     public String toString() {
-        return "Filter[if: " + getExpression() + " process: " + getProcessor() + "]";
+        return "Filter[if: " + getExpression() + " process: " + getOutputs() + "]";
     }
 
     public ExpressionType getExpression() {

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java?view=diff&rev=555020&r1=555019&r2=555020
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/OutputType.java
Tue Jul 10 10:56:39 2007
@@ -30,21 +30,21 @@
  * @version $Revision: 1.1 $
  */
 public abstract class OutputType extends ProcessorType {
-    protected List<ProcessorType> processor = new ArrayList<ProcessorType>();
+    protected List<ProcessorType> outputs = new ArrayList<ProcessorType>();
 
     @XmlElementRef
-    public List<ProcessorType> getProcessor() {
-        return processor;
+    public List<ProcessorType> getOutputs() {
+        return outputs;
     }
 
-    public void setProcessor(List<ProcessorType> processor) {
-        this.processor = processor;
+    public void setOutputs(List<ProcessorType> outputs) {
+        this.outputs = outputs;
     }
 
     public FilterType filter(ExpressionType expression) {
         FilterType filter = new FilterType();
         filter.setExpression(expression);
-        getProcessor().add(filter);
+        getOutputs().add(filter);
         return filter;
     }
 
@@ -55,7 +55,7 @@
     public OutputType to(String uri) {
         ToType to = new ToType();
         to.setUri(uri);
-        getProcessor().add(to);
+        getOutputs().add(to);
         return this;
     }
 }

Modified: activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java?view=diff&rev=555020&r1=555019&r2=555020
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/RouteType.java
Tue Jul 10 10:56:39 2007
@@ -22,7 +22,6 @@
 import org.apache.camel.Processor;
 import org.apache.camel.builder.ProcessorFactory;
 
-import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 import javax.xml.bind.annotation.XmlTransient;
 import javax.xml.bind.annotation.XmlElementRef;
@@ -37,7 +36,7 @@
 @XmlRootElement(name = "root")
 public class RouteType extends OutputType implements CamelContextAware, ProcessorFactory
{
     private CamelContext camelContext;
-    private List<FromType> from = new ArrayList<FromType>();
+    private List<FromType> inputs = new ArrayList<FromType>();
     private List<InterceptorRef> interceptors = new ArrayList<InterceptorRef>();
 
 /*
@@ -48,19 +47,19 @@
 
     @Override
     public String toString() {
-        return "Route[from: " + from + " processor: " + processor + "]";
+        return "Route[from: " + inputs + " processor: " + outputs + "]";
     }
 
     // Properties
     //-----------------------------------------------------------------------
 
-    @XmlElement(required = true)
-    public List<FromType> getFrom() {
-        return from;
+    @XmlElementRef
+    public List<FromType> getInputs() {
+        return inputs;
     }
 
-    public void setFrom(List<FromType> from) {
-        this.from = from;
+    public void setInputs(List<FromType> inputs) {
+        this.inputs = inputs;
     }
 
     @XmlElementRef
@@ -100,7 +99,7 @@
     // Fluent API
     //-----------------------------------------------------------------------
     public RouteType from(String uri) {
-        getFrom().add(new FromType(uri));
+        getInputs().add(new FromType(uri));
         return this;
     }
 

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/GenerateXmlTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/GenerateXmlTest.java?view=diff&rev=555020&r1=555019&r2=555020
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/GenerateXmlTest.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/GenerateXmlTest.java
Tue Jul 10 10:56:39 2007
@@ -45,7 +45,7 @@
         route.filter(new GroovyExpression("in.headers.any { h -> h.startsWith('foo') }")).
                 to("seda:b");
 
-        List<ProcessorType> list = route.getProcessor();
+        List<ProcessorType> list = route.getOutputs();
         assertEquals("Size of list: " + list, 1, list.size());
 
         dump(context);

Modified: activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java?view=diff&rev=555020&r1=555019&r2=555020
==============================================================================
--- activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java
(original)
+++ activemq/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/spring/model/XmlParseTest.java
Tue Jul 10 10:56:39 2007
@@ -17,7 +17,6 @@
  */
 package org.apache.camel.spring.model;
 
-import org.apache.camel.Route;
 import org.apache.camel.spring.model.language.ExpressionType;
 
 import javax.xml.bind.JAXBException;
@@ -91,29 +90,29 @@
     }
 
     protected void assertProcessor(RouteType route, String processorRef) {
-        ProcessorType processor = assertOneElement(route.getProcessor());
+        ProcessorType processor = assertOneElement(route.getOutputs());
         ProcessorRef to = assertIsInstanceOf(ProcessorRef.class, processor);
         assertEquals("Processor ref", processorRef, to.getRef());
     }
 
     protected void assertTo(RouteType route, String uri) {
-        ProcessorType processor = assertOneElement(route.getProcessor());
+        ProcessorType processor = assertOneElement(route.getOutputs());
         ToType value = assertIsInstanceOf(ToType.class, processor);
         assertEquals("To URI", uri, value.getUri());
     }
 
     protected void assertFrom(RouteType route, String uri) {
-        FromType from = assertOneElement(route.getFrom());
+        FromType from = assertOneElement(route.getInputs());
         assertEquals("From URI", uri, from.getUri());
     }
 
     protected FilterType assertFilter(RouteType route) {
-        ProcessorType processor = assertOneElement(route.getProcessor());
+        ProcessorType processor = assertOneElement(route.getOutputs());
         return assertIsInstanceOf(FilterType.class, processor);
     }
 
     protected RecipientListType assertRecipientList(RouteType route) {
-        ProcessorType processor = assertOneElement(route.getProcessor());
+        ProcessorType processor = assertOneElement(route.getOutputs());
         return assertIsInstanceOf(RecipientListType.class, processor);
     }
 

Copied: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/dynamicRecipientList.xml
(from r555016, activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/dynamicRecipientList.xml)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/dynamicRecipientList.xml?view=diff&rev=555020&p1=activemq/camel/trunk/components/camel-spring/src/main/java/org/apache/camel/spring/model/dynamicRecipientList.xml&r1=555016&p2=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/dynamicRecipientList.xml&r2=555020
==============================================================================
    (empty)

Propchange: activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/model/dynamicRecipientList.xml
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message