Package io.manebot.artifact
Interface Artifact
-
- All Known Subinterfaces:
LocalArtifact
,RemoteArtifact
public interface Artifact
-
-
Method Summary
Modifier and Type Method Description java.lang.String
getClassifier()
Gets the artifact's classifier.java.util.Collection<ArtifactDependency>
getDependencies()
Finds the direct dependencies for this artifact.java.util.Collection<ArtifactDependency>
getDependencyGraph()
Finds the runtime dependencies for this artifact.java.lang.String
getExtension()
Gets the artifact's extension.ArtifactIdentifier
getIdentifier()
Gets this artifact's identifier.ArtifactManifest
getManifest()
Gets this artifact's manifest.java.net.URI
getUri()
Gets this artifact's root resource URI.default java.lang.String
getVersion()
Gets this plugin's version.boolean
hasObtained()
Finds if the Artifact instance has been obtained.default boolean
isOutOfDate()
Finds if this artifact is out-of-date (i.e.LocalArtifact
obtain()
Obtains this artifact locally.
-
-
-
Method Detail
-
getIdentifier
ArtifactIdentifier getIdentifier()
Gets this artifact's identifier.- Returns:
- artifact identifier.
-
getManifest
ArtifactManifest getManifest()
Gets this artifact's manifest.- Returns:
- Artifact manifest.
-
getExtension
java.lang.String getExtension()
Gets the artifact's extension.- Returns:
- extension.
-
getClassifier
java.lang.String getClassifier()
Gets the artifact's classifier.- Returns:
- artifact classifier
-
isOutOfDate
default boolean isOutOfDate()
Finds if this artifact is out-of-date (i.e. a newer version exists)- Returns:
- true if this artifact is out-of-date, false otherwise.
-
getVersion
default java.lang.String getVersion()
Gets this plugin's version.- Returns:
- Version.
-
getUri
java.net.URI getUri()
Gets this artifact's root resource URI.- Returns:
- Artifact root resource URI.
-
hasObtained
boolean hasObtained()
Finds if the Artifact instance has been obtained.- Returns:
- true if the artifact is obtained, false otherwise.
-
obtain
LocalArtifact obtain() throws ArtifactRepositoryException, ArtifactNotFoundException
Obtains this artifact locally.- Returns:
- Local artifact.
- Throws:
ArtifactRepositoryException
ArtifactNotFoundException
-
getDependencyGraph
java.util.Collection<ArtifactDependency> getDependencyGraph() throws ArtifactNotFoundException
Finds the runtime dependencies for this artifact.- Returns:
- immutable list of this artifact's dependencies.
- Throws:
ArtifactNotFoundException
-
getDependencies
java.util.Collection<ArtifactDependency> getDependencies() throws ArtifactNotFoundException
Finds the direct dependencies for this artifact.- Returns:
- immutable list of this artifact's provided dependencies.
- Throws:
ArtifactNotFoundException
-
-