camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1151359 - /camel/trunk/camel-core/src/main/java/org/apache/camel/model/
Date Wed, 27 Jul 2011 07:06:30 GMT
Author: cmueller
Date: Wed Jul 27 07:06:21 2011
New Revision: 1151359

URL: http://svn.apache.org/viewvc?rev=1151359&view=rev
Log:
CAMEL-4180: Improve labels of all model definitions in tracer output a understandable label

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOnlyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOutDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/LogDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoopDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/PipelineDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/PollEnrichDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SamplingDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetOutHeaderDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetPropertyDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SortDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/SplitDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowExceptionDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransformDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/ValidateDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java Wed Jul 27 07:06:21 2011
@@ -119,8 +119,11 @@ public class AggregateDefinition extends
 
     @Override
     public String toString() {
-        String expressionString = (getExpression() != null) ? getExpression().getLabel() : "";     
-        return "Aggregate[" + expressionString + " -> " + getOutputs() + "]";
+        return "Aggregate[" + description() + " -> " + getOutputs() + "]";
+    }
+    
+    protected String description() {
+        return getExpression() != null ? getExpression().getLabel() : "";
     }
 
     @Override
@@ -130,7 +133,7 @@ public class AggregateDefinition extends
 
     @Override
     public String getLabel() {
-        return "aggregate";
+        return "aggregate[" + description() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/BeanDefinition.java Wed Jul 27 07:06:21 2011
@@ -63,7 +63,28 @@ public class BeanDefinition extends NoOu
 
     @Override
     public String toString() {
-        return "Bean[" + getLabel() + "]";
+        return "Bean[" + description() + "]";
+    }
+    
+    public String description() {
+        if (ref != null) {
+            String methodText = "";
+            if (method != null) {
+                methodText = " method: " + method;
+            }
+            return "ref:" + ref + methodText;
+        } else if (bean != null) {
+            return bean.toString();
+        } else if (beanType != null) {
+            return beanType;
+        } else {
+            return "";
+        }
+    }
+    
+    @Override
+    public String getLabel() {
+        return "bean[" + description() + "]";
     }
 
     @Override
@@ -186,21 +207,4 @@ public class BeanDefinition extends NoOu
         }
         return answer;
     }
