EnforcerRule, EnforcerRule2RequireFilesDontExist, RequireFilesExist, RequireFilesSizepublic abstract class AbstractRequireFiles extends AbstractStandardEnforcerRule
| Constructor | Description |
|---|---|
AbstractRequireFiles() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
execute(EnforcerRuleHelper helper) |
This is the interface into the rule.
|
String |
getCacheId() |
If your rule is cacheable, you must return a unique id when parameters or conditions change that would cause the
result to be different.
|
File[] |
getFiles() |
|
boolean |
isAllowNulls() |
|
boolean |
isCacheable() |
This tells the system if the results are cacheable at all.
|
boolean |
isResultValid(EnforcerRule cachedRule) |
If the rule is cacheable and the same id is found in the cache, the stored results are passed to this method to
allow double checking of the results.
|
void |
setAllowNulls(boolean allowNulls) |
|
void |
setFiles(File[] files) |
getLevel, getMessage, setLevel, setMessagepublic void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
EnforcerRulehelper - The helper provides access to the log, MavenSession and has
helpers to get common components. It is also able to lookup components
by class name.EnforcerRuleException - the enforcer rule exceptionpublic String getCacheId()
public boolean isCacheable()
true if rule is cacheablepublic boolean isResultValid(EnforcerRule cachedRule)
cachedRule - the cached ruletrue if the stored results are valid for the same id.public File[] getFiles()
public void setFiles(File[] files)
public boolean isAllowNulls()
public void setAllowNulls(boolean allowNulls)
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.