Package org.apache.camel.support
Class ScriptHelper
- java.lang.Object
-
- org.apache.camel.support.ScriptHelper
-
public final class ScriptHelper extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasExternalScript(String external)
static String
resolveOptionalExternalScript(org.apache.camel.CamelContext camelContext, String expression)
Resolves the expression/predicate whether it refers to an external script on the file/classpath etc.static String
resolveOptionalExternalScript(org.apache.camel.CamelContext camelContext, org.apache.camel.Exchange exchange, String expression)
Resolves the expression/predicate whether it refers to an external script on the file/classpath etc.
-
-
-
Method Detail
-
resolveOptionalExternalScript
public static String resolveOptionalExternalScript(org.apache.camel.CamelContext camelContext, String expression)
Resolves the expression/predicate whether it refers to an external script on the file/classpath etc. This requires to use the prefix resource: such as resource:classpath:com/foo/myscript.groovy, resource:file:/var/myscript.groovy. If not then the returned value is returned as-is.
-
resolveOptionalExternalScript
public static String resolveOptionalExternalScript(org.apache.camel.CamelContext camelContext, org.apache.camel.Exchange exchange, String expression)
Resolves the expression/predicate whether it refers to an external script on the file/classpath etc. This requires to use the prefix resource: such as resource:classpath:com/foo/myscript.groovy, resource:file:/var/myscript.groovy. If not then the returned value is returned as-is. If the exchange is provided (not null), then the external script can be referred via simple language for dynamic values, etc. resource:classpath:${header.myFileName}
-
hasExternalScript
public static boolean hasExternalScript(String external)
-
-