-
-    @Override
-    public String getLabel() {
-        if (ref != null) {
-            String methodText = "";
-            if (method != null) {
-                methodText = " method: " + method;
-            }
-            return "ref:" + ref + methodText;
-        } else if (bean != null) {
-            return bean.toString();
-        } else if (beanType != null) {
-            return beanType;
-        } else {
-            return "";
-        }
-    }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java Wed Jul 27 07:06:21 2011
@@ -81,7 +81,7 @@ public class CatchDefinition extends Pro
 
     @Override
     public String getLabel() {
-        return getExceptionClasses().toString();
+        return "doCatch[ " + getExceptionClasses() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java Wed Jul 27 07:06:21 2011
@@ -203,11 +203,12 @@ public class ChoiceDefinition extends Pr
 
     @Override
     public String getLabel() {
-        CollectionStringBuffer buffer = new CollectionStringBuffer();
+        CollectionStringBuffer buffer = new CollectionStringBuffer("choice[");
         List<WhenDefinition> list = getWhenClauses();
         for (WhenDefinition whenType : list) {
             buffer.append(whenType.getLabel());
         }
+        buffer.append("]");
         return buffer.toString();
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ConvertBodyDefinition.java Wed Jul 27 07:06:21 2011
@@ -61,13 +61,18 @@ public class ConvertBodyDefinition exten
 
     @Override
     public String toString() {        
-        return "convertBodyTo[" + getType() + "]";
+        return "ConvertBodyTo[" + getType() + "]";
     }
 
     @Override
     public String getShortName() {
         return "convertBodyTo";
     }
+    
+    @Override
+    public String getLabel() {
+        return "convertBodyTo[" + getType() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/DelayDefinition.java Wed Jul 27 07:06:21 2011
@@ -62,7 +62,7 @@ public class DelayDefinition extends Exp
 
     @Override
     public String getLabel() {
-        return "delay";
+        return "delay[" + getExpression() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java Wed Jul 27 07:06:21 2011
@@ -53,6 +53,11 @@ public class DynamicRouterDefinition<Typ
     public String toString() {
         return "DynamicRouter[" + getExpression() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "dynamicRouter[" + getExpression() + "]";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/EnrichDefinition.java Wed Jul 27 07:06:21 2011
@@ -62,7 +62,16 @@ public class EnrichDefinition extends No
     
     @Override
     public String toString() {
-        return "Enrich[" + (resourceUri != null ? resourceUri : "ref:" + resourceRef) + " " + aggregationStrategy + "]";
+        return "Enrich[" + description() + " " + aggregationStrategy + "]";
+    }
+    
+    protected String description() {
+        return FromDefinition.description(resourceUri, resourceRef, (Endpoint) null);
+    }
+    
+    @Override
+    public String getLabel() {
+        return "enrich[" + description() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java Wed Jul 27 07:06:21 2011
@@ -52,6 +52,11 @@ public class FilterDefinition extends Ex
     }
     
     @Override
+    public String getLabel() {
+        return "filter[" + getExpression() + "]";
+    }
+    
+    @Override
     public String getShortName() {
         return "filter";
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java Wed Jul 27 07:06:21 2011
@@ -36,6 +36,11 @@ public class FinallyDefinition extends O
     public String toString() {
         return "DoFinally[" + getOutputs() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "doFinally";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/IdempotentConsumerDefinition.java Wed Jul 27 07:06:21 2011
@@ -58,6 +58,11 @@ public class IdempotentConsumerDefinitio
     public String toString() {
         return "IdempotentConsumer[" + getExpression() + " -> " + getOutputs() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "idempotentConsumer[" + getExpression() + "]";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOnlyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOnlyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOnlyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOnlyDefinition.java Wed Jul 27 07:06:21 2011
@@ -47,6 +47,11 @@ public class InOnlyDefinition extends Se
     public String toString() {
         return "InOnly[" + getLabel() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "inOnly";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOutDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOutDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOutDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/InOutDefinition.java Wed Jul 27 07:06:21 2011
@@ -49,6 +49,11 @@ public class InOutDefinition extends Sen
     }
 
     @Override
+    public String getLabel() {
+        return "inOut";
+    }
+    
+    @Override
     public String getShortName() {
         return "inOut";
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java Wed Jul 27 07:06:21 2011
@@ -71,7 +71,7 @@ public class InterceptSendToEndpointDefi
 
     @Override
     public String getLabel() {
-        return "interceptEndpoint";
+        return "interceptSendToEndpoint[" + uri + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java Wed Jul 27 07:06:21 2011
@@ -292,11 +292,12 @@ public class LoadBalanceDefinition exten
 
     @Override
     public String getLabel() {
-        CollectionStringBuffer buffer = new CollectionStringBuffer();
+        CollectionStringBuffer buffer = new CollectionStringBuffer("loadBalance[");
         List<ProcessorDefinition> list = getOutputs();
         for (ProcessorDefinition processorType : list) {
             buffer.append(processorType.getLabel());
         }
+        buffer.append("]");
         return buffer.toString();
     }
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/LogDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LogDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/LogDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/LogDefinition.java Wed Jul 27 07:06:21 2011
@@ -55,6 +55,11 @@ public class LogDefinition extends NoOut
     public String toString() {
         return "Log[" + message + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "log";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoopDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoopDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoopDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/LoopDefinition.java Wed Jul 27 07:06:21 2011
@@ -87,6 +87,11 @@ public class LoopDefinition extends Expr
     }
     
     @Override
+    public String getLabel() {
+        return "loop[" + getExpression() + "]";
+    }
+    
+    @Override
     public String getShortName() {
         return "loop";
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java Wed Jul 27 07:06:21 2011
@@ -104,21 +104,21 @@ public class MarshalDefinition extends N
 
     @Override
     public String toString() {
-        if (dataFormatType != null) {
-            return "Marshal[" + dataFormatType + "]";
-        } else {
-            return "Marshal[ref:" + ref + "]";
-        }
+        return "Marshal[" + description() + "]";
     }
-
-    @Override
-    public String getShortName() {
-        return "marshal";
+    
+    protected String description() {
+        return dataFormatType != null ? dataFormatType.toString() : "ref:" + ref;
     }
 
     @Override
     public String getLabel() {
-        return toString();
+        return "marshal[" + description() + "]";
+    }
+    
+    @Override
+    public String getShortName() {
+        return "marshal";
     }
 
     public String getRef() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/MulticastDefinition.java Wed Jul 27 07:06:21 2011
@@ -73,6 +73,11 @@ public class MulticastDefinition extends
     }
 
     @Override
+    public String getLabel() {
+        return "multicast";
+    }
+    
+    @Override
     public String getShortName() {
         return "multicast";
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java Wed Jul 27 07:06:21 2011
@@ -113,10 +113,19 @@ public class OnExceptionDefinition exten
 
     @Override
     public String toString() {
-        return "OnException[" + getExceptionClasses() + (onWhen != null ? " " + onWhen : "") + " -> " + getOutputs() + "]";
+        return "OnException[" + description() + " -> " + getOutputs() + "]";
+    }
+    
+    protected String description() {
+        return getExceptionClasses() + (onWhen != null ? " " + onWhen : "");
     }
 
     @Override
+    public String getLabel() {
+        return "onException[" + description() + "]";
+    }
+    
+    @Override
     public boolean isAbstract() {
         return true;
     }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java Wed Jul 27 07:06:21 2011
@@ -54,11 +54,12 @@ public class OtherwiseDefinition extends
 
     @Override
     public String getLabel() {
-        CollectionStringBuffer buffer = new CollectionStringBuffer();
+        CollectionStringBuffer buffer = new CollectionStringBuffer("otherwise[");
         List<ProcessorDefinition> list = getOutputs();
         for (ProcessorDefinition type : list) {
             buffer.append(type.getLabel());
         }
+        buffer.append("]");
         return buffer.toString();
     }
 }

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/PipelineDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PipelineDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/PipelineDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/PipelineDefinition.java Wed Jul 27 07:06:21 2011
@@ -40,6 +40,11 @@ public class PipelineDefinition extends 
     public String getShortName() {
         return "pipeline";
     }
+    
+    @Override
+    public String getLabel() {
+        return "pipeline";
+    }
 
     public Processor createProcessor(RouteContext routeContext) throws Exception {
         return this.createChildProcessor(routeContext, true);

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/PolicyDefinition.java Wed Jul 27 07:06:21 2011
@@ -58,6 +58,14 @@ public class PolicyDefinition extends Ou
     public String toString() {
         return "Policy[" + description() + "]";
     }
+    
+    protected String description() {
+        if (policy != null) {
+            return policy.toString();
+        } else {
+            return "ref:" + ref;
+        }
+    }
 
     @Override
     public String getShortName() {
@@ -68,13 +76,7 @@ public class PolicyDefinition extends Ou
 
     @Override
     public String getLabel() {
-        if (ref != null) {
-            return getShortName() + "[ref:" + ref + "]";
-        } else if (policy != null) {
-            return getShortName() + "[" + policy.toString() + "]";
-        } else {
-            return getShortName();
-        }
+        return getShortName() + "[" + getDescription() + "]";
     }
 
     @Override
@@ -137,14 +139,6 @@ public class PolicyDefinition extends Ou
         return wrap;
     }
 
-    protected String description() {
-        if (policy != null) {
-            return policy.toString();
-        } else {
-            return "ref:" + ref;
-        }
-    }
-
     protected Policy resolvePolicy(RouteContext routeContext) {
         if (policy != null) {
             return policy;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/PollEnrichDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/PollEnrichDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/PollEnrichDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/PollEnrichDefinition.java Wed Jul 27 07:06:21 2011
@@ -61,13 +61,22 @@ public class PollEnrichDefinition extend
 
     @Override
     public String toString() {
-        return "PollEnrich[" + (resourceUri != null ? resourceUri : "ref:" + resourceRef) + " " + aggregationStrategy + "]";
+        return "PollEnrich[" + description() + " " + aggregationStrategy + "]";
+    }
+    
+    protected String description() {
+        return FromDefinition.description(getResourceUri(), getResourceRef(), (Endpoint) null);
     }
 
     @Override
     public String getShortName() {
         return "pollEnrich";
     }
+    
+    @Override
+    public String getLabel() {
+        return "pollEnrich[" + description() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java Wed Jul 27 07:06:21 2011
@@ -88,6 +88,11 @@ public class RecipientListDefinition<Typ
     public String getShortName() {
         return "recipientList";
     }
+    
+    @Override
+    public String getLabel() {
+        return "recipientList[" + getExpression() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RedeliveryPolicyDefinition.java Wed Jul 27 07:06:21 2011
@@ -149,10 +149,11 @@ public class RedeliveryPolicyDefinition 
         return answer;
     }
 
+    @Override
     public String toString() {
         return "RedeliveryPolicy[maximumRedeliveries: " + maximumRedeliveries + "]";
     }
-
+    
     // Fluent API
     //-------------------------------------------------------------------------
 

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RemovePropertyDefinition.java Wed Jul 27 07:06:21 2011
@@ -51,6 +51,11 @@ public class RemovePropertyDefinition ex
     public String getShortName() {
         return "removeProperty";
     }
+    
+    @Override
+    public String getLabel() {
+        return "removeProperty[" + getPropertyName() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java Wed Jul 27 07:06:21 2011
@@ -231,14 +231,10 @@ public class ResequenceDefinition extend
     public String toString() {
         return "Resequencer[" + getExpression() + " -> " + getOutputs() + "]";
     }
-
+    
     @Override
     public String getLabel() {
-        String s = "";
-        if (getExpression() != null) {
-            s = getExpression().getLabel();
-        }
-        return "Resequencer[" + s + "]";
+        return "resequencer[" + (getExpression() != null ? getExpression().getLabel() : "") + "]";
     }
 
     public ResequencerConfig getResequencerConfig() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java Wed Jul 27 07:06:21 2011
@@ -74,6 +74,11 @@ public class RoutingSlipDefinition<Type 
     public String getShortName() {
         return "routingSlip";
     }
+    
+    @Override
+    public String getLabel() {
+        return "routingSlip[" + getExpression() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SamplingDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SamplingDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SamplingDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SamplingDefinition.java Wed Jul 27 07:06:21 2011
@@ -63,11 +63,15 @@ public class SamplingDefinition extends 
     
     @Override
     public String toString() {
+        return "Sample[" + description() + " -> " + getOutputs() + "]";
+    }
+    
+    protected String description() {
         if (messageFrequency != null) {
-            return "Sample[1 Exchange per " + getMessageFrequency() + " messages received -> " + getOutputs() + "]";
+            return "1 Exchange per " + getMessageFrequency() + " messages received";
         } else {
             TimeUnit tu = getUnits() != null ? getUnits() : TimeUnit.SECONDS;
-            return "Sample[1 Exchange per " + getSamplePeriod() + " " + tu.toString().toLowerCase() + " -> " + getOutputs() + "]";
+            return "1 Exchange per " + getSamplePeriod() + " " + tu.toString().toLowerCase();
         }
     }
 
@@ -78,12 +82,7 @@ public class SamplingDefinition extends 
 
     @Override
     public String getLabel() {
-        if (messageFrequency != null) {
-            return "sample[1 Exchange per " + getMessageFrequency() + " messages received]";
-        } else {
-            TimeUnit tu = getUnits() != null ? getUnits() : TimeUnit.SECONDS;
-            return "sample[1 Exchange per " + getSamplePeriod() + " " + tu.name().toLowerCase() + "]";
-        }
+        return "sample[" + description() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetExchangePatternDefinition.java Wed Jul 27 07:06:21 2011
@@ -72,7 +72,7 @@ public class SetExchangePatternDefinitio
 
     @Override
     public String getLabel() {
-        return "setExchangePattern: " + pattern;
+        return "setExchangePattern[" + pattern + "]";
     }
    
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetOutHeaderDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetOutHeaderDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetOutHeaderDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetOutHeaderDefinition.java Wed Jul 27 07:06:21 2011
@@ -58,6 +58,11 @@ public class SetOutHeaderDefinition exte
     public String toString() {
         return "SetOutHeader[" + getHeaderName() + ", " + getExpression() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "setOutHeader[" + getHeaderName() + "]";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetPropertyDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetPropertyDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetPropertyDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SetPropertyDefinition.java Wed Jul 27 07:06:21 2011
@@ -61,6 +61,11 @@ public class SetPropertyDefinition exten
     public String toString() {
         return "SetProperty[" + getPropertyName() + ", " + getExpression() + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "setProperty[" + getPropertyName() + "]";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SortDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SortDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SortDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SortDefinition.java Wed Jul 27 07:06:21 2011
@@ -59,6 +59,11 @@ public class SortDefinition extends NoOu
     public String toString() {
         return "sort[" + getExpression() + " by: " + (comparatorRef != null ? "ref:" + comparatorRef : comparator) + "]";
     }
+    
+    @Override
+    public String getLabel() {
+        return "sort[" + getExpression() + "]";
+    }
 
     @Override
     public String getShortName() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/SplitDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/SplitDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/SplitDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/SplitDefinition.java Wed Jul 27 07:06:21 2011
@@ -87,7 +87,7 @@ public class SplitDefinition extends Exp
 
     @Override
     public String getLabel() {
-        return "split";
+        return "split[" + getExpression() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrottleDefinition.java Wed Jul 27 07:06:21 2011
@@ -64,8 +64,11 @@ public class ThrottleDefinition extends 
 
     @Override
     public String toString() {
-        return "Throttle[" + getExpression() + " request per " + getTimePeriodMillis()
-               + " millis -> " + getOutputs() + "]";
+        return "Throttle[" + description() + " -> " + getOutputs() + "]";
+    }
+    
+    protected String description() {
+        return getExpression() + " request per " + getTimePeriodMillis() + " millis";
     }
 
     @Override
@@ -75,7 +78,7 @@ public class ThrottleDefinition extends 
 
     @Override
     public String getLabel() {
-        return "" + getExpression() + " per " + getTimePeriodMillis() + " (ms)";
+        return "throttle[" + description() + "]";
     }
 
     @Override

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowExceptionDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowExceptionDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowExceptionDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ThrowExceptionDefinition.java Wed Jul 27 07:06:21 2011
@@ -49,9 +49,18 @@ public class ThrowExceptionDefinition ex
 
     @Override
     public String toString() {
-        return "ThrowException[" + (exception != null ? exception.getClass().getCanonicalName() : "ref:" + ref) + "]";
+        return "ThrowException[" + description() + "]";
     }
 
+    protected String description() {
+        return exception != null ? exception.getClass().getCanonicalName() : "ref:" + ref;
+    }
+
+    @Override
+    public String getLabel() {
+        return "throwException[" + description() + "]";
+    }
+    
     @Override
     public Processor createProcessor(RouteContext routeContext) {
         if (ref != null && exception == null) {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java Wed Jul 27 07:06:21 2011
@@ -71,6 +71,16 @@ public class TransactedDefinition extend
     public String toString() {
         return "Transacted[" + description() + "]";
     }
+    
+    protected String description() {
+        if (ref != null) {
+            return "ref:" + ref;
+        } else if (policy != null) {
+            return policy.toString();
+        } else {
+            return "";
+        }
+    }
 
     @Override
     public String getShortName() {
@@ -79,13 +89,7 @@ public class TransactedDefinition extend
 
     @Override
     public String getLabel() {
-        if (ref != null) {
-            return "transacted[ref:" + ref + "]";
-        } else if (policy != null) {
-            return "transacted[" + policy.toString() + "]";
-        } else {
-            return "transacted";
-        }
+        return "transacted[" + description() + "]";
     }
 
     @Override
@@ -147,14 +151,6 @@ public class TransactedDefinition extend
         return wrap;
     }
 
-    protected String description() {
-        if (policy != null) {
-            return policy.toString();
-        } else {
-            return "ref:" + ref;
-        }
-    }
-
     protected Policy resolvePolicy(RouteContext routeContext) {
         if (policy != null) {
             return policy;

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransformDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransformDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransformDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/TransformDefinition.java Wed Jul 27 07:06:21 2011
@@ -48,6 +48,11 @@ public class TransformDefinition extends
     public String getShortName() {
         return "transform";
     }
+    
+    @Override
+    public String getLabel() {
+        return "transform[" + getExpression() + "]";
+    }
 
     @Override
     public Processor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java Wed Jul 27 07:06:21 2011
@@ -104,10 +104,14 @@ public class UnmarshalDefinition extends
 
     @Override
     public String toString() {
+        return "Unmarshal[" + description() + "]";
+    }
+    
+    protected String description() {
         if (dataFormatType != null) {
-            return "Marshal[" + dataFormatType + "]";
+            return dataFormatType.toString();
         } else {
-            return "Marshal[ref:" + ref + "]";
+            return "ref:" + ref;
         }
     }
 
@@ -118,7 +122,7 @@ public class UnmarshalDefinition extends
 
     @Override
     public String getLabel() {
-        return toString();
+        return "unmarshal[" + description() + "]";
     }
 
     public String getRef() {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ValidateDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ValidateDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ValidateDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ValidateDefinition.java Wed Jul 27 07:06:21 2011
@@ -45,6 +45,11 @@ public class ValidateDefinition extends 
     public String getShortName() {
         return "validate";
     }
+    
+    @Override
+    public String getLabel() {
+        return "validate[" + getExpression() + "]";
+    }
 
     @Override
     public PredicateValidatingProcessor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java Wed Jul 27 07:06:21 2011
@@ -44,6 +44,10 @@ public class WhenDefinition extends Expr
 
     @Override
     public String toString() {
+        return "When[" + description() + " -> " + getOutputs() + "]";
+    }
+
+    protected String description() {
         StringBuilder sb = new StringBuilder();
         if (getExpression() != null) {
             String language = getExpression().getLanguage();
@@ -54,14 +58,19 @@ public class WhenDefinition extends Expr
             if (language != null) {
                 sb.append("}");
             }
-        }       
-        return "When[" + sb.toString() + " -> " + getOutputs() + "]";
+        }
+        return sb.toString();
     }
 
     @Override
     public String getShortName() {
         return "when";
     }
+    
+    @Override
+    public String getLabel() {
+        return "when[" + description() + "]";
+    }
 
     @Override
     public FilterProcessor createProcessor(RouteContext routeContext) throws Exception {

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java?rev=1151359&r1=1151358&r2=1151359&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java Wed Jul 27 07:06:21 2011
@@ -120,13 +120,22 @@ public class WireTapDefinition<Type exte
 
     @Override
     public String toString() {
-        return "WireTap[" + getLabel() + "]";
+        return "WireTap[" + description() + "]";
+    }
+    
+    protected String description() {
+        return FromDefinition.description(getUri(), getRef(), getEndpoint());
     }
 
     @Override
     public String getShortName() {
         return "wireTap";
     }
+    
+    @Override
+    public String getLabel() {
+        return "wireTap[" + description() + "]";
+    }
 
     @Override
     @SuppressWarnings("unchecked")
@@ -149,11 +158,6 @@ public class WireTapDefinition<Type exte
         }
     }
 
-    @Override
-    public String getLabel() {
-        return FromDefinition.description(getUri(), getRef(), getEndpoint());
-    }
-
     // Fluent API
     // -------------------------------------------------------------------------
 



Mime
View raw message