Interface ArtifactRepositoryManagerConnector
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
ArchivaConnector
The interface which all artifact repository manager connectors shall implements.
- Author:
- Zleurtor
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a new artifact repository manager connector listener.void
close()
void
Download the content of the specified URL to the given file.int
searchArtifactSize
(String groupId, String artifactId, String version, String classifier, String packaging) Searches the size of the artifact having the specified groupId, artifactId, version and classifier.searchArtifactUrl
(String groupId, String artifactId, String version, String classifier, String packaging) Searches the URL for accessing to the artifact having the specified groupId, artifactId, version and classifier.searchLatestVersion
(String groupId, String artifactId) Searches (and returns) the latest release version for the specified groupId and artifactId.
-
Method Details
-
searchLatestVersion
Searches (and returns) the latest release version for the specified groupId and artifactId.- Parameters:
groupId
- The groupId of the artifact for which the versions are queried.artifactId
- The artifactId of the artifact for which the versions are queried.- Returns:
- All the latest release version for the specified groupId and artifactId.
-
searchArtifactUrl
URL searchArtifactUrl(String groupId, String artifactId, String version, String classifier, String packaging) throws MalformedURLException Searches the URL for accessing to the artifact having the specified groupId, artifactId, version and classifier.- Parameters:
groupId
- The group id of the queried artifact.artifactId
- The artifact id of the queried artifact.version
- The version of the queried artifact.classifier
- The classifier of the queried artifact.packaging
- The packaging of the queried artifact.- Returns:
- The URL for accessing to the artifact having the specified groupId, artifactId, version and classifier.
- Throws:
MalformedURLException
- If a URL is malformed.
-
searchArtifactSize
int searchArtifactSize(String groupId, String artifactId, String version, String classifier, String packaging) throws MalformedURLException Searches the size of the artifact having the specified groupId, artifactId, version and classifier.- Parameters:
groupId
- The group id of the queried artifact.artifactId
- The artifact id of the queried artifact.version
- The version of the queried artifact.classifier
- The classifier of the queried artifact.packaging
- The packaging of the queried artifact.- Returns:
- The URL for accessing to the artifact having the specified groupId, artifactId, version and classifier.
- Throws:
MalformedURLException
- If a URL is malformed.
-
download
Download the content of the specified URL to the given file.- Parameters:
source
- The URL of which the content shall be downloaded.size
- The size of the artifact to download.dest
- The file to which the URL content shall be downloaded.- Throws:
IOException
- If an input/output error occurs during download.URISyntaxException
- If a URI is malformed.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
addArtifactRepositoryManagerConnectorListener
void addArtifactRepositoryManagerConnectorListener(ArtifactRepositoryManagerConnectorListener listener) Add a new artifact repository manager connector listener.- Parameters:
listener
- The new artifact repository manager connector listener.
-