org.apache.camel.model.FilterDefinition Java Examples
The following examples show how to use
org.apache.camel.model.FilterDefinition.
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: AbstractFilterStepHandler.java From syndesis with Apache License 2.0 | 5 votes |
@Override public Optional<ProcessorDefinition<?>> handle(Step step, ProcessorDefinition<?> route, IntegrationRouteBuilder builder, String flowIndex, String stepIndex) { ObjectHelper.notNull(route, "route"); final String expression = ObjectHelper.notNull(getFilterExpression(step), "expression"); final CamelContext context = builder.getContext(); final Predicate predicate = new JsonSimplePredicate(expression, context); final FilterDefinition filter = route.filter(predicate); return Optional.of(filter); }
Example #2
Source File: CamelModelUtilsTest.java From fabric8-forge with Apache License 2.0 | 4 votes |
@Test public void testCanImport() throws Exception { assertCanAcceptInput(MarshalDefinition.class, false); assertCanAcceptInput(BeanDefinition.class, false); assertCanAcceptInput(FilterDefinition.class, true); }