@Service(value="postDownloadPolicy#checksum") public class ChecksumPolicy extends AbstractPolicy implements PostDownloadPolicy
| Modifier and Type | Field and Description | 
|---|---|
| static ChecksumOption | FAILThe 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 | FIXThe 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 | IGNOREThe 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, setPolicyPrefixclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getName, getName, getOptionDescription, getOptionNamepublic 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
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 PolicyOption getDefaultOption()
PolicygetDefaultOption in interface Policypublic List<PolicyOption> getOptions()
PolicygetOptions in interface PolicyCopyright © 2006–2019 The Apache Software Foundation. All rights reserved.