Class ArtifactOrigin

java.lang.Object
org.apache.ivy.core.cache.ArtifactOrigin

public class ArtifactOrigin extends Object
This class contains information about the origin of an artifact.
See Also:
  • Constructor Details

    • ArtifactOrigin

      public ArtifactOrigin(Artifact artifact, boolean isLocal, String location)
      Create a new instance
      Parameters:
      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.
  • Method Details

    • 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(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 String getLocation()
      Return the location of the resource (normally a url)
      Returns:
      the location of the resource
    • setLocation

      public void setLocation(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 Long getLastChecked()
      The last time the resource was checked to be up to date. Maybe null if this information is not actually used by in some case.
      Returns:
      Long timestamp
    • setLastChecked

      public void setLastChecked(Long lastChecked)
    • isExists

      public boolean isExists()
    • setExist

      public void setExist(boolean exists)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object