Class PredicateAdapter
java.lang.Object
org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
org.openehealth.ipf.platform.camel.core.adapter.PredicateAdapter
Adapts a
Predicate
.- Author:
- Martin Krasser
-
Constructor Summary
ConstructorDescriptionPredicateAdapter
(Predicate predicate) Creates a newPredicateAdapter
and sets the delegatePredicate
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
assertMatches
(String text, Exchange exchange) input
(Expression inputExpression) Sets anExpression
for obtaining input data from anExchange
.boolean
Delegates matching to the delegatePredicate
applying input- and paramsExpression
s.params
(Expression paramsExpression) Sets anExpression
for obtaining input params from anExchange
.staticParams
(Object... params) Configures this adapter to use the givenparams
independent of theExchange
to be processed.Methods inherited from class org.openehealth.ipf.platform.camel.core.adapter.AdapterSupport
adaptInput, adaptParams, input, params
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.camel.Predicate
init, initPredicate
-
Constructor Details
-
PredicateAdapter
Creates a newPredicateAdapter
and sets the delegatePredicate
.- Parameters:
predicate
- a predicate.
-
-
Method Details
-
input
Description copied from interface:Adapter
Sets anExpression
for obtaining input data from anExchange
. Input data are passed to adapted modules API implementations.- Specified by:
input
in interfaceAdapter
- Overrides:
input
in classAdapterSupport
- Parameters:
inputExpression
- expression for obtaining input data.- Returns:
- this object.
-
params
Description copied from interface:Adapter
Sets anExpression
for obtaining input params from anExchange
. Input params are passed to adapted modules API implementations.- Specified by:
params
in interfaceAdapter
- Overrides:
params
in classAdapterSupport
- Parameters:
paramsExpression
- expression for obtaining input params.- Returns:
- this object.
-
staticParams
Description copied from interface:Adapter
Configures this adapter to use the givenparams
independent of theExchange
to be processed.- Specified by:
staticParams
in interfaceAdapter
- Overrides:
staticParams
in classAdapterSupport
- Parameters:
params
- expression for obtaining input params.- Returns:
- this object.
-
matches
Delegates matching to the delegatePredicate
applying input- and paramsExpression
s. -
assertMatches
- Throws:
AssertionError
-