@Override public Void execute() throws IdentityStoreException { identityStore.updateUsersOfGroup(uniqueGroupId, uniqueUserIds); return null; } }).pushEvent(IdentityStoreInterceptorConstants.POST_UPDATE_USERS_OF_GROUP_PUT, (eventProperties) -> {
@Override public void updateUsersOfGroup(String uniqueGroupId, List<String> uniqueUserIds) throws IdentityStoreException { identityStore.updateUsersOfGroup(uniqueGroupId, uniqueUserIds); }
@Override public void updateUsersOfGroup(String uniqueGroupId, List<String> uniqueUserIdsToAdd, List<String> uniqueUserIdsToRemove) throws IdentityStoreException { identityStore.updateUsersOfGroup(uniqueGroupId, uniqueUserIdsToAdd, uniqueUserIdsToRemove); }
@Override public Void execute() throws IdentityStoreException { identityStore.updateUsersOfGroup(uniqueGroupId, uniqueUserIdsToAdd, uniqueUserIdsToRemove); return null; } }).pushEvent(IdentityStoreInterceptorConstants.POST_UPDATE_USERS_OF_GROUP_PATCH, (eventProperties) -> {
private void updateMemberList(Group oldGroup, Group newGroup) throws CharonException, IdentityStoreException { // list to store the new user ids which will be added to the group's members. List<String> newUserIds = new ArrayList<>(); MultiValuedAttribute newMembersAttribute = (MultiValuedAttribute) newGroup.getAttribute(SCIMConstants.GroupSchemaConstants.MEMBERS); //add the member ids to newUserIds list if (newMembersAttribute != null) { List<Attribute> membersValues = newMembersAttribute.getAttributeValues(); for (Attribute attribute : membersValues) { ComplexAttribute attributeValue = (ComplexAttribute) attribute; SimpleAttribute valueAttribute = (SimpleAttribute) attributeValue.getSubAttribute(SCIMConstants.CommonSchemaConstants.VALUE); newUserIds.add((String) valueAttribute.getValue()); } } //TODO : add the domain name here. identityStore.updateUsersOfGroup(oldGroup.getId(), newUserIds); } }
identityStore.updateUsersOfGroup(userStoreGroup.getUniqueGroupId(), userIds);