Package com.adaptris.stax.services
Class MatchCondition
- java.lang.Object
-
- com.adaptris.stax.services.MatchCondition
-
- All Implemented Interfaces:
ComponentLifecycle,InputCondition
@ComponentProfile(summary="InputCondition implementation that matches against a specific regular expression", since="3.8.4") public class MatchCondition extends java.lang.Object implements InputConditionInputConditionimplementation that matches against a regular expression.In the adapter configuration file this class is aliased as stax-plugin-match-rule which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description MatchCondition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetMatches()java.lang.StringgetWhen()voidinit()booleanmatches(AdaptrisMessage msg)Whether or not this message should have the plugin applied.voidsetMatches(java.lang.String s)Set the regular expression to matchgetWhen()against.voidsetWhen(java.lang.String s)Specify the value to check against when determining whether to apply the transform plugin.MatchConditionwithMatches(java.lang.String regexp)MatchConditionwithWhen(java.lang.String v)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, start, stop
-
-
-
-
Method Detail
-
init
public void init() throws CoreException- Specified by:
initin interfaceComponentLifecycle- Throws:
CoreException
-
matches
public boolean matches(AdaptrisMessage msg)
Description copied from interface:InputConditionWhether or not this message should have the plugin applied.- Specified by:
matchesin interfaceInputCondition- Parameters:
msg- the message- Returns:
- true or false.
-
getWhen
public java.lang.String getWhen()
-
setWhen
public void setWhen(java.lang.String s)
Specify the value to check against when determining whether to apply the transform plugin.- Parameters:
s- the value, which supports the%message{}syntax to resolve metadata.
-
withWhen
public MatchCondition withWhen(java.lang.String v)
- See Also:
setWhen(String)
-
getMatches
public java.lang.String getMatches()
-
setMatches
public void setMatches(java.lang.String s)
Set the regular expression to matchgetWhen()against.- Parameters:
s- a string that conforms tojava.util.Patternsyntax.
-
withMatches
public MatchCondition withMatches(java.lang.String regexp)
- See Also:
setMatches(String)
-
-