public class UsersWebService extends CoselmarWebServiceSupport
| Constructor and Description |
|---|
UsersWebService() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUser(UserBean user) |
protected void |
checkMailUniqueness(String mail,
String userId)
Check if the mail is already used by an other user
|
protected void |
checkPassword(String currentPassword,
String salt,
String password)
Check that the password is the same : encode the one given with the salt,
and compare with the user password from database
|
void |
deleteUser(String userId) |
void |
generateNewPassword(String userMail) |
protected String |
getBody(AbstractMail mail) |
List<UserBean> |
getExperts(UserSearchBean search) |
protected com.github.mustachejava.Mustache |
getMustache(AbstractMail mail) |
UserBean |
getUser(String userId) |
List<UserBean> |
getUsers(UserSearchBean search) |
org.debux.webmotion.server.render.Render |
login(String mail,
String password) |
void |
modifyUser(UserBean user) |
protected void |
sendMail(AbstractMail mail) |
checkAuthentication, checkUserAuthentication, commit, getCleanMail, getCoselmarServicesConfig, getCoselmarUserDao, getCoselmarUserGroupDao, getDocumentDao, getDocumentsService, getFullIdFromShort, getFullUserIdFromShort, getLocale, getNow, getPersistenceContext, getQuestionDao, getServicesContext, getShortIdFromFull, newService, rollback, setServicesContextgetContext, renderAction, renderAtom, renderContent, renderContent, renderDownload, renderDownload, renderError, renderError, renderFailure, renderForward, renderForward, renderJSON, renderJSONP, renderLastPage, renderRedirect, renderRSS, renderStatus, renderStream, renderStream, renderStringTemplate, renderSuccess, renderTemplate, renderURL, renderView, renderXML, setContextable, toMappublic UserBean getUser(String userId) throws InvalidCredentialException, UnauthorizedException, org.nuiton.topia.persistence.TopiaNoResultException
InvalidCredentialExceptionUnauthorizedExceptionorg.nuiton.topia.persistence.TopiaNoResultExceptionpublic List<UserBean> getUsers(UserSearchBean search) throws InvalidCredentialException, UnauthorizedException
public List<UserBean> getExperts(UserSearchBean search) throws InvalidCredentialException, UnauthorizedException
public void addUser(UserBean user) throws InvalidParameterException, InvalidCredentialException, UnauthorizedException
public void modifyUser(UserBean user) throws InvalidCredentialException, UnauthorizedException, InvalidParameterException, org.nuiton.topia.persistence.TopiaNoResultException
InvalidCredentialExceptionUnauthorizedExceptionInvalidParameterExceptionorg.nuiton.topia.persistence.TopiaNoResultExceptionpublic org.debux.webmotion.server.render.Render login(String mail, String password) throws InvalidCredentialException
InvalidCredentialExceptionpublic void deleteUser(String userId) throws InvalidCredentialException, UnauthorizedException
public void generateNewPassword(String userMail)
protected void checkMailUniqueness(String mail, String userId) throws InvalidParameterException
mail - : simply mail to checkuserId - : the current user#id : this parameter is needed to exclude from the search this user, cause it could already have this mailInvalidParameterException - if the mail is already used.protected void checkPassword(String currentPassword, String salt, String password) throws InvalidCredentialException
currentPassword - : password from databasesalt - : salt use to encode database passwordpassword - : given password we want to checkInvalidCredentialException - if the given password is not the same as one from databaseprotected void sendMail(AbstractMail mail)
protected String getBody(AbstractMail mail)
protected com.github.mustachejava.Mustache getMustache(AbstractMail mail)
Copyright © 2014–2015 Ifremer. All rights reserved.