org.eclipse.aether.spi.connector

## Class ArtifactUpload

- java.lang.Object
- - org.eclipse.aether.spi.connector.Transfer
  - - org.eclipse.aether.spi.connector.ArtifactTransfer
    - - org.eclipse.aether.spi.connector.ArtifactUpload

-     public final class ArtifactUpload
      extends ArtifactTransfer

  An upload of an artifact to a remote repository. A repository connector processing this upload has to use `setException(ArtifactTransferException)` 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
    `ArtifactUpload()` Creates a new uninitialized upload.
    `ArtifactUpload(Artifact artifact, File file)` Creates a new upload with the specified properties.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ArtifactUpload` | `setArtifact(Artifact artifact)` Sets the artifact to transfer.
    `ArtifactUpload` | `setException(ArtifactTransferException exception)` Sets the exception that occurred during the transfer.
    `ArtifactUpload` | `setFile(File file)` Sets the local file the artifact is downloaded to or uploaded from.
    `ArtifactUpload` | `setListener(TransferListener listener)` Sets the listener that is to be notified during the transfer.
    `ArtifactUpload` | `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.ArtifactTransfer

      `getArtifact, getException, getFile`

    - ### 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

    - #### ArtifactUpload

          public ArtifactUpload()

      Creates a new uninitialized upload.

    - #### ArtifactUpload

          public ArtifactUpload(Artifact artifact,
                        File file)

      Creates a new upload with the specified properties.
      Parameters:
        `artifact` - The artifact to upload, may be `null`.
        `file` - The local file to upload the artifact from, may be `null`.

  - ### Method Detail

    - #### setArtifact

          public ArtifactUpload setArtifact(Artifact artifact)

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

    - #### setFile

          public ArtifactUpload setFile(File file)

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

    - #### setException

          public ArtifactUpload setException(ArtifactTransferException exception)

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

    - #### setListener

          public ArtifactUpload 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 ArtifactUpload 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-2014 The Eclipse Foundation. All Rights Reserved.