org.apache.camel.Expression Java Examples
The following examples show how to use
org.apache.camel.Expression.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RefResource.java From camel-quarkus with Apache License 2.0 | 5 votes |
@Unremovable @Singleton @Named("my-expression") @javax.enterprise.inject.Produces public Expression myExpression() { return new ExpressionAdapter() { @Override public Object evaluate(Exchange exchange) { return exchange.getMessage().getBody(String.class).toUpperCase(); } }; }
Example #2
Source File: SplitAction.java From syndesis-extensions with Apache License 2.0 | 5 votes |
@Override public Optional<ProcessorDefinition<?>> configure(CamelContext context, ProcessorDefinition<?> route, Map<String, Object> parameters) { String languageName = language; String expressionDefinition = expression; if (ObjectHelper.isEmpty(languageName) && ObjectHelper.isEmpty(expressionDefinition)) { route = route.split(Builder.body()); } else if (ObjectHelper.isNotEmpty(expressionDefinition)) { if (ObjectHelper.isEmpty(languageName)) { languageName = "simple"; } // A small hack until https://issues.apache.org/jira/browse/CAMEL-12079 // gets fixed so we can support the 'bean::method' annotation as done by // Function step definition if ("bean".equals(languageName) && expressionDefinition.contains("::")) { expressionDefinition = expressionDefinition.replace("::", "?method="); } final Language splitLanguage = context.resolveLanguage(languageName); final Expression splitExpression = splitLanguage.createExpression(expressionDefinition); route = route.split(splitExpression).aggregationStrategy(new UseOriginalAggregationStrategy(null, false)); } return Optional.of(route); }
Example #3
Source File: FunktionRouteBuilder.java From funktion-connectors with Apache License 2.0 | 5 votes |
protected Expression getMandatoryExpression(Step step, String expression, String language) { Objects.requireNonNull(expression, "No expression specified for step " + step); Language jsonpath = getLanguage(language); Expression answer = jsonpath.createExpression(expression); Objects.requireNonNull(answer, "No expression created from: " + expression); return answer; }
Example #4
Source File: CamelRegistryTest.java From camel-quarkus with Apache License 2.0 | 4 votes |
@Override public Expression createExpression(String expression) { return null; }
Example #5
Source File: CamelCloudServiceCallRefExpressionTest.java From camel-spring-boot with Apache License 2.0 | 4 votes |
@Bean Expression myExpression() { return new SimpleExpression( "http://${header.CamelServiceCallServiceHost}:${header.CamelServiceCallServicePort}/hello" ); }
Example #6
Source File: LoadBalanceStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
@JsonIgnore @Override public void setCorrelationExpression(Expression expression) { super.setCorrelationExpression(expression); }
Example #7
Source File: EnrichStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
@JsonIgnore public void setExpression(Expression expression) { super.setExpression(expression); }
Example #8
Source File: RoutingSlipStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
public Definition() { super((Expression) null, RoutingSlipDefinition.DEFAULT_DELIMITER); }
Example #9
Source File: PollEnrichStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
@JsonIgnore public void setExpression(Expression expression) { super.setExpression(expression); }
Example #10
Source File: AggregateStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
@JsonIgnore public void setExpression(Expression expression) { super.setExpression(expression); }
Example #11
Source File: ResequenceStepParser.java From camel-k-runtime with Apache License 2.0 | 4 votes |
@JsonIgnore public void setExpression(Expression expression) { super.setExpression(expression); }
Example #12
Source File: SplitStepHandler.java From syndesis with Apache License 2.0 | 4 votes |
SplitExpression(Expression delegate) { this.delegate = delegate; }
Example #13
Source File: SplitStepHandler.java From syndesis with Apache License 2.0 | 4 votes |
UnifiedJsonBodyExpression(Expression delegate) { this.delegate = delegate; }
Example #14
Source File: ZipFileSplitterBuilder.java From secure-data-service with Apache License 2.0 | 4 votes |
public static Expression unzip() { return new ZipFileIteratorExpression(); }