/** * Creates a group if it does not exists already. * * @param proxy The user management webservice. */ private static void createGroups(final UserManagementPortTypeProxy proxy) { final AuthenticationToken token = Settings.getAuthToken(); try { final Group group = proxy.getGroup(GROUP_NAME, token); if (group == null) { final Group newGroup = proxy.createGroup(GROUP_NAME, ROLES, token); LOG.info( "Group [name=" + newGroup.getName() + ", roles=" + Arrays.toString(newGroup.getRoles()) + "] created."); } else { LOG.info( "Group [name=" + group.getName() + ", roles=" + Arrays.toString(group.getRoles()) + "]" + " already exists."); } } catch (final RemoteException e) { LOG.error(null, e); } }