public final class ArtifactDownload extends ArtifactTransfer
setException(ArtifactTransferException) and setSupportedContexts(Collection) (if applicable) to
report the results of the transfer.| Constructor and Description |
|---|
ArtifactDownload()
Creates a new uninitialized download.
|
ArtifactDownload(org.eclipse.aether.artifact.Artifact artifact,
String context,
File file,
String checksumPolicy)
Creates a new download with the specified properties.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getChecksumPolicy()
Gets the checksum policy for this transfer.
|
File |
getFile()
Gets the local file the artifact is downloaded to or uploaded from.
|
List<org.eclipse.aether.repository.RemoteRepository> |
getRepositories()
Gets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.
|
String |
getRequestContext()
Gets the context of this transfer.
|
Collection<String> |
getSupportedContexts()
Gets the set of request contexts in which the artifact is generally available.
|
boolean |
isExistenceCheck()
Indicates whether this transfer shall only verify the existence of the artifact in the remote repository rather
than actually downloading the file.
|
ArtifactDownload |
setArtifact(org.eclipse.aether.artifact.Artifact artifact)
Sets the artifact to transfer.
|
ArtifactDownload |
setChecksumPolicy(String checksumPolicy)
Sets the checksum policy for this transfer.
|
ArtifactDownload |
setException(org.eclipse.aether.transfer.ArtifactTransferException exception)
Sets the exception that occurred during the transfer.
|
ArtifactDownload |
setExistenceCheck(boolean existenceCheck)
Controls whether this transfer shall only verify the existence of the artifact in the remote repository rather
than actually downloading the file.
|
ArtifactDownload |
setFile(File file)
Sets the local file the artifact is downloaded to or uploaded from.
|
ArtifactDownload |
setListener(org.eclipse.aether.transfer.TransferListener listener)
Sets the listener that is to be notified during the transfer.
|
ArtifactDownload |
setRepositories(List<org.eclipse.aether.repository.RemoteRepository> repositories)
Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e.
|
ArtifactDownload |
setRequestContext(String context)
Sets the context of this transfer.
|
ArtifactDownload |
setSupportedContexts(Collection<String> contexts)
Sets the set of request contexts in which the artifact is generally available.
|
ArtifactDownload |
setTrace(org.eclipse.aether.RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this transfer is issued.
|
String |
toString() |
getArtifact, getExceptiongetListener, getTracepublic ArtifactDownload()
public ArtifactDownload(org.eclipse.aether.artifact.Artifact artifact,
String context,
File file,
String checksumPolicy)
artifact - The artifact to download, may be null.context - The context in which this download is performed, may be null.file - The local file to download the artifact to, may be null.checksumPolicy - The checksum policy, may be null.public ArtifactDownload setArtifact(org.eclipse.aether.artifact.Artifact artifact)
ArtifactTransfersetArtifact in class ArtifactTransferartifact - The artifact, may be null.null.public File getFile()
isExistenceCheck(), this method may return null.getFile in class ArtifactTransfernull if not set.public ArtifactDownload setFile(File file)
ArtifactTransfersetFile in class ArtifactTransferfile - The local file, may be null.null.public boolean isExistenceCheck()
ArtifactNotFoundException with this download. Note: If an existence check is requested,
getFile() may be null, i.e. the connector must not try to access the local file.true if only the artifact existence shall be verified, false to actually download the
artifact.public ArtifactDownload setExistenceCheck(boolean existenceCheck)
existenceCheck - true if only the artifact existence shall be verified, false to actually
download the artifact.null.public String getChecksumPolicy()
null.public ArtifactDownload setChecksumPolicy(String checksumPolicy)
checksumPolicy - The checksum policy, may be null.null.public String getRequestContext()
null.public ArtifactDownload setRequestContext(String context)
context - The context id, may be null.null.public Collection<String> getSupportedContexts()
null.public ArtifactDownload setSupportedContexts(Collection<String> contexts)
contexts - The set of requests context in which the artifact is available, may be null.null.public List<org.eclipse.aether.repository.RemoteRepository> getRepositories()
null.public ArtifactDownload setRepositories(List<org.eclipse.aether.repository.RemoteRepository> repositories)
repositories - The remote repositories being aggregated, may be null.null.public ArtifactDownload setException(org.eclipse.aether.transfer.ArtifactTransferException exception)
ArtifactTransfersetException in class ArtifactTransferexception - The exception, may be null to denote a successful transfer.null.public ArtifactDownload setListener(org.eclipse.aether.transfer.TransferListener listener)
Transferlistener - The transfer listener to notify, may be null if none.null.public ArtifactDownload setTrace(org.eclipse.aether.RequestTrace trace)
Transfertrace - The trace information about the higher level operation, may be null.null.Copyright © 2010-2015 The Eclipse Foundation. All Rights Reserved.