@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());
}
Map<String, String> claims = SCIMClaimResolver.getClaimsMap(newGroup);
List<Claim> claimList = getGroupBeanFromClaims(claims).getClaims();
claimList = ClaimMapper.getInstance().convertMetaToWso2Dialect(claimList);
identityStore.updateGroupClaims(oldGroup.getId(), claimList);
updateMemberList(oldGroup, newGroup);
if (log.isDebugEnabled()) {
log.debug("User: " + newGroup.getDisplayName() + " updated through SCIM.");
}
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);
}
}