Package org.apache.ivy.core.cache
Class ArtifactOrigin
- java.lang.Object
-
- org.apache.ivy.core.cache.ArtifactOrigin
-
public class ArtifactOrigin extends java.lang.Object
This class contains information about the origin of an artifact.- See Also:
BasicResolver
,ResolvedResource
-
-
Constructor Summary
Constructors Constructor Description ArtifactOrigin(Artifact artifact, boolean isLocal, java.lang.String location)
Create a new instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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(java.lang.String location)
static boolean
isUnknown(ArtifactOrigin artifact)
void
setExist(boolean exists)
void
setLastChecked(java.lang.Long lastChecked)
void
setLocation(java.lang.String location)
java.lang.String
toString()
static ArtifactOrigin
unknown(Artifact artifact)
ArtifactOrigin instance used when the origin is unknown.static ArtifactOrigin
unkwnown(Artifact artifact)
Deprecated.because of renaming due spell check.
-
-
-
Constructor Detail
-
ArtifactOrigin
public ArtifactOrigin(Artifact artifact, boolean isLocal, java.lang.String location)
Create a new instance- Parameters:
artifact
- the artifact pointed by this location. Must not benull
.isLocal
-boolean
value indicating if the resource is local (on the filesystem).location
- the location of the resource (normally a url). Must not benull
.
-
-
Method Detail
-
unkwnown
@Deprecated public static final ArtifactOrigin unkwnown(Artifact artifact)
Deprecated.because of renaming due spell check.- Parameters:
artifact
- ditto- Returns:
- ArtifactOrigin
-
unknown
public static final ArtifactOrigin unknown(Artifact artifact)
ArtifactOrigin instance used when the origin is unknown.- Parameters:
artifact
- ditto- Returns:
- ArtifactOrigin
-
isUnknown
public static final boolean isUnknown(ArtifactOrigin artifact)
-
isUnknown
public static final boolean isUnknown(java.lang.String location)
-
isLocal
public boolean isLocal()
Is this resource local to this host, i.e. is it on the file system?- Returns:
boolean
value indicating if the resource is local.
-
getLocation
public java.lang.String getLocation()
Return the location of the resource (normally a url)- Returns:
- the location of the resource
-
setLocation
public void setLocation(java.lang.String location)
-
getArtifact
public Artifact getArtifact()
Return the artifact that this location is pointing at.- Returns:
- the artifact that this location is pointing at.
-
getLastChecked
public java.lang.Long getLastChecked()
The last time the resource was checked to be up to date. Maybenull
if this information is not actually used by in some case.- Returns:
- Long timestamp
-
setLastChecked
public void setLastChecked(java.lang.Long lastChecked)
-
isExists
public boolean isExists()
-
setExist
public void setExist(boolean exists)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-