org.eclipse.aether.util.repository

## Class SimpleArtifactDescriptorPolicy

- java.lang.Object
- - org.eclipse.aether.util.repository.SimpleArtifactDescriptorPolicy

- All Implemented Interfaces:
    ArtifactDescriptorPolicy

      public final class SimpleArtifactDescriptorPolicy
      extends Object
      implements ArtifactDescriptorPolicy

  An artifact descriptor error policy that allows to control error handling at a global level.

- - ### Field Summary

    - ### Fields inherited from interface org.eclipse.aether.resolution.ArtifactDescriptorPolicy

      `IGNORE_ERRORS, IGNORE_INVALID, IGNORE_MISSING, STRICT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleArtifactDescriptorPolicy(boolean ignoreMissing, boolean ignoreInvalid)` Creates a new error policy with the specified behavior.
    `SimpleArtifactDescriptorPolicy(int policy)` Creates a new error policy with the specified bit mask.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPolicy(RepositorySystemSession session, ArtifactDescriptorPolicyRequest request)` Gets the error policy for an artifact's descriptor.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### SimpleArtifactDescriptorPolicy

          public SimpleArtifactDescriptorPolicy(boolean ignoreMissing,
                                        boolean ignoreInvalid)

      Creates a new error policy with the specified behavior.
      Parameters:
        `ignoreMissing` - `true` to ignore missing descriptors, `false` to fail resolution.
        `ignoreInvalid` - `true` to ignore invalid descriptors, `false` to fail resolution.

    - #### SimpleArtifactDescriptorPolicy

          public SimpleArtifactDescriptorPolicy(int policy)

      Creates a new error policy with the specified bit mask.
      Parameters:
        `policy` - The bit mask describing the policy.

  - ### Method Detail

    - #### getPolicy

          public int getPolicy(RepositorySystemSession session,
                      ArtifactDescriptorPolicyRequest request)

      Description copied from interface: `ArtifactDescriptorPolicy`
      Gets the error policy for an artifact's descriptor.
      Specified by:
        `getPolicy` in interface `ArtifactDescriptorPolicy`
      Parameters:
        `session` - The repository session during which the policy is determined, must not be `null`.
        `request` - The policy request holding further details, must not be `null`.
      Returns:
        The bit mask describing the desired error policy.

Copyright © 2010-2014 The Eclipse Foundation. All Rights Reserved.