Add Catalan support.

This commit is contained in:
Paulo Gustavo Veiga
2013-02-22 20:39:51 -03:00
parent a7316d516c
commit 99a3fa64ec
4 changed files with 327 additions and 1 deletions

View File

@@ -158,10 +158,17 @@ public class MindmapController extends BaseController {
collaborationProperties.setMindmapProperties(properties);
// Validate content ...
final String xml = restMindmap.getXml();
String xml = restMindmap.getXml();
if (xml == null) {
throw new IllegalArgumentException("Map xml can not be null");
}
// Check that what we received a valid mindmap...
xml = xml.trim();
if (!xml.startsWith("<map") || !xml.endsWith("</map>")) {
throw new IllegalArgumentException("Map seems not to be a valid mindmap:"+xml);
}
mindmap.setXmlStr(xml);
// Update map ...