Class ArtifactOrigin


  • public class ArtifactOrigin
    extends java.lang.Object
    This class contains information about the origin of an artifact.
    See Also:
    BasicResolver, ResolvedResource
    • 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 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 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. Maybe null 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object