diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java index b012c121..a78dd26d 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapService.java @@ -23,6 +23,7 @@ import com.wisemapping.exceptions.WiseMappingException; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.io.IOException; import java.util.List; public interface MindmapService { @@ -57,7 +58,7 @@ public interface MindmapService { boolean hasPermissions(@Nullable User user, int mapId, CollaborationRole allowedRole); - void revertChange(@NotNull Mindmap map, int historyId) throws WiseMappingException; + void revertChange(@NotNull Mindmap map, int historyId) throws WiseMappingException, IOException; MindMapHistory findMindmapHistory(int id, int hid) throws WiseMappingException; diff --git a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java index e4fc70f8..05b6e1bf 100755 --- a/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java +++ b/wise-webapp/src/main/java/com/wisemapping/service/MindmapServiceImpl.java @@ -28,6 +28,7 @@ import org.jetbrains.annotations.Nullable; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import java.io.IOException; import java.util.Calendar; import java.util.List; import java.util.Set; @@ -242,9 +243,9 @@ public class MindmapServiceImpl @Override public void revertChange(@NotNull Mindmap mindmap, int historyId) - throws WiseMappingException { + throws WiseMappingException, IOException { final MindMapHistory history = mindmapManager.getHistory(historyId); - mindmap.setXml(history.getXml()); + mindmap.setZippedXml(history.getXml()); updateMindmap(mindmap, true); }