Class AbstractRegexRuleValidator
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.mapping.validation.rules.AbstractRegexRuleValidator
-
- All Implemented Interfaces:
RuleValidator
,org.springframework.core.Ordered
- Direct Known Subclasses:
BooleanRuleValidator
,CollectionRuleValidator
,DateRuleValidator
,IsEmptyCollectionRuleValidator
,LocaleRuleValidator
,MoneyRuleValidator
,NumberRuleValidator
,StringRuleValidator
public abstract class AbstractRegexRuleValidator extends Object implements RuleValidator
Common regex pattern matching leveraged by mostRuleValidator
instances.- Author:
- Jeff Fischer
-
-
Constructor Summary
Constructors Constructor Description AbstractRegexRuleValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Pattern
getPattern()
protected abstract String
getRegex()
A regular expression pattern used to match and validate a SPEL-based rulevoid
init()
RuleValidatorResponse
validate(RuleInspector.RuleExpression target, org.springframework.validation.Errors errors)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.mapping.validation.rules.RuleValidator
getOrder
-
-
-
-
Field Detail
-
pattern
protected Pattern pattern
-
-
Method Detail
-
init
@PostConstruct public void init()
-
validate
public RuleValidatorResponse validate(RuleInspector.RuleExpression target, org.springframework.validation.Errors errors)
- Specified by:
validate
in interfaceRuleValidator
-
getRegex
protected abstract String getRegex()
A regular expression pattern used to match and validate a SPEL-based rule- Returns:
- A regular expression pattern used to match and validate a SPEL-based rule
-
getPattern
public Pattern getPattern()
-
-