camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r725351 - in /activemq/camel/trunk/camel-core/src/main: java/org/apache/camel/model/ resources/org/apache/camel/model/
Date Wed, 10 Dec 2008 17:29:07 GMT
Author: jstrachan
Date: Wed Dec 10 09:29:06 2008
New Revision: 725351

URL: http://svn.apache.org/viewvc?rev=725351&view=rev
Log:
fixed the <setExchangePattern> to use the ExchangePattern enum rather than an arbitrary
string

Added:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java
  (contents, props changed)
      - copied, changed from r725338, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java
Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
    activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java?rev=725351&r1=725350&r2=725351&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorType.java
Wed Dec 10 09:29:06 2008
@@ -1663,7 +1663,7 @@
      * @return the builder
      */
     public Type setExchangePattern(ExchangePattern exchangePattern) {
-        addOutput(new ExchangePatternType(exchangePattern));
+        addOutput(new SetExchangePatternType(exchangePattern));
         return (Type) this;
     }
     

Copied: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java
(from r725338, activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java)
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java?p2=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java&p1=activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java&r1=725338&r2=725351&rev=725351&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ExchangePatternType.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java
Wed Dec 10 09:29:06 2008
@@ -32,46 +32,32 @@
 import org.apache.camel.util.ObjectHelper;
 
 /**
- * Represents an XML &lt;SetExchangePattern/&gt; element
+ * Represents an XML &lt;setExchangePattern/&gt; element
  *
  * @version $Revision$
  */
 @XmlRootElement(name = "setExchangePattern")
 @XmlAccessorType(XmlAccessType.FIELD)
-public class ExchangePatternType extends OutputType {    
-    @XmlAttribute(name = "pattern", required = true)
-    private String pattern;
-    @XmlTransient
-    private ExchangePattern exchangePattern;
+public class SetExchangePatternType extends OutputType {
+    @XmlAttribute(required = true)
+    private ExchangePattern pattern;
     @XmlTransient
     private ExchangePatternProcessor processor;
     
-    public ExchangePatternType() {
+    public SetExchangePatternType() {
     }
 
-    public ExchangePatternType(ExchangePattern ep) {
-        exchangePattern = ep;
-        pattern = exchangePattern.toString();
-    }
-    
-    public void setPattern(String pattern) {
-        this.pattern = pattern;        
-        exchangePattern = ExchangePattern.asEnum(pattern);        
+    public SetExchangePatternType(ExchangePattern pattern) {
+        this.pattern = pattern;
     }
-    
-    public String getPattern() {
+
+
+    public ExchangePattern getPattern() {
         return pattern;
     }
 
-    public ExchangePattern getExchangePattern() {
-        if (exchangePattern == null) {
-            if (pattern != null) {
-                exchangePattern = ExchangePattern.asEnum(pattern);
-            } else {
-                exchangePattern = ExchangePattern.InOnly;
-            }
-        }
-        return exchangePattern;        
+    public void setPattern(ExchangePattern pattern) {
+        this.pattern = pattern;
     }
 
     @Override
@@ -82,19 +68,19 @@
     @Override
     public String toString() {
         return "setExchangePattern["
-                + "exchangePattern: " + exchangePattern
+                + "pattern: " + pattern
                 + "]";
     }
 
     @Override
     public String getLabel() {
-        return "exchangePattern: " + exchangePattern;
+        return "setExchangePattern: " + pattern;
     }
    
     @Override
     public Processor createProcessor(RouteContext routeContext) {
         if (processor == null) {
-            processor = new ExchangePatternProcessor(getExchangePattern());
+            processor = new ExchangePatternProcessor(getPattern());
         }
         return processor;
     }

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternType.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index?rev=725351&r1=725350&r2=725351&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index (original)
+++ activemq/camel/trunk/camel-core/src/main/resources/org/apache/camel/model/jaxb.index Wed
Dec 10 09:29:06 2008
@@ -22,7 +22,6 @@
 DelayerType
 Description
 ExceptionType
-ExchangePatternType
 ExpressionSubElementType
 FilterType
 FinallyType
@@ -54,6 +53,7 @@
 RoutesType
 RoutingSlipType
 SetBodyType
+SetExchangePatternType
 SetHeaderType
 SetOutHeaderType
 SetPropertyType



Mime
View raw message