public class ArtifactDownloadReport
extends java.lang.Object
Note that depending on cache implementation, the artifact may not be actually downloaded, but used directly from its original location.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MISSING_ARTIFACT
download details used when the download "fails" when the artifact is simply missing on the
remote repository.
|
Constructor and Description |
---|
ArtifactDownloadReport(Artifact artifact) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Artifact |
getArtifact() |
ArtifactOrigin |
getArtifactOrigin() |
java.lang.String |
getDownloadDetails() |
DownloadStatus |
getDownloadStatus() |
long |
getDownloadTimeMillis() |
java.lang.String |
getExt() |
java.io.File |
getLocalFile()
Returns the File where the artifact is available on the local filesystem, or
null if and only if the artifact caching failed. |
java.lang.String |
getName() |
long |
getSize() |
java.lang.String |
getType() |
java.io.File |
getUnpackedLocalFile() |
int |
hashCode() |
boolean |
isDownloaded() |
void |
setArtifactOrigin(ArtifactOrigin origin) |
void |
setDownloadDetails(java.lang.String message) |
void |
setDownloadStatus(DownloadStatus downloadStatus) |
void |
setDownloadTimeMillis(long l) |
void |
setLocalFile(java.io.File localFile) |
void |
setSize(long size) |
void |
setUnpackedLocalFile(java.io.File unpackedLocalFile) |
java.lang.String |
toString() |
public static final java.lang.String MISSING_ARTIFACT
For historical reason the status can't be used to distinguish a real failure from a missing artifact by using the status, in both cases it's DownloadStatus.FAILED. The details message can be used for this purpose though.
public ArtifactDownloadReport(Artifact artifact)
public DownloadStatus getDownloadStatus()
public void setDownloadStatus(DownloadStatus downloadStatus)
public java.lang.String getName()
public java.lang.String getType()
public Artifact getArtifact()
public java.lang.String getExt()
public long getSize()
public void setSize(long size)
public void setArtifactOrigin(ArtifactOrigin origin)
public ArtifactOrigin getArtifactOrigin()
public void setDownloadDetails(java.lang.String message)
public java.lang.String getDownloadDetails()
public void setDownloadTimeMillis(long l)
public long getDownloadTimeMillis()
public java.lang.String toString()
toString
in class java.lang.Object
public java.io.File getLocalFile()
null
if and only if the artifact caching failed.public void setLocalFile(java.io.File localFile)
public boolean isDownloaded()
public void setUnpackedLocalFile(java.io.File unpackedLocalFile)
public java.io.File getUnpackedLocalFile()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object