Package com.artipie.composer
Class Repository
- java.lang.Object
-
- com.artipie.composer.Repository
-
public class Repository extends Object
Class representing PHP Composer repository.- Since:
- 0.1
-
-
Field Summary
Fields Modifier and Type Field Description static com.artipie.asto.KeyALL_PACKAGESKey to all packages.
-
Constructor Summary
Constructors Constructor Description Repository(com.artipie.asto.Storage storage)Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>add(com.artipie.asto.Key key)Adds package described in JSON format from storage.Packagespackages()Reads packages description from storage.Packagespackages(Name name)Reads packages description from storage.
-
-
-
Method Detail
-
packages
public Packages packages() throws InterruptedException
Reads packages description from storage.- Returns:
- Packages found by name, might be empty.
- Throws:
InterruptedException- In case the thread was interrupted.
-
packages
public Packages packages(Name name) throws InterruptedException
Reads packages description from storage.- Parameters:
name- Package name.- Returns:
- Packages found by name, might be empty.
- Throws:
InterruptedException- In case the thread was interrupted.
-
add
public CompletableFuture<Void> add(com.artipie.asto.Key key) throws IOException, InterruptedException
Adds package described in JSON format from storage.- Parameters:
key- Key to find content of package JSON.- Returns:
- Completion of adding package to repository.
- Throws:
IOException- In case exception occurred on operations with storage.InterruptedException- In case the thread was interrupted.
-
-