improve modification events to pass the item before it was modified to the subscriber

This commit is contained in:
Sebastian Sdorra
2016-06-25 21:48:53 +02:00
parent 1eb5a6c9ad
commit 8e3c3e4b63
13 changed files with 317 additions and 28 deletions

View File

@@ -222,13 +222,14 @@ public class DefaultGroupManager extends AbstractGroupManager
String name = group.getName();
if (groupDAO.contains(name))
Group notModified = groupDAO.get(name);
if (notModified != null)
{
removeDuplicateMembers(group);
fireEvent(new GroupModificationEvent(group, notModified, HandlerEvent.BEFORE_MODIFY));
group.setLastModified(System.currentTimeMillis());
fireEvent(group, HandlerEvent.BEFORE_MODIFY);
groupDAO.modify(group);
fireEvent(group, HandlerEvent.MODIFY);
fireEvent(new GroupModificationEvent(group, notModified, HandlerEvent.MODIFY));
}
else
{