try {
userStoreManager = getUserStoreManager();
if (userStoreManager.isExistingUser(userId)) {
userStoreManager.setUserClaimValues(userId, claims, null);
} else {
throw new SocialDataException("No user existing with id " + userId);
}
} catch (UserStoreException e) {
log.error(e.getMessage(), e);
throw new SocialDataException("Error while saving person with id " + userId, e);
}
catch (RegistryException e) {
log.error(e.getMessage(), e);
throw new SocialDataException("Error while saving person with id " + userId, e);
}
}