public class MetadataUpload extends MetadataTransfer
Transfer.setState(State)
and setException(MetadataTransferException)
to report the results of the transfer.Transfer.State
Constructor and Description |
---|
MetadataUpload()
Creates a new uninitialized upload.
|
MetadataUpload(Metadata metadata,
File file)
Creates a new upload with the specified properties.
|
Modifier and Type | Method and Description |
---|---|
MetadataUpload |
setException(MetadataTransferException exception)
Sets the exception that occurred during the transfer.
|
MetadataUpload |
setFile(File file)
Sets the local file the metadata is downloaded to or uploaded from.
|
MetadataUpload |
setMetadata(Metadata metadata)
Sets the metadata to transfer.
|
MetadataUpload |
setTrace(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this transfer is issued.
|
String |
toString() |
getException, getFile, getMetadata
public MetadataUpload setMetadata(Metadata metadata)
MetadataTransfer
setMetadata
in class MetadataTransfer
metadata
- The metadata, may be null
.null
.public MetadataUpload setFile(File file)
MetadataTransfer
setFile
in class MetadataTransfer
file
- The local file, may be null
.null
.public MetadataUpload setException(MetadataTransferException exception)
MetadataTransfer
setException
in class MetadataTransfer
exception
- The exception, may be null
to denote a successful transfer.null
.public MetadataUpload setTrace(RequestTrace trace)
Transfer
Copyright © 2010-2012 Sonatype, Inc.. All Rights Reserved.