org.eclipse.aether.spi.connector

## Class MetadataDownload

- java.lang.Object
- - org.eclipse.aether.spi.connector.Transfer
  - - org.eclipse.aether.spi.connector.MetadataTransfer
    - - org.eclipse.aether.spi.connector.MetadataDownload

-     public final class MetadataDownload
      extends MetadataTransfer

  A download of metadata from a remote repository. A repository connector processing this download has to use `setException(MetadataTransferException)` to report the results of the transfer.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.eclipse.aether.spi.connector.Transfer

      `Transfer.State`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetadataDownload()` Creates a new uninitialized download.
    `MetadataDownload(Metadata metadata, String context, File file, String checksumPolicy)` Creates a new download with the specified properties.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getChecksumPolicy()` Gets the checksum policy for this transfer.
    `List<RemoteRepository>` | `getRepositories()` Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
    `String` | `getRequestContext()` Gets the context of this transfer.
    `MetadataDownload` | `setChecksumPolicy(String checksumPolicy)` Sets the checksum policy for this transfer.
    `MetadataDownload` | `setException(MetadataTransferException exception)` Sets the exception that occurred during the transfer.
    `MetadataDownload` | `setFile(File file)` Sets the local file the metadata is downloaded to or uploaded from.
    `MetadataDownload` | `setListener(TransferListener listener)` Sets the listener that is to be notified during the transfer.
    `MetadataDownload` | `setMetadata(Metadata metadata)` Sets the metadata to transfer.
    `MetadataDownload` | `setRepositories(List<RemoteRepository> repositories)` Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
    `MetadataDownload` | `setRequestContext(String context)` Sets the request context of this transfer.
    `MetadataDownload` | `setTrace(RequestTrace trace)` Sets the trace information that describes the higher level request/operation in which this transfer is issued.
    `String` | `toString()`

    - ### Methods inherited from class org.eclipse.aether.spi.connector.MetadataTransfer

      `getException, getFile, getMetadata`

    - ### Methods inherited from class org.eclipse.aether.spi.connector.Transfer

      `getListener, getState, getTrace, setState`

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

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

- - ### Constructor Detail

    - #### MetadataDownload

          public MetadataDownload()

      Creates a new uninitialized download.

    - #### MetadataDownload

          public MetadataDownload(Metadata metadata,
                          String context,
                          File file,
                          String checksumPolicy)

      Creates a new download with the specified properties.
      Parameters:
        `metadata` - The metadata to download, may be `null`.
        `context` - The context in which this download is performed, may be `null`.
        `file` - The local file to download the metadata to, may be `null`.
        `checksumPolicy` - The checksum policy, may be `null`.

  - ### Method Detail

    - #### setMetadata

          public MetadataDownload setMetadata(Metadata metadata)

      Description copied from class: `MetadataTransfer`
      Sets the metadata to transfer.
      Overrides:
        `setMetadata` in class `MetadataTransfer`
      Parameters:
        `metadata` - The metadata, may be `null`.
      Returns:
        This transfer for chaining, never `null`.

    - #### setFile

          public MetadataDownload setFile(File file)

      Description copied from class: `MetadataTransfer`
      Sets the local file the metadata is downloaded to or uploaded from.
      Overrides:
        `setFile` in class `MetadataTransfer`
      Parameters:
        `file` - The local file, may be `null`.
      Returns:
        This transfer for chaining, never `null`.

    - #### getChecksumPolicy

          public String getChecksumPolicy()

      Gets the checksum policy for this transfer.
      Returns:
        The checksum policy, never `null`.

    - #### setChecksumPolicy

          public MetadataDownload setChecksumPolicy(String checksumPolicy)

      Sets the checksum policy for this transfer.
      Parameters:
        `checksumPolicy` - The checksum policy, may be `null`.
      Returns:
        This transfer for chaining, never `null`.

    - #### getRequestContext

          public String getRequestContext()

      Gets the context of this transfer.
      Returns:
        The context id, never `null`.

    - #### setRequestContext

          public MetadataDownload setRequestContext(String context)

      Sets the request context of this transfer.
      Parameters:
        `context` - The context id, may be `null`.
      Returns:
        This transfer for chaining, never `null`.

    - #### getRepositories

          public List<RemoteRepository> getRepositories()

      Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
      Returns:
        The remote repositories being aggregated, never `null`.

    - #### setRepositories

          public MetadataDownload setRepositories(List<RemoteRepository> repositories)

      Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).
      Parameters:
        `repositories` - The remote repositories being aggregated, may be `null`.
      Returns:
        This transfer for chaining, never `null`.

    - #### setException

          public MetadataDownload setException(MetadataTransferException exception)

      Description copied from class: `MetadataTransfer`
      Sets the exception that occurred during the transfer.
      Overrides:
        `setException` in class `MetadataTransfer`
      Parameters:
        `exception` - The exception, may be `null` to denote a successful transfer.
      Returns:
        This transfer for chaining, never `null`.

    - #### setListener

          public MetadataDownload setListener(TransferListener listener)

      Description copied from class: `Transfer`
      Sets the listener that is to be notified during the transfer.
      Parameters:
        `listener` - The transfer listener to notify, may be `null` if none.
      Returns:
        This transfer for chaining, never `null`.

    - #### setTrace

          public MetadataDownload setTrace(RequestTrace trace)

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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