Package com.artipie.conan
Class RevisionsIndexApi
java.lang.Object
com.artipie.conan.RevisionsIndexApi
Conan V2 API - main revisions index APIs. Revisions index stored in revisions.txt file
in json format.
There are 2+ index files: recipe revisions and binary revisions (per package).
- Since:
- 0.1
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddBinaryRevision
(int reciperev, String hash, int revision) Add binary revision to the index.addRecipeRevision
(int revision) Add new revision to the recipe index.Updates binary index file.getBinaryRevisions
(int reciperev, String hash) Returns list of revisions for the package binary.getLastBinaryRevision
(int reciperev, String hash) Returns last (max) revision number for binary revision index.Returns last (max) recipe revision value.getPackageList
(int reciperev) Returns binary packages list (of hashes) for given recipe revision.Returns list of revisions for the recipe.removeBinaryRevision
(int reciperev, String hash, int revision) Removes specified revision from index file of package binary.removeRecipeRevision
(int revision) Removes specified revision from index file of package recipe.updateBinaryIndex
(int reciperev, String hash) Updates binary index file.Updates recipe index file, non recursive, doesn't affect package binaries.
-
Constructor Details
-
RevisionsIndexApi
Initializes new instance.- Parameters:
storage
- Current Artipie storage instance.pkgkey
- Package key for repository package data (full name).
-
-
Method Details
-
updateRecipeIndex
Updates recipe index file, non recursive, doesn't affect package binaries.- Returns:
- CompletableFuture with recipe revisions list.
-
updateBinaryIndex
Updates binary index file.- Parameters:
reciperev
- Recipe revision number.hash
- Target package binary hash.- Returns:
- CompletableFuture with recipe revisions list.
-
fullIndexUpdate
Updates binary index file. Fully recursive. Does updateRecipeIndex(), then for each revision invalid input: '&' for each pkg binary updateBinaryIndex().- Returns:
- CompletionStage to handle operation completion.
-
addRecipeRevision
Add new revision to the recipe index.- Parameters:
revision
- Revision number.- Returns:
- CompletionStage for this operation.
-
getRecipeRevisions
Returns list of revisions for the recipe.- Returns:
- CompletionStage with the list.
-
removeRecipeRevision
Removes specified revision from index file of package recipe.- Parameters:
revision
- Revision number.- Returns:
- CompletionStage with boolean == true if recipe invalid input: '&' revision were found.
-
getLastRecipeRevision
Returns last (max) recipe revision value.- Returns:
- CompletableFuture with recipe revision as Integer.
-
getBinaryRevisions
Returns list of revisions for the package binary.- Parameters:
reciperev
- Recipe revision number.hash
- Target package binary hash.- Returns:
- CompletionStage with the list.
-
getLastBinaryRevision
Returns last (max) revision number for binary revision index.- Parameters:
reciperev
- Recipe revision number.hash
- Target package binary hash.- Returns:
- CompletableFuture with recipe revision as Integer.
-
removeBinaryRevision
Removes specified revision from index file of package binary.- Parameters:
reciperev
- Recipe revision number.hash
- Target package binary hash.revision
- Revision number of the binary.- Returns:
- CompletionStage with boolean == true if recipe invalid input: '&' revision were found.
-
addBinaryRevision
Add binary revision to the index.- Parameters:
reciperev
- Recipe revision number.hash
- Package binary hash.revision
- Package binary revision.- Returns:
- CompletionStage to handle operation completion.
-
getPackageList
Returns binary packages list (of hashes) for given recipe revision.- Parameters:
reciperev
- Revision number of the recipe.- Returns:
- CompletionStage with the list of package binaries (hashes) as strings.
-