Fix revert on zip format.

This commit is contained in:
Paulo Gustavo Veiga 2013-02-13 23:13:27 -03:00
parent fc22dd32a2
commit 51f531f6b4
2 changed files with 5 additions and 3 deletions

View File

@ -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;

View File

@ -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);
}