Improve delete message.

Add unit test.
This commit is contained in:
Paulo Gustavo Veiga
2014-01-25 12:31:14 -03:00
parent a8f7d28c11
commit adfc6c08f2
11 changed files with 173 additions and 42 deletions

View File

@@ -231,28 +231,6 @@ public class MindmapServiceImpl
return collaborator;
}
@Override
public void addTags(@NotNull Mindmap mindmap, String tags) {
mindmap.setTags(tags);
mindmapManager.updateMindmap(mindmap, false);
if (tags != null && tags.length() > 0) {
final String tag[] = tags.split(TAG_SEPARATOR);
final User user = mindmap.getCreator();
// Add new Tags to User
boolean updateUser = false;
for (String userTag : tag) {
if (!user.getTags().contains(userTag)) {
user.getTags().add(userTag);
updateUser = true;
}
}
if (updateUser) {
//update user
userService.updateUser(user);
}
}
}
@Override
public List<MindMapHistory> findMindmapHistory(int mindmapId) {