Package io.manebot.artifact
Interface ArtifactRepository
-
- All Known Subinterfaces:
LocalArtifactRepository
,RemoteArtifactRepository
- All Known Implementing Classes:
AggregateArtifactRepository
,GlobalArtifactRepository
public interface ArtifactRepository
-
-
Method Summary
Modifier and Type Method Description default Artifact
getArtifact(ArtifactIdentifier identifier)
Gets an artifact by its identifier.default Artifact
getArtifact(java.lang.String packageId, java.lang.String artifactId, java.lang.String version)
Gets an artifact by its identifier.default ArtifactManifest
getManifest(ManifestIdentifier identifier)
Queries an artifact manifest on this repository.ArtifactManifest
getManifest(java.lang.String packageId, java.lang.String artifactId)
Queries an artifact manifest on this repository.boolean
isLocal()
Finds if this repository is a local repository.
-
-
-
Method Detail
-
isLocal
boolean isLocal()
Finds if this repository is a local repository.- Returns:
- true if the repository is local, false otherwise.
-
getManifest
default ArtifactManifest getManifest(ManifestIdentifier identifier) throws ArtifactRepositoryException, ArtifactNotFoundException
Queries an artifact manifest on this repository.- Parameters:
identifier
- ManifestIdentifier to query.- Returns:
- Artifact manifest.
- Throws:
ArtifactRepositoryException
- if an issue occurs while accessing the repositoryArtifactNotFoundException
- if the manifest cannot be found.
-
getManifest
ArtifactManifest getManifest(java.lang.String packageId, java.lang.String artifactId) throws ArtifactRepositoryException, ArtifactNotFoundException
Queries an artifact manifest on this repository.- Parameters:
packageId
- Package ID to query.artifactId
- Artifact ID to query.- Returns:
- Artifact manifest.
- Throws:
ArtifactRepositoryException
- if an issue occurs while accessing the repositoryArtifactNotFoundException
- if the manifest cannot be found.
-
getArtifact
default Artifact getArtifact(ArtifactIdentifier identifier) throws ArtifactRepositoryException, ArtifactNotFoundException
Gets an artifact by its identifier.- Parameters:
identifier
- Artifact identifier.- Returns:
- Artifact definition instance.
- Throws:
ArtifactRepositoryException
- if an issue occurs while accessing the repositoryArtifactNotFoundException
- if the manifest cannot be found.
-
getArtifact
default Artifact getArtifact(java.lang.String packageId, java.lang.String artifactId, java.lang.String version) throws ArtifactRepositoryException, ArtifactNotFoundException
Gets an artifact by its identifier.- Parameters:
packageId
- Package ID to query.artifactId
- Artifact ID to query.version
- Artifact version to query.- Returns:
- Artifact definition instance.
- Throws:
ArtifactRepositoryException
- if an issue occurs while accessing the repositoryArtifactNotFoundException
- if the manifest cannot be found.
-
-