Package org.apache.ivy.core.report
Class ArtifactDownloadReport
- java.lang.Object
-
- org.apache.ivy.core.report.ArtifactDownloadReport
-
- Direct Known Subclasses:
MetadataArtifactDownloadReport
public class ArtifactDownloadReport extends java.lang.ObjectReport 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
Fields Modifier and Type Field Description static java.lang.StringMISSING_ARTIFACTdownload details used when the download "fails" when the artifact is simply missing on the remote repository.
-
Constructor Summary
Constructors Constructor Description ArtifactDownloadReport(Artifact artifact)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)ArtifactgetArtifact()ArtifactOrigingetArtifactOrigin()java.lang.StringgetDownloadDetails()DownloadStatusgetDownloadStatus()longgetDownloadTimeMillis()java.lang.StringgetExt()java.io.FilegetLocalFile()Returns the File where the artifact is available on the local filesystem, ornullif and only if the artifact caching failed.java.lang.StringgetName()longgetSize()java.lang.StringgetType()ArtifactgetUnpackedArtifact()java.io.FilegetUnpackedLocalFile()inthashCode()booleanisDownloaded()voidsetArtifactOrigin(ArtifactOrigin origin)voidsetDownloadDetails(java.lang.String message)voidsetDownloadStatus(DownloadStatus downloadStatus)voidsetDownloadTimeMillis(long l)voidsetLocalFile(java.io.File localFile)voidsetSize(long size)voidsetUnpackedArtifact(Artifact unpackedArtifact)voidsetUnpackedLocalFile(java.io.File unpackedLocalFile)java.lang.StringtoString()
-
-
-
Field Detail
-
MISSING_ARTIFACT
public static final java.lang.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.
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ArtifactDownloadReport
public ArtifactDownloadReport(Artifact artifact)
-
-
Method Detail
-
getDownloadStatus
public DownloadStatus getDownloadStatus()
-
setDownloadStatus
public void setDownloadStatus(DownloadStatus downloadStatus)
-
getName
public java.lang.String getName()
-
getType
public java.lang.String getType()
- Returns:
- the type of the downloaded artifact
-
getArtifact
public Artifact getArtifact()
-
getExt
public java.lang.String getExt()
-
getSize
public long getSize()
-
setSize
public void setSize(long size)
-
setArtifactOrigin
public void setArtifactOrigin(ArtifactOrigin origin)
-
getArtifactOrigin
public ArtifactOrigin getArtifactOrigin()
-
setDownloadDetails
public void setDownloadDetails(java.lang.String message)
-
getDownloadDetails
public java.lang.String getDownloadDetails()
-
setDownloadTimeMillis
public void setDownloadTimeMillis(long l)
-
getDownloadTimeMillis
public long getDownloadTimeMillis()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getLocalFile
public java.io.File getLocalFile()
Returns the File where the artifact is available on the local filesystem, ornullif and only if the artifact caching failed.- Returns:
- the file where the artifact is now available on the local filesystem.
-
setLocalFile
public void setLocalFile(java.io.File localFile)
-
isDownloaded
public boolean isDownloaded()
-
setUnpackedLocalFile
public void setUnpackedLocalFile(java.io.File unpackedLocalFile)
-
getUnpackedLocalFile
public java.io.File getUnpackedLocalFile()
-
setUnpackedArtifact
public void setUnpackedArtifact(Artifact unpackedArtifact)
-
getUnpackedArtifact
public Artifact getUnpackedArtifact()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-