@ComponentProfile(summary="Tests that a configured value matches the supplied value.", tag="conditional,operator") public class Matches extends java.lang.Object implements Operator
This Operator
simply tests two values for using String.matches(String)
.
The first value used in the equality test is the Condition
that this Operator
is
configured for; which could be the message payload or a metadata item for example.
The second value is the static value configured for this operator.
The static value can be a literal value; "myValue" or can be metadata resolved for example;
The above will test the metadata value identified by the metadata key "myKey".%message{myKey}
In the adapter configuration file this class is aliased as matches which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
Matches() |
Modifier and Type | Method and Description |
---|---|
boolean |
apply(AdaptrisMessage msg,
java.lang.String obj) |
java.lang.String |
getValue() |
void |
setValue(java.lang.String value)
Set the value to match against.
|
public boolean apply(AdaptrisMessage msg, java.lang.String obj)
public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the value which conforms to a Pattern
.