|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.sonatype.aether.spi.connector.Transfer
org.sonatype.aether.spi.connector.ArtifactTransfer
org.sonatype.aether.spi.connector.ArtifactDownload
public class ArtifactDownload
A download of an artifact from a remote repository. A repository connector processing this download has to use
Transfer.setState(State)
, setException(ArtifactTransferException)
and
setSupportedContexts(Collection)
(if applicable) to report the results of the transfer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.sonatype.aether.spi.connector.Transfer |
---|
Transfer.State |
Constructor Summary | |
---|---|
ArtifactDownload()
Creates a new uninitialized download. |
|
ArtifactDownload(Artifact artifact,
java.lang.String context,
java.io.File file,
java.lang.String checksumPolicy)
Creates a new download with the specified properties. |
Method Summary | |
---|---|
java.lang.String |
getChecksumPolicy()
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.String |
getRequestContext()
Gets the context of this transfer. |
java.util.Collection<java.lang.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(Artifact artifact)
Sets the artifact to transfer. |
ArtifactDownload |
setChecksumPolicy(java.lang.String checksumPolicy)
Sets the checksum policy for this transfer. |
ArtifactDownload |
setException(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(java.io.File file)
Sets the local file the artifact is downloaded to or uploaded from. |
ArtifactDownload |
setRepositories(java.util.List<RemoteRepository> repositories)
Sets the remote repositories that are being aggregated by the physically contacted remote repository (i.e. |
ArtifactDownload |
setRequestContext(java.lang.String context)
Sets the context of this transfer. |
ArtifactDownload |
setSupportedContexts(java.util.Collection<java.lang.String> contexts)
Sets the set of request contexts in which the artifact is generally available. |
Methods inherited from class org.sonatype.aether.spi.connector.ArtifactTransfer |
---|
getArtifact, getException, getFile |
Methods inherited from class org.sonatype.aether.spi.connector.Transfer |
---|
getState, setState |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArtifactDownload()
public ArtifactDownload(Artifact artifact, java.lang.String context, java.io.File file, java.lang.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
.Method Detail |
---|
public ArtifactDownload setArtifact(Artifact artifact)
ArtifactTransfer
setArtifact
in class ArtifactTransfer
artifact
- The artifact, may be null
.
null
.public ArtifactDownload setFile(java.io.File file)
ArtifactTransfer
setFile
in class ArtifactTransfer
file
- The local file, may be null
.
null
.public boolean isExistenceCheck()
ArtifactNotFoundException
with this download.
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 java.lang.String getChecksumPolicy()
null
.public ArtifactDownload setChecksumPolicy(java.lang.String checksumPolicy)
checksumPolicy
- The checksum policy, may be null
.
null
.public java.lang.String getRequestContext()
null
.public ArtifactDownload setRequestContext(java.lang.String context)
context
- The context id, may be null
.
null
.public java.util.Collection<java.lang.String> getSupportedContexts()
null
.public ArtifactDownload setSupportedContexts(java.util.Collection<java.lang.String> contexts)
contexts
- The set of requests context in which the artifact is available, may be null
.
null
.public java.util.List<RemoteRepository> getRepositories()
null
.public ArtifactDownload setRepositories(java.util.List<RemoteRepository> repositories)
repositories
- The remote repositories being aggregated, may be null
.
null
.public ArtifactDownload setException(ArtifactTransferException exception)
ArtifactTransfer
setException
in class ArtifactTransfer
exception
- The exception, may be null
to denote a successful transfer.
null
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |