Package org.eclipse.aether.spi.connector
Class MetadataUpload
- java.lang.Object
-
- org.eclipse.aether.spi.connector.Transfer
-
- org.eclipse.aether.spi.connector.MetadataTransfer
-
- org.eclipse.aether.spi.connector.MetadataUpload
-
public final class MetadataUpload extends MetadataTransfer
An upload of metadata to a remote repository. A repository connector processing this upload has to usesetException(MetadataTransferException)
to report the results of the transfer.
-
-
Constructor Summary
Constructors Constructor Description MetadataUpload()
Creates a new uninitialized upload.MetadataUpload(Metadata metadata, java.io.File file)
Creates a new upload with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MetadataUpload
setException(MetadataTransferException exception)
Sets the exception that occurred during the transfer.MetadataUpload
setFile(java.io.File file)
Sets the local file the metadata is downloaded to or uploaded from.MetadataUpload
setListener(TransferListener listener)
Sets the listener that is to be notified during the transfer.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.java.lang.String
toString()
-
Methods inherited from class org.eclipse.aether.spi.connector.MetadataTransfer
getException, getFile, getMetadata
-
Methods inherited from class org.eclipse.aether.spi.connector.Transfer
getListener, getTrace
-
-
-
-
Constructor Detail
-
MetadataUpload
public MetadataUpload()
Creates a new uninitialized upload.
-
MetadataUpload
public MetadataUpload(Metadata metadata, java.io.File file)
Creates a new upload with the specified properties.- Parameters:
metadata
- The metadata to upload, may benull
.file
- The local file to upload the metadata from, may benull
.
-
-
Method Detail
-
setMetadata
public MetadataUpload setMetadata(Metadata metadata)
Description copied from class:MetadataTransfer
Sets the metadata to transfer.- Overrides:
setMetadata
in classMetadataTransfer
- Parameters:
metadata
- The metadata, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
setFile
public MetadataUpload setFile(java.io.File file)
Description copied from class:MetadataTransfer
Sets the local file the metadata is downloaded to or uploaded from.- Overrides:
setFile
in classMetadataTransfer
- Parameters:
file
- The local file, may benull
.- Returns:
- This transfer for chaining, never
null
.
-
setException
public MetadataUpload setException(MetadataTransferException exception)
Description copied from class:MetadataTransfer
Sets the exception that occurred during the transfer.- Overrides:
setException
in classMetadataTransfer
- Parameters:
exception
- The exception, may benull
to denote a successful transfer.- Returns:
- This transfer for chaining, never
null
.
-
setListener
public MetadataUpload setListener(TransferListener listener)
Description copied from class:Transfer
Sets the listener that is to be notified during the transfer.- Overrides:
setListener
in classTransfer
- Parameters:
listener
- The transfer listener to notify, may benull
if none.- Returns:
- This transfer for chaining, never
null
.
-
setTrace
public MetadataUpload 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.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-