org.eclipse.aether.resolution

## Class ArtifactDescriptorRequest

- java.lang.Object
- - org.eclipse.aether.resolution.ArtifactDescriptorRequest

-     public final class ArtifactDescriptorRequest
      extends Object

  A request to read an artifact descriptor.
  See Also:
    `RepositorySystem.readArtifactDescriptor(RepositorySystemSession, ArtifactDescriptorRequest)`

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ArtifactDescriptorRequest()` Creates an uninitialized request.
    `ArtifactDescriptorRequest(Artifact artifact, List<RemoteRepository> repositories, String context)` Creates a request with the specified properties.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ArtifactDescriptorRequest` | `addRepository(RemoteRepository repository)` Adds the specified repository for the resolution of the artifact descriptor.
    `Artifact` | `getArtifact()` Gets the artifact whose descriptor shall be read.
    `List<RemoteRepository>` | `getRepositories()` Gets the repositories to resolve the descriptor from.
    `String` | `getRequestContext()` Gets the context in which this request is made.
    `RequestTrace` | `getTrace()` Gets the trace information that describes the higher level request/operation in which this request is issued.
    `ArtifactDescriptorRequest` | `setArtifact(Artifact artifact)` Sets the artifact whose descriptor shall be read.
    `ArtifactDescriptorRequest` | `setRepositories(List<RemoteRepository> repositories)` Sets the repositories to resolve the descriptor from.
    `ArtifactDescriptorRequest` | `setRequestContext(String context)` Sets the context in which this request is made.
    `ArtifactDescriptorRequest` | `setTrace(RequestTrace trace)` Sets the trace information that describes the higher level request/operation in which this request is issued.
    `String` | `toString()`

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

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

- - ### Constructor Detail

    - #### ArtifactDescriptorRequest

          public ArtifactDescriptorRequest()

      Creates an uninitialized request.

    - #### ArtifactDescriptorRequest

          public ArtifactDescriptorRequest(Artifact artifact,
                                   List<RemoteRepository> repositories,
                                   String context)

      Creates a request with the specified properties.
      Parameters:
        `artifact` - The artifact whose descriptor should be read, may be `null`.
        `repositories` - The repositories to resolve the descriptor from, may be `null`.
        `context` - The context in which this request is made, may be `null`.

  - ### Method Detail

    - #### getArtifact

          public Artifact getArtifact()

      Gets the artifact whose descriptor shall be read.
      Returns:
        The artifact or `null` if not set.

    - #### setArtifact

          public ArtifactDescriptorRequest setArtifact(Artifact artifact)

      Sets the artifact whose descriptor shall be read. Eventually, a valid request must have an artifact set.
      Parameters:
        `artifact` - The artifact, may be `null`.
      Returns:
        This request for chaining, never `null`.

    - #### getRepositories

          public List<RemoteRepository> getRepositories()

      Gets the repositories to resolve the descriptor from.
      Returns:
        The repositories, never `null`.

    - #### setRepositories

          public ArtifactDescriptorRequest setRepositories(List<RemoteRepository> repositories)

      Sets the repositories to resolve the descriptor from.
      Parameters:
        `repositories` - The repositories, may be `null`.
      Returns:
        This request for chaining, never `null`.

    - #### addRepository

          public ArtifactDescriptorRequest addRepository(RemoteRepository repository)

      Adds the specified repository for the resolution of the artifact descriptor.
      Parameters:
        `repository` - The repository to add, may be `null`.
      Returns:
        This request for chaining, never `null`.

    - #### getRequestContext

          public String getRequestContext()

      Gets the context in which this request is made.
      Returns:
        The context, never `null`.

    - #### setRequestContext

          public ArtifactDescriptorRequest setRequestContext(String context)

      Sets the context in which this request is made.
      Parameters:
        `context` - The context, may be `null`.
      Returns:
        This request for chaining, never `null`.

    - #### getTrace

          public RequestTrace getTrace()

      Gets the trace information that describes the higher level request/operation in which this request is issued.
      Returns:
        The trace information about the higher level operation or `null` if none.

    - #### setTrace

          public ArtifactDescriptorRequest setTrace(RequestTrace trace)

      Sets the trace information that describes the higher level request/operation in which this request is issued.
      Parameters:
        `trace` - The trace information about the higher level operation, may be `null`.
      Returns:
        This request for chaining, never `null`.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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