public class Artifact extends Object implements Comparable<Artifact>
Constructor and Description |
---|
Artifact(File file,
URL originUrl,
boolean isVolatile,
PackagingContext packagingContext)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Artifact o) |
boolean |
equals(Object o) |
File |
getFile()
The artifact's intended absolute location in the filesystem.
|
byte[] |
getFileDigest()
The cached digest for the file.
|
byte[] |
getOriginDigest()
The cached digest for the origin.
|
URL |
getOriginUrl()
This URL points to the read-only original source for this artifact.
|
String |
getPath()
The artifact's intended location in the filesystem relative to the
packagingContext root.
|
int |
hashCode() |
boolean |
isVolatile()
True if volatile.
|
String |
toString() |
byte[] |
unpack(ArtifactManager managedArtifacts,
boolean overwrite,
boolean verify)
Copies the artifact from its origin URI to its intended location in the
filesystem.
|
public Artifact(File file, URL originUrl, boolean isVolatile, PackagingContext packagingContext)
file
- The intended absolute destination in the filesystemoriginUrl
- The origin URLisVolatile
- True if volatilepackagingContext
- The packagingContextpublic File getFile()
public String getPath()
public byte[] getFileDigest() throws SincerityException
SincerityException
- In case of an errorpublic URL getOriginUrl()
public byte[] getOriginDigest() throws SincerityException
SincerityException
- In case of an errorpublic boolean isVolatile()
public byte[] unpack(ArtifactManager managedArtifacts, boolean overwrite, boolean verify) throws SincerityException
managedArtifacts
- The managed artifactsoverwrite
- Whether to overwrite the file if it already existsverify
- Whether to verify the unpackingSincerityException
- In case of an errorpublic int compareTo(Artifact o)
compareTo
in interface Comparable<Artifact>
Copyright © 2011-2016 Three Crickets LLC.