public class RegexpContentValidation extends java.lang.Object implements ContentValidation
In the adapter configuration file this class is aliased as xml-content-regexp which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
RegexpContentValidation() |
RegexpContentValidation(java.lang.String pattern) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getMessage()
Get the message that caused
false to be returned |
java.lang.String |
getPattern()
Get the pattern we are matching against.
|
boolean |
isValid(java.lang.String content)
Parse the content and check it's validity.
|
void |
setPattern(java.lang.String pattern)
Set the pattern we are matching against..
|
public RegexpContentValidation()
public RegexpContentValidation(java.lang.String pattern)
public boolean isValid(java.lang.String content)
ContentValidation
isValid
in interface ContentValidation
content
- the content to parse.ContentValidation.isValid(java.lang.String)
public java.lang.String getMessage()
ContentValidation
false
to be returnedgetMessage
in interface ContentValidation
ContentValidation.getMessage()
public final java.lang.String getPattern()
public final void setPattern(java.lang.String pattern)
pattern
- the pattern; default is '.*';