mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 22:27:55 +01:00
Fix revert on zip format.
This commit is contained in:
parent
fc22dd32a2
commit
51f531f6b4
@ -23,6 +23,7 @@ import com.wisemapping.exceptions.WiseMappingException;
|
|||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface MindmapService {
|
public interface MindmapService {
|
||||||
@ -57,7 +58,7 @@ public interface MindmapService {
|
|||||||
|
|
||||||
boolean hasPermissions(@Nullable User user, int mapId, CollaborationRole allowedRole);
|
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;
|
MindMapHistory findMindmapHistory(int id, int hid) throws WiseMappingException;
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -242,9 +243,9 @@ public class MindmapServiceImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void revertChange(@NotNull Mindmap mindmap, int historyId)
|
public void revertChange(@NotNull Mindmap mindmap, int historyId)
|
||||||
throws WiseMappingException {
|
throws WiseMappingException, IOException {
|
||||||
final MindMapHistory history = mindmapManager.getHistory(historyId);
|
final MindMapHistory history = mindmapManager.getHistory(historyId);
|
||||||
mindmap.setXml(history.getXml());
|
mindmap.setZippedXml(history.getXml());
|
||||||
updateMindmap(mindmap, true);
|
updateMindmap(mindmap, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user