added setUserProfessionalBackground method

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/vo-management/usermanagement-core@128477 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Costantino Perciante 2016-05-05 15:00:20 +00:00
parent 8de5f676ba
commit fb796ccf1a
2 changed files with 26 additions and 1 deletions

View File

@ -174,6 +174,16 @@ public interface UserManager {
* @throws UserRetrievalFault
*/
String getUserProfessionalBackground(long userId) throws UserManagementSystemException, UserRetrievalFault;
/**
* Save the user professional background
* @param userId
* @param summary
* @return
* @throws UserManagementSystemException
* @throws UserRetrievalFault
*/
void setUserProfessionalBackground(long userId, String summary) throws UserManagementSystemException, UserRetrievalFault;
/**
*
* @return a list of all portal active users no matter if the belong or not to a VRE, if a user is deactived is not returned

View File

@ -469,6 +469,22 @@ public class LiferayUserManager implements UserManager {
}
return toReturn;
}
@Override
public void setUserProfessionalBackground(long userId, String summary)
throws UserManagementSystemException, UserRetrievalFault {
User user = null;
try {
_log.debug("Trying to set user Professional Background by LR Id = " + userId);
user = UserLocalServiceUtil.getUser(userId);
user.setComments(summary);
} catch (PortalException e) {
throw new UserRetrievalFault("User not existing", e);
} catch (SystemException e) {
throw new UserManagementSystemException(e.getMessage(), e);
}
}
/**
* {@inheritDoc}
*/
@ -942,5 +958,4 @@ public class LiferayUserManager implements UserManager {
}
}
}