org.sonatype.aether.spi.connector
Class ArtifactUpload

java.lang.Object
  extended by org.sonatype.aether.spi.connector.Transfer
      extended by org.sonatype.aether.spi.connector.ArtifactTransfer
          extended by org.sonatype.aether.spi.connector.ArtifactUpload

public class ArtifactUpload
extends ArtifactTransfer

An upload of an artifact to a remote repository. A repository connector processing this upload has to use Transfer.setState(State) and setException(ArtifactTransferException) to report the results of the transfer.

Author:
Benjamin Bentmann

Nested Class Summary
 
Nested classes/interfaces inherited from class org.sonatype.aether.spi.connector.Transfer
Transfer.State
 
Constructor Summary
ArtifactUpload()
          Creates a new uninitialized upload.
ArtifactUpload(Artifact artifact, java.io.File file)
          Creates a new upload with the specified properties.
 
Method Summary
 ArtifactUpload setArtifact(Artifact artifact)
          Sets the artifact to transfer.
 ArtifactUpload setException(ArtifactTransferException exception)
          Sets the exception that occurred during the transfer.
 ArtifactUpload setFile(java.io.File file)
          Sets the local file the artifact is downloaded to or uploaded from.
 ArtifactUpload setTrace(RequestTrace trace)
          Sets the trace information that describes the higher level request/operation in which this transfer is issued.
 java.lang.String toString()
           
 
Methods inherited from class org.sonatype.aether.spi.connector.ArtifactTransfer
getArtifact, getException, getFile
 
Methods inherited from class org.sonatype.aether.spi.connector.Transfer
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,
                      java.io.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(java.io.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.

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.

Overrides:
setTrace in class Transfer
Parameters:
trace - The trace information about the higher level operation, may be null.
Returns:
This transfer for chaining, never null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2010-2011 Sonatype, Inc.. All Rights Reserved.