From 19732b785f222871a76f931213587b2c04cc1e10 Mon Sep 17 00:00:00 2001
From: Kai Reinhard <K.Reinhard@micromata.de>
Date: Fri, 14 Dec 2018 21:56:53 +0000
Subject: [PATCH] ...
---
borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java b/borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java
index 8812d65..e45f177 100644
--- a/borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java
+++ b/borgbutler-server/src/main/java/de/micromata/borgbutler/server/rest/ReposRest.java
@@ -24,16 +24,32 @@
@Produces(MediaType.APPLICATION_JSON)
/**
*
- * @param id
+ * @param id id or name of repo.
* @param prettyPrinter If true then the json output will be in pretty format.
+ * @return Repository (without list of archives) as json string.
* @see JsonUtils#toJson(Object, boolean)
*/
- public String getTemplate(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
+ public String getRepo(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
Repository repository = ButlerCache.getInstance().getRepository(id);
return JsonUtils.toJson(repository, prettyPrinter);
}
@GET
+ @Path("repoArchiveList")
+ @Produces(MediaType.APPLICATION_JSON)
+ /**
+ *
+ * @param id id or name of repo.
+ * @param prettyPrinter If true then the json output will be in pretty format.
+ * @return Repository (including list of archives) as json string.
+ * @see JsonUtils#toJson(Object, boolean)
+ */
+ public String getRepoArchiveList(@QueryParam("id") String id, @QueryParam("prettyPrinter") boolean prettyPrinter) {
+ Repository repository = ButlerCache.getInstance().getRepositoryArchives(id);
+ return JsonUtils.toJson(repository, prettyPrinter);
+ }
+
+ @GET
@Path("list")
@Produces(MediaType.APPLICATION_JSON)
/**
--
Gitblit v1.10.0