You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2010/11/26 15:49:24 UTC
svn commit: r1039394 -
/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
Author: davsclaus
Date: Fri Nov 26 14:49:23 2010
New Revision: 1039394
URL: http://svn.apache.org/viewvc?rev=1039394&view=rev
Log:
CAMEL-3167: Constant fields from Exchange can now be referred as String in the DSL. Making it easier from Spring XML as you just use Exchange.FILE_NAME and it validates if the field exist or not.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java?rev=1039394&r1=1039393&r2=1039394&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java Fri Nov 26 14:49:23 2010
@@ -479,7 +479,7 @@ public abstract class ProcessorDefinitio
log.trace("There are " + properties.size() + " properties on: " + definition);
}
- // lookup and resolve properties for String based properties
+ // lookup and resolve known constant fields for String based properties
for (Map.Entry entry : properties.entrySet()) {
// the name is always a String
String name = (String) entry.getKey();
@@ -488,7 +488,7 @@ public abstract class ProcessorDefinitio
// we can only resolve String typed values
String text = (String) value;
- // is the value a known field
+ // is the value a known field (currently we only support constants from Exchange.class)
if (text.startsWith("Exchange.")) {
String field = ObjectHelper.after(text, "Exchange.");
String constant = ObjectHelper.lookupConstantFieldValue(Exchange.class, field);