@Metadata(label="language",
title="Expression")
public class ExpressionDefinition
extends Object
implements org.apache.camel.Expression, org.apache.camel.Predicate, OtherAttributesAware, org.apache.camel.ExpressionFactory, DefinitionPropertyPlaceholderConfigurer
| Constructor and Description |
|---|
ExpressionDefinition() |
ExpressionDefinition(org.apache.camel.Expression expression) |
ExpressionDefinition(org.apache.camel.Predicate predicate) |
ExpressionDefinition(String expression) |
| Modifier and Type | Method and Description |
|---|---|
void |
assertMatches(String text,
org.apache.camel.Exchange exchange) |
protected void |
configureExpression(org.apache.camel.CamelContext camelContext,
org.apache.camel.Expression expression) |
protected void |
configurePredicate(org.apache.camel.CamelContext camelContext,
org.apache.camel.Predicate predicate) |
org.apache.camel.Expression |
createExpression(org.apache.camel.CamelContext camelContext) |
org.apache.camel.Expression |
createExpression(org.apache.camel.spi.RouteContext routeContext) |
org.apache.camel.Predicate |
createPredicate(org.apache.camel.CamelContext camelContext) |
org.apache.camel.Predicate |
createPredicate(org.apache.camel.spi.RouteContext routeContext) |
Object |
evaluate(org.apache.camel.Exchange exchange) |
<T> T |
evaluate(org.apache.camel.Exchange exchange,
Class<T> type) |
String |
getExpression() |
ExpressionDefinition |
getExpressionType() |
org.apache.camel.Expression |
getExpressionValue() |
String |
getId() |
String |
getLabel()
Returns some descriptive text to describe this node
|
static String |
getLabel(List<ExpressionDefinition> expressions) |
String |
getLanguage() |
Map<QName,Object> |
getOtherAttributes()
Adds optional attribute to use as property placeholder
|
org.apache.camel.Predicate |
getPredicate() |
Boolean |
getTrim() |
boolean |
matches(org.apache.camel.Exchange exchange) |
void |
setExpression(String expression)
The expression value in your chosen language syntax
|
protected void |
setExpressionType(ExpressionDefinition expressionType)
Allows derived classes to set a lazily created expressionType instance
such as if using the
ExpressionClause |
protected void |
setExpressionValue(org.apache.camel.Expression expressionValue) |
void |
setId(String value)
Sets the id of this node
|
void |
setOtherAttributes(Map<QName,Object> otherAttributes)
Adds optional attribute to use as property placeholder
|
protected void |
setProperty(org.apache.camel.CamelContext camelContext,
Object bean,
String name,
Object value)
Sets a named property on the object instance using introspection
|
void |
setTrim(Boolean trim)
Whether to trim the value to remove leading and trailing whitespaces and
line breaks
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetReadPropertyPlaceholderOptions, getWritePropertyPlaceholderOptionspublic ExpressionDefinition()
public ExpressionDefinition(String expression)
public ExpressionDefinition(org.apache.camel.Predicate predicate)
public ExpressionDefinition(org.apache.camel.Expression expression)
public static String getLabel(List<ExpressionDefinition> expressions)
public <T> T evaluate(org.apache.camel.Exchange exchange, Class<T> type)
evaluate in interface org.apache.camel.Expressionpublic void assertMatches(String text, org.apache.camel.Exchange exchange) throws AssertionError
AssertionErrorpublic boolean matches(org.apache.camel.Exchange exchange)
matches in interface org.apache.camel.Predicatepublic String getLanguage()
public final org.apache.camel.Predicate createPredicate(org.apache.camel.spi.RouteContext routeContext)
public org.apache.camel.Predicate createPredicate(org.apache.camel.CamelContext camelContext)
public final org.apache.camel.Expression createExpression(org.apache.camel.spi.RouteContext routeContext)
public org.apache.camel.Expression createExpression(org.apache.camel.CamelContext camelContext)
createExpression in interface org.apache.camel.ExpressionFactorypublic String getExpression()
public void setExpression(String expression)
public org.apache.camel.Predicate getPredicate()
public org.apache.camel.Expression getExpressionValue()
protected void setExpressionValue(org.apache.camel.Expression expressionValue)
public ExpressionDefinition getExpressionType()
public void setTrim(Boolean trim)
public Map<QName,Object> getOtherAttributes()
OtherAttributesAwaregetOtherAttributes in interface OtherAttributesAwarepublic void setOtherAttributes(Map<QName,Object> otherAttributes)
OtherAttributesAwaresetOtherAttributes in interface OtherAttributesAwareprotected void setExpressionType(ExpressionDefinition expressionType)
ExpressionClauseprotected void configurePredicate(org.apache.camel.CamelContext camelContext, org.apache.camel.Predicate predicate)
protected void configureExpression(org.apache.camel.CamelContext camelContext, org.apache.camel.Expression expression)
protected void setProperty(org.apache.camel.CamelContext camelContext, Object bean, String name, Object value)
Apache Camel