@Override public Void execute() throws IdentityStoreException, GroupNotFoundException { identityStore.updateGroupClaims(uniqueGroupId, claims); return null; } }).pushEvent(IdentityStoreInterceptorConstants.POST_UPDATE_GROUP_CLAIMS_PUT, (eventProperties) -> {
@Override public void updateGroupClaims(String uniqueGroupId, List<Claim> claims) throws IdentityStoreException, GroupNotFoundException { identityStore.updateGroupClaims(uniqueGroupId, claims); }
@Override public void updateGroupClaims(String uniqueGroupId, List<Claim> claimsToAdd, List<Claim> claimsToRemove) throws IdentityStoreException, GroupNotFoundException { identityStore.updateGroupClaims(uniqueGroupId, claimsToAdd, claimsToRemove); }
@Override public Void execute() throws IdentityStoreException, GroupNotFoundException { identityStore.updateGroupClaims(uniqueGroupId, claimsToAdd, claimsToRemove); return null; } }).pushEvent(IdentityStoreInterceptorConstants.POST_UPDATE_GROUP_CLAIMS_PATCH, (eventProperties) -> {
@Override public Group updateGroup(Group oldGroup, Group newGroup, Map<String, Boolean> requiredAttributes) throws NotImplementedException, BadRequestException, CharonException, NotFoundException { try { if (log.isDebugEnabled()) { log.debug("Updating group: " + oldGroup.toString()); } //get the claims map from the new scim user object. Map<String, String> claims = SCIMClaimResolver.getClaimsMap(newGroup); //get the claim list to be updated. List<Claim> claimList = getGroupBeanFromClaims(claims).getClaims(); //TODO this is a temporary method. need to remove this once the claim management is completed. claimList = ClaimMapper.getInstance().convertMetaToWso2Dialect(claimList); //set user updated claim values //TODO : Give the domain name identityStore.updateGroupClaims(oldGroup.getId(), claimList); //update the member list separately. updateMemberList(oldGroup, newGroup); if (log.isDebugEnabled()) { log.debug("User: " + newGroup.getDisplayName() + " updated through SCIM."); } //get the updated group from the user core and sent it to client. return this.getGroup(newGroup.getId(), requiredAttributes); } catch (GroupNotFoundException e) { throw new NotFoundException("No such group with the group id : " + oldGroup.getId()); } catch (IdentityStoreException e) { throw new CharonException("Error in updating the Group", e); } }