- Add more tests to save map

- Add new rest operations for saving map content
- Fix password encoding bug
- Fix bug that allow different users being created with the same password.
This commit is contained in:
Paulo Gustavo Veiga
2012-03-14 01:49:05 -03:00
parent 8716ff4feb
commit eb6aac4a5e
18 changed files with 297 additions and 144 deletions

View File

@@ -84,7 +84,11 @@ public class MindMap {
}
public String getXmlStr() throws UnsupportedEncodingException {
return new String(this.xml, UTF_8);
String result = null;
if (this.xml != null) {
result = new String(this.xml, UTF_8);
}
return result;
}
public byte[] getZippedXml()
@@ -219,4 +223,15 @@ public class MindMap {
public User getOwner() {
return owner;
}
public static String getDefaultMindmapXml(@NotNull final String title) {
final StringBuilder result = new StringBuilder();
result.append("<result version='tango'>");
result.append("<topic central=\"true\" text=\"");
result.append(title);
result.append("\"/></result>");
return result.toString();
}
}