org.apache.ivy.core.report
Class ArtifactDownloadReport

java.lang.Object
  extended by org.apache.ivy.core.report.ArtifactDownloadReport

public class ArtifactDownloadReport
extends java.lang.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 java.lang.String MISSING_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
 Artifact getArtifact()
           
 ArtifactOrigin getArtifactOrigin()
           
 java.lang.String getDownloadDetails()
           
 java.io.File getDownloadedFile()
          Returns the file where the artifact has been downloaded, or null if and only if the download failed.
 DownloadStatus getDownloadStatus()
           
 long getDownloadTimeMillis()
           
 java.lang.String getExt()
           
 java.lang.String getName()
           
 long getSize()
           
 java.lang.String getType()
           
 void setArtifactOrigin(ArtifactOrigin origin)
           
 void setDownloadDetails(java.lang.String message)
           
 void setDownloadedFile(java.io.File downloadedFile)
           
 void setDownloadStatus(DownloadStatus downloadStatus)
           
 void setDownloadTimeMillis(long l)
           
 void setSize(long size)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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()

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:
toString in class java.lang.Object

getDownloadedFile

public java.io.File getDownloadedFile()
Returns the file where the artifact has been downloaded, or null if and only if the download failed.

Returns:
the file where the artifact has been downloaded

setDownloadedFile

public void setDownloadedFile(java.io.File downloadedFile)