public class RequireEnvironmentVariable extends AbstractPropertyEnforcerRule
| Constructor and Description |
|---|
RequireEnvironmentVariable() |
| Modifier and Type | Method and Description |
|---|---|
String |
getCacheId()
If the rule is to be cached, this id is used as part of the key.
|
String |
getName()
How the property that is being evaluated is called
|
String |
getPropertyName()
The name of the property currently being evaluated, this is used for default message pourpouses only
|
String |
getVariableName() |
boolean |
isCacheable()
This method tells the enforcer if the rule results may be cached.
|
boolean |
isResultValid(EnforcerRule cachedRule)
Checks if cached result is valid.
|
String |
resolveValue(EnforcerRuleHelper helper)
Resolves the property value
|
void |
setVariableName(String variableName) |
execute, getRegex, getRegexMessage, setRegex, setRegexMessagegetLevel, getMessage, setLevel, setMessagepublic RequireEnvironmentVariable()
public final void setVariableName(String variableName)
variableName - the variable namesetVariableName(String),
getVariableName()public final String getVariableName()
public String resolveValue(EnforcerRuleHelper helper)
AbstractPropertyEnforcerRuleresolveValue in class AbstractPropertyEnforcerRulepublic boolean isCacheable()
EnforcerRuleisCacheable in interface EnforcerRuleisCacheable in class AbstractNonCacheableEnforcerRuletrue if rule is cacheablepublic boolean isResultValid(EnforcerRule cachedRule)
EnforcerRuleisResultValid in interface EnforcerRuleisResultValid in class AbstractNonCacheableEnforcerRulecachedRule - the last cached instance of the rule. This is to be used by the rule to
potentially determine if the results are still valid (ie if the configuration has been overridden)true if the stored results are valid for the same id.public String getCacheId()
EnforcerRulegetCacheId in interface EnforcerRulegetCacheId in class AbstractNonCacheableEnforcerRulepublic String getPropertyName()
AbstractPropertyEnforcerRulegetPropertyName in class AbstractPropertyEnforcerRulepublic String getName()
AbstractPropertyEnforcerRulegetName in class AbstractPropertyEnforcerRuleCopyright © 2007–2015 The Apache Software Foundation. All rights reserved.