Package org.eclipse.aether.spi.connector
Class MetadataDownload
- java.lang.Object
-
- org.eclipse.aether.spi.connector.Transfer
-
- org.eclipse.aether.spi.connector.MetadataTransfer
-
- org.eclipse.aether.spi.connector.MetadataDownload
-
public final class MetadataDownload extends MetadataTransfer
A download of metadata from a remote repository. A repository connector processing this download has to usesetException(MetadataTransferException)to report the results of the transfer.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringchecksumPolicyprivate java.lang.Stringcontextprivate java.util.List<RemoteRepository>repositories
-
Constructor Summary
Constructors Constructor Description MetadataDownload()Creates a new uninitialized download.MetadataDownload(Metadata metadata, java.lang.String context, java.io.File file, java.lang.String checksumPolicy)Creates a new download with the specified properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetChecksumPolicy()Gets the checksum policy for this transfer.java.util.List<RemoteRepository>getRepositories()Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.java.lang.StringgetRequestContext()Gets the context of this transfer.MetadataDownloadsetChecksumPolicy(java.lang.String checksumPolicy)Sets the checksum policy for this transfer.MetadataDownloadsetException(MetadataTransferException exception)Sets the exception that occurred during the transfer.MetadataDownloadsetFile(java.io.File file)Sets the local file the metadata is downloaded to or uploaded from.MetadataDownloadsetListener(TransferListener listener)Sets the listener that is to be notified during the transfer.MetadataDownloadsetMetadata(Metadata metadata)Sets the metadata to transfer.MetadataDownloadsetRepositories(java.util.List<RemoteRepository> repositories)Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.MetadataDownloadsetRequestContext(java.lang.String context)Sets the request context of this transfer.MetadataDownloadsetTrace(RequestTrace trace)Sets the trace information that describes the higher level request/operation in which this transfer is issued.java.lang.StringtoString()-
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
-
-
-
-
Field Detail
-
checksumPolicy
private java.lang.String checksumPolicy
-
context
private java.lang.String context
-
repositories
private java.util.List<RemoteRepository> repositories
-
-
Constructor Detail
-
MetadataDownload
public MetadataDownload()
Creates a new uninitialized download.
-
MetadataDownload
public MetadataDownload(Metadata metadata, java.lang.String context, java.io.File file, java.lang.String checksumPolicy)
Creates a new download with the specified properties.- Parameters:
metadata- The metadata to download, may benull.context- The context in which this download is performed, may benull.file- The local file to download the metadata to, may benull.checksumPolicy- The checksum policy, may benull.
-
-
Method Detail
-
setMetadata
public MetadataDownload setMetadata(Metadata metadata)
Description copied from class:MetadataTransferSets the metadata to transfer.- Overrides:
setMetadatain classMetadataTransfer- Parameters:
metadata- The metadata, may benull.- Returns:
- This transfer for chaining, never
null.
-
setFile
public MetadataDownload setFile(java.io.File file)
Description copied from class:MetadataTransferSets the local file the metadata is downloaded to or uploaded from.- Overrides:
setFilein classMetadataTransfer- Parameters:
file- The local file, may benull.- Returns:
- This transfer for chaining, never
null.
-
getChecksumPolicy
public java.lang.String getChecksumPolicy()
Gets the checksum policy for this transfer.- Returns:
- The checksum policy, never
null.
-
setChecksumPolicy
public MetadataDownload setChecksumPolicy(java.lang.String checksumPolicy)
Sets the checksum policy for this transfer.- Parameters:
checksumPolicy- The checksum policy, may benull.- Returns:
- This transfer for chaining, never
null.
-
getRequestContext
public java.lang.String getRequestContext()
Gets the context of this transfer.- Returns:
- The context id, never
null.
-
setRequestContext
public MetadataDownload setRequestContext(java.lang.String context)
Sets the request context of this transfer.- Parameters:
context- The context id, may benull.- Returns:
- This transfer for chaining, never
null.
-
getRepositories
public java.util.List<RemoteRepository> getRepositories()
Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).- Returns:
- The remote repositories being aggregated, never
null.
-
setRepositories
public MetadataDownload setRepositories(java.util.List<RemoteRepository> repositories)
Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. a repository manager).- Parameters:
repositories- The remote repositories being aggregated, may benull.- Returns:
- This transfer for chaining, never
null.
-
setException
public MetadataDownload setException(MetadataTransferException exception)
Description copied from class:MetadataTransferSets the exception that occurred during the transfer.- Overrides:
setExceptionin classMetadataTransfer- Parameters:
exception- The exception, may benullto denote a successful transfer.- Returns:
- This transfer for chaining, never
null.
-
setListener
public MetadataDownload setListener(TransferListener listener)
Description copied from class:TransferSets the listener that is to be notified during the transfer.- Overrides:
setListenerin classTransfer- Parameters:
listener- The transfer listener to notify, may benullif none.- Returns:
- This transfer for chaining, never
null.
-
setTrace
public MetadataDownload setTrace(RequestTrace trace)
Description copied from class:TransferSets the trace information that describes the higher level request/operation in which this transfer is issued.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-