@Service(value="postDownloadPolicy#checksum") public class ChecksumPolicy extends Object implements PostDownloadPolicy
| Modifier and Type | Field and Description |
|---|---|
private ChecksumAlgorithm[] |
algorithms |
static String |
FAIL
The FAIL policy indicates that if the checksum does not match the
downloaded file, then remove the downloaded artifact, and checksum
files, and fail the transfer to the client side.
|
static String |
FIX
The FIX policy indicates that if the checksum does not match the
downloaded file, then fix the checksum file locally, and return
to the client side the corrected checksum.
|
static String |
IGNORE
The IGNORE policy indicates that if the checksum policy is ignored, and
the state of, contents of, or validity of the checksum files are not
checked.
|
private org.slf4j.Logger |
log |
private List<String> |
options |
| Constructor and Description |
|---|
ChecksumPolicy() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyPolicy(String policySetting,
Properties request,
File localFile)
Apply the download policy.
|
String |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
String |
getName()
Get the display name for this policy.
|
List<String> |
getOptions()
Get the list of options for this policy.
|
private org.slf4j.Logger log
public static final String IGNORE
public static final String FAIL
public static final String FIX
private ChecksumAlgorithm[] algorithms
public ChecksumPolicy()
public void applyPolicy(String policySetting, Properties request, File localFile) throws PolicyViolationException, PolicyConfigurationException
DownloadPolicyapplyPolicy in interface DownloadPolicypolicySetting - the policy setting.request - the list of request properties that the policy might use.PolicyViolationException - if the policy has been violated.PolicyConfigurationExceptionpublic String getDefaultOption()
PolicygetDefaultOption in interface Policypublic String getName()
Policypublic List<String> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.