public class ArtifactOrigin
extends java.lang.Object
BasicResolver
,
ResolvedResource
Constructor and Description |
---|
ArtifactOrigin(Artifact artifact,
boolean isLocal,
java.lang.String location)
Create a new instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
Artifact |
getArtifact()
Return the artifact that this location is pointing at.
|
java.lang.Long |
getLastChecked()
The last time the resource was checked to be up to date.
|
java.lang.String |
getLocation()
Return the location of the resource (normally a url)
|
int |
hashCode() |
boolean |
isExists() |
boolean |
isLocal()
Is this resource local to this host, i.e.
|
static boolean |
isUnknown(ArtifactOrigin artifact) |
static boolean |
isUnknown(java.lang.String location) |
void |
setExist(boolean exists) |
void |
setLastChecked(java.lang.Long lastChecked) |
void |
setLocation(java.lang.String location) |
java.lang.String |
toString() |
static ArtifactOrigin |
unkwnown(Artifact artifact)
ArtifactOrigin instance used when the origin is unknown.
|
public ArtifactOrigin(Artifact artifact, boolean isLocal, java.lang.String location)
artifact
- the artifact pointed by this location. Must not be null
.isLocal
- boolean
value indicating if the resource is local (on the
filesystem).location
- the location of the resource (normally a url). Must not be null
.public static final ArtifactOrigin unkwnown(Artifact artifact)
public static final boolean isUnknown(ArtifactOrigin artifact)
public static final boolean isUnknown(java.lang.String location)
public boolean isLocal()
boolean
value indicating if the resource is local.public java.lang.String getLocation()
public void setLocation(java.lang.String location)
public Artifact getArtifact()
public java.lang.Long getLastChecked()
null
if this
information is not actually used by in some case.public void setLastChecked(java.lang.Long lastChecked)
public boolean isExists()
public void setExist(boolean exists)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object