|
||||||||||
| 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,
String context,
File file,
String checksumPolicy)
Creates a new download with the specified properties. |
|
| Method Summary | |
|---|---|
String |
getChecksumPolicy()
Gets the checksum policy for this transfer. |
File |
getFile()
Gets the local file the artifact is downloaded to or uploaded from. |
List<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(Artifact artifact)
Sets the artifact to transfer. |
ArtifactDownload |
setChecksumPolicy(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(File file)
Sets the local file the artifact is downloaded to or uploaded from. |
ArtifactDownload |
setRepositories(List<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(RequestTrace trace)
Sets the trace information that describes the higher level request/operation in which this transfer is issued. |
String |
toString()
|
| Methods inherited from class org.sonatype.aether.spi.connector.ArtifactTransfer |
|---|
getArtifact, getException |
| Methods inherited from class org.sonatype.aether.spi.connector.Transfer |
|---|
getState, getTrace, setState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ArtifactDownload()
public ArtifactDownload(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.| Method Detail |
|---|
public ArtifactDownload setArtifact(Artifact artifact)
ArtifactTransfer
setArtifact 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)
ArtifactTransfer
setFile 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<RemoteRepository> getRepositories()
null.public ArtifactDownload setRepositories(List<RemoteRepository> repositories)
repositories - The remote repositories being aggregated, may be null.
null.public ArtifactDownload setException(ArtifactTransferException exception)
ArtifactTransfer
setException in class ArtifactTransferexception - The exception, may be null to denote a successful transfer.
null.public ArtifactDownload setTrace(RequestTrace trace)
Transfer
setTrace in class Transfertrace - The trace information about the higher level operation, may be null.
null.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||