Class Matches
- java.lang.Object
-
- com.adaptris.core.services.conditional.operator.Matches
-
- All Implemented Interfaces:
Operator
@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 usingString.matches(String)
.The first value used in the equality test is the
Condition
that thisOperator
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;
%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 Summary
Constructors Constructor Description Matches()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.java.lang.String
toString()
-
-
-
Method Detail
-
apply
public boolean apply(AdaptrisMessage msg, java.lang.String obj)
-
getValue
public java.lang.String getValue()
-
setValue
public void setValue(java.lang.String value)
Set the value to match against.- Parameters:
value
- the value which conforms to aPattern
.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-