From dcd59efc127cb7701f94ac5d4cdd0529fda20094 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 26 Mar 2013 22:58:45 -0300 Subject: [PATCH] Add history purge. --- .../java/com/wisemapping/rest/AdminController.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index 3f385fff..681cbef1 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -179,10 +179,16 @@ public class AdminController extends BaseController { e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. } } - - } + @ResponseStatus(value = HttpStatus.NO_CONTENT) + @RequestMapping(method = RequestMethod.GET, value = "admin/database/purge/history") + public void purgeHistory(@RequestParam(required = true) Integer mapId) throws WiseMappingException, UnsupportedEncodingException { + + mindmapService.removeHistory(mapId); + } + + private boolean isWelcomeMap(@NotNull Mindmap mindmap) throws UnsupportedEncodingException { // Is welcome map ? final String xmlStr = mindmap.getXmlStr();