public void onEvent(Event<UserDAOImpl, User> event) throws Exception
{
LOG.info("Create User Profile: " + event.getData().getUserName());
UserProfile profile = service_.getUserProfileHandler().createUserProfileInstance(event.getData().getUserName());
service_.getUserProfileHandler().saveUserProfile(profile, true);
GroupHandler groupHandler = service_.getGroupHandler();
Group g = groupHandler.findGroupById("/user");
MembershipTypeHandler membershipTypeHandler = service_.getMembershipTypeHandler();
MembershipType memberType = membershipTypeHandler.findMembershipType("member");
if (g == null)
{
g = groupHandler.createGroupInstance();
g.setGroupName("user");
groupHandler.addChild(null, g, true);
}
if (memberType == null)
{
memberType = membershipTypeHandler.createMembershipTypeInstance();
memberType.setName("member");