Package com.artipie.composer.http
Interface Archive
-
- All Known Implementing Classes:
Archive.Zip
public interface Archive
Interface for working with archive file. For example, obtaining composer json file from archive.- Since:
- 0.4
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Archive.Name
Name of archive consisting of name and version.static class
Archive.Zip
Archive in ZIP format.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletionStage<javax.json.JsonObject>
composerFrom(com.artipie.asto.Content archive)
Obtains composer json file from archive.Archive.Name
name()
Obtains archive name.CompletionStage<com.artipie.asto.Content>
replaceComposerWith(com.artipie.asto.Content archive, byte[] composer)
Replaces composer json file in existing archive with new one.
-
-
-
Method Detail
-
composerFrom
CompletionStage<javax.json.JsonObject> composerFrom(com.artipie.asto.Content archive)
Obtains composer json file from archive.- Parameters:
archive
- Content of archive file- Returns:
- Composer json file from archive.
-
replaceComposerWith
CompletionStage<com.artipie.asto.Content> replaceComposerWith(com.artipie.asto.Content archive, byte[] composer)
Replaces composer json file in existing archive with new one.- Parameters:
archive
- Archive with existing composer jsoncomposer
- Composer json file that we will change the existing one to- Returns:
- Archive with replaced composer json file
-
name
Archive.Name name()
Obtains archive name.- Returns:
- Archive name.
-
-