Package org.apache.ivy.core.report
Class ArtifactDownloadReport
java.lang.Object
org.apache.ivy.core.report.ArtifactDownloadReport
- Direct Known Subclasses:
MetadataArtifactDownloadReport
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
FieldsModifier and TypeFieldDescriptionstatic final String
download details used when the download "fails" when the artifact is simply missing on the remote repository. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
long
getExt()
Returns the File where the artifact is available on the local filesystem, ornull
if and only if the artifact caching failed.getName()
long
getSize()
getType()
int
hashCode()
boolean
void
setArtifactOrigin
(ArtifactOrigin origin) void
setDownloadDetails
(String message) void
setDownloadStatus
(DownloadStatus downloadStatus) void
setDownloadTimeMillis
(long l) void
setLocalFile
(File localFile) void
setSize
(long size) void
setUnpackedArtifact
(Artifact unpackedArtifact) void
setUnpackedLocalFile
(File unpackedLocalFile) toString()
-
Field Details
-
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:
-
-
Constructor Details
-
ArtifactDownloadReport
-
-
Method Details
-
getDownloadStatus
-
setDownloadStatus
-
getName
-
getType
- Returns:
- the type of the downloaded artifact
-
getArtifact
-
getExt
-
getSize
public long getSize() -
setSize
public void setSize(long size) -
setArtifactOrigin
-
getArtifactOrigin
-
setDownloadDetails
-
getDownloadDetails
-
setDownloadTimeMillis
public void setDownloadTimeMillis(long l) -
getDownloadTimeMillis
public long getDownloadTimeMillis() -
toString
-
getLocalFile
Returns the File where the artifact is available on the local filesystem, ornull
if and only if the artifact caching failed.- Returns:
- the file where the artifact is now available on the local filesystem.
-
setLocalFile
-
isDownloaded
public boolean isDownloaded() -
setUnpackedLocalFile
-
getUnpackedLocalFile
-
setUnpackedArtifact
-
getUnpackedArtifact
-
hashCode
public int hashCode() -
equals
-