Class ArtifactDownloadReport

java.lang.Object
org.apache.ivy.core.report.ArtifactDownloadReport
Direct Known Subclasses:
MetadataArtifactDownloadReport

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 Details

    • 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.

      See Also:
  • Constructor Details

    • ArtifactDownloadReport

      public ArtifactDownloadReport(Artifact artifact)
  • Method Details

    • getDownloadStatus

      public DownloadStatus getDownloadStatus()
    • setDownloadStatus

      public void setDownloadStatus(DownloadStatus downloadStatus)
    • getName

      public String getName()
    • getType

      public String getType()
      Returns:
      the type of the downloaded artifact
    • getArtifact

      public Artifact getArtifact()
    • getExt

      public 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(String message)
    • getDownloadDetails

      public String getDownloadDetails()
    • setDownloadTimeMillis

      public void setDownloadTimeMillis(long l)
    • getDownloadTimeMillis

      public long getDownloadTimeMillis()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • 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.
    • setLocalFile

      public void setLocalFile(File localFile)
    • isDownloaded

      public boolean isDownloaded()
    • setUnpackedLocalFile

      public void setUnpackedLocalFile(File unpackedLocalFile)
    • getUnpackedLocalFile

      public File getUnpackedLocalFile()
    • setUnpackedArtifact

      public void setUnpackedArtifact(Artifact unpackedArtifact)
    • getUnpackedArtifact

      public Artifact getUnpackedArtifact()
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object