Package org.eclipse.aether.repository
Class RepositoryPolicy
java.lang.Object
org.eclipse.aether.repository.RepositoryPolicy
A policy controlling access to a repository.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Verify checksums and fail the resolution if they do not match.static final String
Do not verify checksums.static final String
Verify checksums and warn if they do not match.static final String
Always update locally cached data.static final String
Update locally cached data once a day.static final String
Update locally cached data every X minutes as given by "interval:X".static final String
Never update locally cached data. -
Constructor Summary
ConstructorDescriptionCreates 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. -
Method Summary
-
Field Details
-
UPDATE_POLICY_NEVER
Never update locally cached data.- See Also:
-
UPDATE_POLICY_ALWAYS
Always update locally cached data.- See Also:
-
UPDATE_POLICY_DAILY
Update locally cached data once a day.- See Also:
-
UPDATE_POLICY_INTERVAL
Update locally cached data every X minutes as given by "interval:X".- See Also:
-
CHECKSUM_POLICY_FAIL
Verify checksums and fail the resolution if they do not match.- See Also:
-
CHECKSUM_POLICY_WARN
Verify checksums and warn if they do not match.- See Also:
-
CHECKSUM_POLICY_IGNORE
Do not verify checksums.- See Also:
-
-
Constructor Details
-
RepositoryPolicy
public RepositoryPolicy()Creates a new policy with checksum warnings and daily update checks. -
RepositoryPolicy
Creates a new policy with the specified settings.- Parameters:
enabled
- A flag whether the associated repository should be accessed or not.updatePolicy
- The update interval after which locally cached data from the repository is considered stale and should be refetched, may benull
.checksumPolicy
- The way checksum verification should be handled, may benull
.
-
-
Method Details
-
isEnabled
Indicates whether the associated repository should be contacted or not.- Returns:
true
if the repository should be contacted,false
otherwise.
-
getUpdatePolicy
Gets the update policy for locally cached data from the repository.- Returns:
- The update policy, never
null
.
-
getChecksumPolicy
Gets the policy for checksum validation.- Returns:
- The checksum policy, never
null
.
-
toString
-
equals
-
hashCode
-