@Override
public User updateUser(User user, Map<String, Boolean> requiredAttributes) throws NotImplementedException,
CharonException, BadRequestException, NotFoundException {
try {
if (log.isDebugEnabled()) {
log.debug("Updating user: " + user.toString());
}
Map<String, String> claims = SCIMClaimResolver.getClaimsMap(user);
List<Claim> claimList = getUserBeanFromClaims(claims).getClaims();
claimList = ClaimMapper.getInstance().convertMetaToWso2Dialect(claimList);
identityStore.updateUserClaims(user.getId(), claimList);
if (log.isDebugEnabled()) {
log.debug("User: " + user.getUserName() + " updated through SCIM.");
}
return this.getUser(user.getId(), requiredAttributes);
} catch (UserNotFoundException | NotFoundException e) {
throw new NotFoundException("No such user with the user id : " + user.getId());
} catch (IdentityStoreException e) {
throw new CharonException("Error in updating the user", e);
}
}