Package org.eclipse.aether.repository
Class RepositoryPolicy
java.lang.Object
org.eclipse.aether.repository.RepositoryPolicy
A policy controlling access to a repository.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringVerify checksums and fail the resolution if they do not match.static final StringDo not verify checksums.static final StringVerify checksums and warn if they do not match.static final StringAlways update locally cached data.static final StringUpdate locally cached data once a day.static final StringUpdate locally cached data every X minutes as given by "interval:X".static final StringNever update locally cached data.
- 
Constructor SummaryConstructorsConstructorDescriptionCreates a new policy with checksum warnings and daily update checks.RepositoryPolicy(boolean enabled, String updatePolicy, String checksumPolicy) Creates a new policy with the specified settings (uses same update policy for data and metadata, retains old resolver behaviour).RepositoryPolicy(boolean enabled, String artifactUpdatePolicy, String metadataUpdatePolicy, String checksumPolicy) Creates a new policy with the specified settings.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanGets the update policy for locally cached artifacts from the repository.Gets the policy for checksum validation.Gets the update policy for locally cached metadata from the repository.Deprecated.This method should not be used.inthashCode()booleanIndicates whether the associated repository should be contacted or not.toString()
- 
Field Details- 
UPDATE_POLICY_NEVERNever update locally cached data.- See Also:
 
- 
UPDATE_POLICY_ALWAYSAlways update locally cached data.- See Also:
 
- 
UPDATE_POLICY_DAILYUpdate locally cached data once a day.- See Also:
 
- 
UPDATE_POLICY_INTERVALUpdate locally cached data every X minutes as given by "interval:X".- See Also:
 
- 
CHECKSUM_POLICY_FAILVerify checksums and fail the resolution if they do not match.- See Also:
 
- 
CHECKSUM_POLICY_WARNVerify checksums and warn if they do not match.- See Also:
 
- 
CHECKSUM_POLICY_IGNOREDo not verify checksums.- See Also:
 
 
- 
- 
Constructor Details- 
RepositoryPolicypublic RepositoryPolicy()Creates a new policy with checksum warnings and daily update checks.
- 
RepositoryPolicyCreates a new policy with the specified settings (uses same update policy for data and metadata, retains old resolver behaviour).
- 
RepositoryPolicypublic RepositoryPolicy(boolean enabled, String artifactUpdatePolicy, String metadataUpdatePolicy, String checksumPolicy) Creates a new policy with the specified settings.- Parameters:
- enabled- A flag whether the associated repository should be accessed or not.
- artifactUpdatePolicy- The update interval after which locally cached data from the repository is considered stale and should be re-fetched, may be- null.
- metadataUpdatePolicy- The update interval after which locally cached metadata from the repository is considered stale and should be re-fetched, may be- null.
- checksumPolicy- The way checksum verification should be handled, may be- null.
- Since:
- 2.0.0
 
 
- 
- 
Method Details- 
isEnabledIndicates whether the associated repository should be contacted or not.- Returns:
- trueif the repository should be contacted,- falseotherwise.
 
- 
getUpdatePolicyDeprecated.This method should not be used. Since version 2 Resolver internally distinguishes between artifact update policy and metadata update policy. This method was left only to preserve binary compatibility, and in reality invokesgetArtifactUpdatePolicy().This method is not used in Resolver, as resolver internally strictly distinguishes between artifact and metadata update policies.- See Also:
 
- 
getArtifactUpdatePolicyGets the update policy for locally cached artifacts from the repository.- Returns:
- The update policy, never null.
- Since:
- 2.0.0
 
- 
getMetadataUpdatePolicyGets the update policy for locally cached metadata from the repository.- Returns:
- The update policy, never null.
- Since:
- 2.0.0
 
- 
getChecksumPolicyGets the policy for checksum validation.- Returns:
- The checksum policy, never null.
 
- 
toString
- 
equals
- 
hashCode
 
-