Class SimpleResolutionErrorPolicy
java.lang.Object
org.eclipse.aether.util.repository.SimpleResolutionErrorPolicy
- All Implemented Interfaces:
 ResolutionErrorPolicy
A resolution error policy that allows to control caching for artifacts and metadata at a global level.
- 
Field Summary
Fields inherited from interface org.eclipse.aether.resolution.ResolutionErrorPolicy
CACHE_ALL, CACHE_DISABLED, CACHE_NOT_FOUND, CACHE_TRANSFER_ERROR - 
Constructor Summary
ConstructorsConstructorDescriptionSimpleResolutionErrorPolicy(boolean cacheNotFound, boolean cacheTransferErrors) Creates a new error policy with the specified behavior for both artifacts and metadata.SimpleResolutionErrorPolicy(int policy) Creates a new error policy with the specified bit mask for both artifacts and metadata.SimpleResolutionErrorPolicy(int artifactPolicy, int metadataPolicy) Creates a new error policy with the specified bit masks for artifacts and metadata. - 
Method Summary
Modifier and TypeMethodDescriptionintgetArtifactPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Artifact> request) Gets the error policy for an artifact.intgetMetadataPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Metadata> request) Gets the error policy for some metadata. 
- 
Constructor Details
- 
SimpleResolutionErrorPolicy
Creates a new error policy with the specified behavior for both artifacts and metadata.- Parameters:
 cacheNotFound-trueto enable caching of missing items,falseto disable itcacheTransferErrors-trueto enable caching of transfer errors,falseto disable it
 - 
SimpleResolutionErrorPolicy
Creates a new error policy with the specified bit mask for both artifacts and metadata.- Parameters:
 policy- the bit mask describing the policy for artifacts and metadata
 - 
SimpleResolutionErrorPolicy
Creates a new error policy with the specified bit masks for artifacts and metadata.- Parameters:
 artifactPolicy- the bit mask describing the policy for artifactsmetadataPolicy- the bit mask describing the policy for metadata
 
 - 
 - 
Method Details
- 
getArtifactPolicy
public int getArtifactPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Artifact> request) Description copied from interface:ResolutionErrorPolicyGets the error policy for an artifact.- Specified by:
 getArtifactPolicyin interfaceResolutionErrorPolicy- Parameters:
 session- The repository session during which the policy is determined, must not benull.request- The policy request holding further details, must not benull.- Returns:
 - The bit mask describing the desired error policy.
 
 - 
getMetadataPolicy
public int getMetadataPolicy(RepositorySystemSession session, ResolutionErrorPolicyRequest<Metadata> request) Description copied from interface:ResolutionErrorPolicyGets the error policy for some metadata.- Specified by:
 getMetadataPolicyin interfaceResolutionErrorPolicy- Parameters:
 session- The repository session during which the policy is determined, must not benull.request- The policy request holding further details, must not benull.- Returns:
 - The bit mask describing the desired error policy.
 
 
 -