Complete mindjet integration.

This commit is contained in:
Paulo Gustavo Veiga
2013-03-29 11:49:59 -03:00
parent ed508d646c
commit 2c355205d0
79 changed files with 3156 additions and 11770 deletions

View File

@@ -99,6 +99,17 @@ public class MindmapController extends BaseController {
return new ModelAndView("transformViewTxt", values);
}
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/vnd.mindjet.mindmanager"}, params = {"download=mmap"})
@ResponseBody
public ModelAndView retrieveDocumentAsMindJet(@PathVariable int id) throws IOException {
final Mindmap mindMap = mindmapService.findMindmapById(id);
final Map<String, Object> values = new HashMap<String, Object>();
values.put("content", mindMap.getXmlStr());
values.put("filename", mindMap.getTitle());
return new ModelAndView("transformViewMMap", values);
}
@RequestMapping(method = RequestMethod.GET, value = "/maps/{id}", produces = {"application/vnd.ms-excel"}, params = {"download=xls"})
@ResponseBody
public ModelAndView retrieveDocumentAsExcel(@PathVariable int id) throws IOException {

View File

@@ -86,7 +86,7 @@ public class TransformView extends AbstractView {
final Object mindmap = viewMap.get("mindmap");
final StreamResult result = new StreamResult(outputStream);
jaxbMarshaller.marshal(mindmap, result);
} else if (exportFormat == ExportFormat.MICROSOFT_EXCEL || exportFormat == ExportFormat.TEXT || exportFormat == ExportFormat.OPEN_OFFICE_WRITER) {
} else if (exportFormat == ExportFormat.MICROSOFT_EXCEL || exportFormat == ExportFormat.TEXT || exportFormat == ExportFormat.OPEN_OFFICE_WRITER || exportFormat == ExportFormat.MIND_MANAGER) {
response.setCharacterEncoding("UTF-8");
factory.export(properties, content, outputStream, null);
} else {