@Service(value="postDownloadPolicy#checksum") public class ChecksumPolicy extends AbstractPolicy implements PostDownloadPolicy
Modifier and Type | Field and Description |
---|---|
static ChecksumOption |
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 ChecksumOption |
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 ChecksumOption |
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.
|
RESOURCE_BUNDLE
Constructor and Description |
---|
ChecksumPolicy() |
Modifier and Type | Method and Description |
---|---|
void |
applyPolicy(PolicyOption policySetting,
Properties request,
StorageAsset localFile)
Apply the download policy.
|
PolicyOption |
getDefaultOption()
Get the default option for this policy.
|
String |
getId()
Get the id for this policy.
|
List<PolicyOption> |
getOptions()
Get the list of options for this policy.
|
getDescription, getName, getName, getOptionDescription, getOptionName, getOptionPrefix, getPolicyPrefix, setOptionPrefix, setPolicyPrefix
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getName, getName, getOptionDescription, getOptionName
public static final ChecksumOption IGNORE
public static final ChecksumOption FAIL
public static final ChecksumOption FIX
public ChecksumPolicy()
public void applyPolicy(PolicyOption policySetting, Properties request, StorageAsset localFile) throws PolicyViolationException, PolicyConfigurationException
DownloadPolicy
applyPolicy
in interface DownloadPolicy
policySetting
- the policy setting.request
- the list of request properties that the policy might use.PolicyViolationException
- if the policy has been violated.PolicyConfigurationException
public PolicyOption getDefaultOption()
Policy
getDefaultOption
in interface Policy
public List<PolicyOption> getOptions()
Policy
getOptions
in interface Policy
Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.