org.apache.ivy.core.report

Class ArtifactDownloadReport

public class ArtifactDownloadReport extends Object

Report on the download of an artifact from a repository to a local (cached) file.

Note that depending on cache implementation, the artifact may not be actually downloaded, but used directly from its original location.

Field Summary
static StringMISSING_ARTIFACT
download details used when the download "fails" when the artifact is simply missing on the remote repository.
Constructor Summary
ArtifactDownloadReport(Artifact artifact)
Method Summary
booleanequals(Object obj)
ArtifactgetArtifact()
ArtifactOrigingetArtifactOrigin()
StringgetDownloadDetails()
DownloadStatusgetDownloadStatus()
longgetDownloadTimeMillis()
StringgetExt()
FilegetLocalFile()
Returns the File where the artifact is available on the local filesystem, or null if and only if the artifact caching failed.
StringgetName()
longgetSize()
StringgetType()
inthashCode()
booleanisDownloaded()
voidsetArtifactOrigin(ArtifactOrigin origin)
voidsetDownloadDetails(String message)
voidsetDownloadStatus(DownloadStatus downloadStatus)
voidsetDownloadTimeMillis(long l)
voidsetLocalFile(File localFile)
voidsetSize(long size)
StringtoString()

Field Detail

MISSING_ARTIFACT

public static final String MISSING_ARTIFACT
download details used when the download "fails" when the artifact is simply missing on the remote repository.

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.

Constructor Detail

ArtifactDownloadReport

public ArtifactDownloadReport(Artifact artifact)

Method Detail

equals

public boolean equals(Object obj)

getArtifact

public Artifact getArtifact()

getArtifactOrigin

public ArtifactOrigin getArtifactOrigin()

getDownloadDetails

public String getDownloadDetails()

getDownloadStatus

public DownloadStatus getDownloadStatus()

getDownloadTimeMillis

public long getDownloadTimeMillis()

getExt

public String getExt()

getLocalFile

public File getLocalFile()
Returns the File where the artifact is available on the local filesystem, or null if and only if the artifact caching failed.

Returns: the file where the artifact is now available on the local filesystem.

getName

public String getName()

getSize

public long getSize()

getType

public String getType()

Returns: the type of the downloaded artifact

hashCode

public int hashCode()

isDownloaded

public boolean isDownloaded()

setArtifactOrigin

public void setArtifactOrigin(ArtifactOrigin origin)

setDownloadDetails

public void setDownloadDetails(String message)

setDownloadStatus

public void setDownloadStatus(DownloadStatus downloadStatus)

setDownloadTimeMillis

public void setDownloadTimeMillis(long l)

setLocalFile

public void setLocalFile(File localFile)

setSize

public void setSize(long size)

toString

public String toString()