public class ArtifactUpload extends ArtifactTransfer
Transfer.setState(State)
and setException(ArtifactTransferException)
to report the results of the transfer.Transfer.State
Constructor and Description |
---|
ArtifactUpload()
Creates a new uninitialized upload.
|
ArtifactUpload(Artifact artifact,
File file)
Creates a new upload with the specified properties.
|
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 |
setTrace(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this transfer is issued.
|
String |
toString() |
getArtifact, getException, getFile
public ArtifactUpload setArtifact(Artifact artifact)
ArtifactTransfer
setArtifact
in class ArtifactTransfer
artifact
- The artifact, may be null
.null
.public ArtifactUpload setFile(File file)
ArtifactTransfer
setFile
in class ArtifactTransfer
file
- The local file, may be null
.null
.public ArtifactUpload setException(ArtifactTransferException exception)
ArtifactTransfer
setException
in class ArtifactTransfer
exception
- The exception, may be null
to denote a successful transfer.null
.public ArtifactUpload setTrace(RequestTrace trace)
Transfer
Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.