aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-api
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2020-03-08 21:18:50 +0100
committerMartin Stockhammer <martin_s@apache.org>2020-03-08 21:18:50 +0100
commitf266538fc535beb140e6cd88c839e20c4c51d24e (patch)
tree70078e56d8cd13e41f6dc971834368d871f53281 /archiva-modules/archiva-base/archiva-repository-api
parentc2f785a2099927f490d4883502e867b05e1ac745 (diff)
downloadarchiva-f266538fc535beb140e6cd88c839e20c4c51d24e.tar.gz
archiva-f266538fc535beb140e6cd88c839e20c4c51d24e.zip
Adding version list methods and tests
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-api')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java
index 09e7621e6..9a25aa6b1 100644
--- a/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java
+++ b/archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/ManagedRepositoryContent.java
@@ -125,6 +125,7 @@ public interface ManagedRepositoryContent extends RepositoryContent
*/
Version getVersion(ItemSelector versionCoordinates) throws ContentAccessException, IllegalArgumentException;
+
/**
* Returns the artifact object for the given coordinates.
*
@@ -196,13 +197,37 @@ public interface ManagedRepositoryContent extends RepositoryContent
List<? extends Project> getProjects( Namespace namespace) throws ContentAccessException;
/**
+ * Returns the list of projects that match the given selector. The selector must at least specify a
+ * a namespace.
+ *
+ * @param selector the selector
+ * @return the list of projects that match the selector. A empty list of not project matches.
+ * @throws ContentAccessException if the access to the storage backend failed
+ * @throws IllegalArgumentException if the selector does not contain sufficient data for selecting projects
+ */
+ List<? extends Project> getProjects( ItemSelector selector ) throws ContentAccessException, IllegalArgumentException;
+
+ /**
* Return the existing versions of the given project.
*
* @param project the project
* @return a list of versions or a empty list, if not versions are available for the specified project
+ * @throws ContentAccessException if the access to the underlying storage failed
*/
List<? extends Version> getVersions( Project project) throws ContentAccessException;
+
+ /**
+ * Return the versions that match the given selector. The selector must at least specify a namespace and a projectId.
+ *
+ * @param selector the item selector. At least namespace and projectId must be set.
+ * @return the list of version or a empty list, if no version matches the selector
+ * @throws ContentAccessException if the access to the backend failed
+ * @throws IllegalArgumentException if the selector does not contain enough information for selecting versions
+ */
+ List<? extends Version> getVersions( ItemSelector selector ) throws ContentAccessException, IllegalArgumentException;
+
+
/**
* Return all the artifacts of a given content item (namespace, project, version)
*