public final class ArtifactUpload extends ArtifactTransfer
setException(ArtifactTransferException) to report the results of the transfer.| Modifier and Type | Field and Description |
|---|---|
private FileTransformer |
fileTransformer |
| Constructor and Description |
|---|
ArtifactUpload()
Creates a new uninitialized upload.
|
ArtifactUpload(Artifact artifact,
java.io.File file)
Creates a new upload with the specified properties.
|
ArtifactUpload(Artifact artifact,
java.io.File file,
FileTransformer fileTransformer)
Creates a new upload with the specified properties.
|
| Modifier and Type | Method and Description |
|---|---|
FileTransformer |
getFileTransformer() |
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 |
setFileTransformer(FileTransformer fileTransformer) |
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.
|
java.lang.String |
toString() |
getArtifact, getException, getFilegetListener, getTraceprivate FileTransformer fileTransformer
public ArtifactUpload()
public ArtifactUpload(Artifact artifact, java.io.File file)
artifact - The artifact to upload, may be null.file - The local file to upload the artifact from, may be null.public ArtifactUpload(Artifact artifact, java.io.File file, FileTransformer fileTransformer)
Creates a new upload with the specified properties.
IMPORTANT When using a fileTransformer, the content of the file is stored in memory to ensure that file content and checksums stay in sync!
artifact - The artifact to upload, may be null.file - The local file to upload the artifact from, may be null.fileTransformer - The file transformer, may be null.public ArtifactUpload setArtifact(Artifact artifact)
ArtifactTransfersetArtifact in class ArtifactTransferartifact - The artifact, may be null.null.public ArtifactUpload setFile(java.io.File file)
ArtifactTransfersetFile in class ArtifactTransferfile - The local file, may be null.null.public ArtifactUpload setException(ArtifactTransferException exception)
ArtifactTransfersetException in class ArtifactTransferexception - The exception, may be null to denote a successful transfer.null.public ArtifactUpload setListener(TransferListener listener)
TransfersetListener in class Transferlistener - The transfer listener to notify, may be null if none.null.public ArtifactUpload setTrace(RequestTrace trace)
Transferpublic ArtifactUpload setFileTransformer(FileTransformer fileTransformer)
public FileTransformer getFileTransformer()
public java.lang.String toString()
toString in class java.lang.Object