mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-22 14:17:57 +01:00
Fix rename issues.
This commit is contained in:
parent
fd021de86d
commit
8915e7eddf
@ -216,7 +216,7 @@ public class MindmapController extends BaseController {
|
|||||||
return lockInfo.getTimestamp();
|
return lockInfo.getTimestamp();
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.GET, value = { "/maps/{id}/document/xml","/maps/{id}/document/xml-pub"},consumes = {"text/plain"}, produces = {"application/xml"})
|
@RequestMapping(method = RequestMethod.GET, value = {"/maps/{id}/document/xml", "/maps/{id}/document/xml-pub"}, consumes = {"text/plain"}, produces = {"application/xml"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public byte[] retrieveDocument(@PathVariable int id, @NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
public byte[] retrieveDocument(@PathVariable int id, @NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
||||||
// I should not return byte, but there is some encoding issue here. Further research needed.
|
// I should not return byte, but there is some encoding issue here. Further research needed.
|
||||||
@ -227,9 +227,9 @@ public class MindmapController extends BaseController {
|
|||||||
return xmlStr.getBytes("UTF-8");
|
return xmlStr.getBytes("UTF-8");
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(method = RequestMethod.GET, value = { "/maps/{id}/{hid}/document/xml"},consumes = {"text/plain"}, produces = {"application/xml"})
|
@RequestMapping(method = RequestMethod.GET, value = {"/maps/{id}/{hid}/document/xml"}, consumes = {"text/plain"}, produces = {"application/xml"})
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public byte[] retrieveDocument(@PathVariable int id, @PathVariable int hid,@NotNull HttpServletResponse response) throws WiseMappingException, IOException {
|
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.
|
// I should not return byte, but there is some encoding issue here. Further research needed.
|
||||||
response.setCharacterEncoding("UTF-8");
|
response.setCharacterEncoding("UTF-8");
|
||||||
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
final MindMapHistory mindmapHistory = mindmapService.findMindmapHistory(id, hid);
|
||||||
@ -275,7 +275,7 @@ public class MindmapController extends BaseController {
|
|||||||
final User user = Utils.getUser();
|
final User user = Utils.getUser();
|
||||||
|
|
||||||
final String xml = restMindmap.getXml();
|
final String xml = restMindmap.getXml();
|
||||||
if (xml != null) {
|
if (xml != null && !xml.isEmpty()) {
|
||||||
mindmap.setXmlStr(xml);
|
mindmap.setXmlStr(xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +313,7 @@ public class MindmapController extends BaseController {
|
|||||||
@NotNull
|
@NotNull
|
||||||
private Mindmap findMindmapById(int id) throws MapCouldNotFoundException {
|
private Mindmap findMindmapById(int id) throws MapCouldNotFoundException {
|
||||||
Mindmap result = mindmapService.findMindmapById(id);
|
Mindmap result = mindmapService.findMindmapById(id);
|
||||||
if(result==null){
|
if (result == null) {
|
||||||
throw new MapCouldNotFoundException("Map could not be found. Id:" + id);
|
throw new MapCouldNotFoundException("Map could not be found. Id:" + id);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user