First integration of the mindmap list.

This commit is contained in:
Paulo Gustavo Veiga
2012-04-06 17:05:42 -03:00
parent a141414b4b
commit bca68f407d
43 changed files with 414 additions and 1119 deletions

View File

@@ -1,6 +1,7 @@
package com.wisemapping.rest;
import com.sun.jdi.IntegerType;
import com.wisemapping.exceptions.WiseMappingException;
import com.wisemapping.model.MindMap;
import com.wisemapping.model.MindmapUser;
@@ -24,15 +25,6 @@ import java.util.Calendar;
import java.util.List;
/**
* Pendings:
* List with filter
* Clone
* Discard Changed
* Public ?
* Admin operations for get/update
* Check visibility
*/
@Controller
public class MindmapController extends BaseController {
@Autowired
@@ -125,6 +117,17 @@ public class MindmapController extends BaseController {
mindmapService.removeMindmap(mindmap, user);
}
@RequestMapping(method = RequestMethod.DELETE, value = "/maps/batch")
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void batchDelete(@RequestParam(required = false) String ids) throws IOException, WiseMappingException {
final User user = Utils.getUser();
final String[] mapsIds = ids.split(",");
for (final String mapId : mapsIds) {
final MindMap mindmap = mindmapService.getMindmapById(Integer.parseInt(mapId));
mindmapService.removeMindmap(mindmap, user);
}
}
@RequestMapping(method = RequestMethod.PUT, value = "/maps/{id}/xml", consumes = {"application/xml"}, produces = {"application/json", "text/html", "application/xml"})
@ResponseStatus(value = HttpStatus.NO_CONTENT)
public void updateMapXml(@RequestBody String xml, @PathVariable int id, @RequestParam(required = false) boolean minor) throws IOException, WiseMappingException {

View File

@@ -74,6 +74,11 @@ public class RestMindmap {
return mindmap.isPublic();
}
public void setPublic(boolean value) {
// return mindmap.isPublic();
}
public String getXml() throws IOException {
return mindmap.getXmlStr();
}