EnforcerRule, EnforcerRule2RequireEnvironmentVariable, RequirePropertypublic abstract class AbstractPropertyEnforcerRule extends AbstractNonCacheableEnforcerRule
| Constructor | Description |
|---|---|
AbstractPropertyEnforcerRule() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute(EnforcerRuleHelper helper) |
Execute the rule.
|
abstract String |
getName() |
How the property that is being evaluated is called
|
abstract String |
getPropertyName() |
The name of the property currently being evaluated, this is used for default message pourpouses only
|
String |
getRegex() |
Get the property value to a given regular expression.
|
String |
getRegexMessage() |
Get a warning message if the regular expression is not matched.
|
abstract Object |
resolveValue(EnforcerRuleHelper helper) |
Resolves the property value
|
void |
setRegex(String regex) |
Set the property value to a given regular expression.
|
void |
setRegexMessage(String regexMessage) |
Set a warning message if the regular expression is not matched.
|
getCacheId, isCacheable, isResultValidgetLevel, getMessage, setLevel, setMessagepublic final void setRegex(String regex)
null (any value is ok).regex - The regular expressionpublic final String getRegex()
null (any value is ok).public final void setRegexMessage(String regexMessage)
regexMessage - the regex messagepublic final String getRegexMessage()
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
helper - the helperEnforcerRuleException - the enforcer rule exceptionpublic abstract String getName()
public abstract String getPropertyName()
public abstract Object resolveValue(EnforcerRuleHelper helper) throws EnforcerRuleException
helper - EnforcerRuleExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.