mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Add new files.
This commit is contained in:
parent
9360a27f15
commit
d1dfb48be5
@ -182,6 +182,15 @@ public class MindmapController extends BaseController {
|
|||||||
return mindmap.getXmlStr().getBytes("UTF-8");
|
return mindmap.getXmlStr().getBytes("UTF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.GET, value = { "/maps/{id}/{hid}/document/xml"},consumes = {"text/plain"}, produces = {"application/xml"})
|
||||||
|
@ResponseBody
|
||||||
|
public byte[] retrieveDocument(@PathVariable int id, @PathVariable int hid,@NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
||||||
|
// I should not return byte, but there is some encoding issue here. Further research needed.
|
||||||
|
response.setCharacterEncoding("UTF-8");
|
||||||
|
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
||||||
|
return mindmapHistory.getXml();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void verifyLock(@NotNull Mindmap mindmap, @NotNull User user, long session, long timestamp) throws WiseMappingException {
|
private void verifyLock(@NotNull Mindmap mindmap, @NotNull User user, long session, long timestamp) throws WiseMappingException {
|
||||||
|
|
||||||
|
@ -194,12 +194,7 @@ public class MindmapController {
|
|||||||
|
|
||||||
final String result = showMindmapEditorPage(id, model);
|
final String result = showMindmapEditorPage(id, model);
|
||||||
model.addAttribute("readOnlyMode", true);
|
model.addAttribute("readOnlyMode", true);
|
||||||
|
model.addAttribute("hid",hid);
|
||||||
// Change map XML ....
|
|
||||||
final MindMapBean mindmapBean = (MindMapBean) model.asMap().get("mindmap");
|
|
||||||
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
|
||||||
mindmapBean.getDelegated().setXml(mindmapHistory.getXml());
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
);
|
);
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${memoryPersistence || readOnlyMode}">
|
<c:if test="${memoryPersistence || readOnlyMode}">
|
||||||
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}/document/xml${principal!=null?'':'-pub'}");
|
options.persistenceManager = new mindplot.LocalStorageManager("c/restful/maps/{id}${hid!=null?'/'+hid:''}/document/xml${principal!=null?'':'-pub'}");
|
||||||
</c:if>
|
</c:if>
|
||||||
|
|
||||||
var userOptions = ${mindmap.properties};
|
var userOptions = ${mindmap.properties};
|
||||||
|
Loading…
Reference in New Issue
Block a user