added default type to user manager

This commit is contained in:
Sebastian Sdorra
2012-03-16 09:44:32 +01:00
parent d122b0bae6
commit e1162ed025
5 changed files with 52 additions and 24 deletions

View File

@@ -129,6 +129,13 @@ public class XmlGroupManager extends AbstractGroupManager
@Override
public void create(Group group) throws GroupException, IOException
{
String type = group.getType();
if (Util.isEmpty(type))
{
group.setType(groupDAO.getType());
}
if (logger.isInfoEnabled())
{
logger.info("create group {} of type {}", group.getName(),
@@ -142,13 +149,6 @@ public class XmlGroupManager extends AbstractGroupManager
throw new GroupAllreadyExistExeption();
}
String type = group.getType();
if (Util.isEmpty(type))
{
group.setType(groupDAO.getType());
}
group.setCreationDate(System.currentTimeMillis());
groupDAO.add(group);
fireEvent(group, HandlerEvent.CREATE);