public class RequireFileChecksum extends AbstractNonCacheableEnforcerRule
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
checksum |
private java.io.File |
file |
private java.lang.String |
type |
Constructor and Description |
---|
RequireFileChecksum() |
Modifier and Type | Method and Description |
---|---|
void |
execute(EnforcerRuleHelper helper)
This is the interface into the rule.
|
void |
setChecksum(java.lang.String checksum)
The expected checksum value.
|
void |
setFile(java.io.File file)
The file to check.
|
void |
setType(java.lang.String type)
The checksum algorithm to use.
|
getCacheId, isCacheable, isResultValid
getLevel, getMessage, setLevel, setMessage
private java.io.File file
private java.lang.String checksum
private java.lang.String type
public void execute(EnforcerRuleHelper helper) throws EnforcerRuleException
EnforcerRule
helper
- 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 void setFile(java.io.File file)
file
- filepublic void setChecksum(java.lang.String checksum)
checksum
- checksumpublic void setType(java.lang.String type)
type
- algorithm