org.chorem.pollen.services.impl
Class UserService
java.lang.Object
org.chorem.pollen.services.PollenServiceSupport
org.chorem.pollen.services.impl.UserService
- All Implemented Interfaces:
- PollenService
public class UserService
- extends PollenServiceSupport
| Methods inherited from class org.chorem.pollen.services.PollenServiceSupport |
commitTransaction, create, createWithProperties, decorateDate, decorateDateTime, delete, flushTransaction, generateId, getConfiguration, getDAO, getDatePattern, getDateTimePattern, getEntities, getEntities, getEntityById, getLocale, getTransaction, newInstance, newService, setServiceContext, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserService
public UserService()
connect
public UserAccount connect(String login,
String password)
throws UserNotFoundException,
UserInvalidPasswordException
- Throws:
UserNotFoundException
UserInvalidPasswordException
createUser
public UserAccount createUser(UserAccount user,
boolean byAdmin)
throws UserLoginAlreadyUsedException,
UserEmailAlreadyUsedException
- Throws:
UserLoginAlreadyUsedException
UserEmailAlreadyUsedException
updateUser
public UserAccount updateUser(UserAccount user,
String newPassword,
boolean byAdmin)
throws UserEmailAlreadyUsedException,
UserInvalidPasswordException
- Throws:
UserEmailAlreadyUsedException
UserInvalidPasswordException
lostPassword
public void lostPassword(String email)
throws UserNotFoundException,
InvalidEmailException
- This service is used to retrieve the userAccount associated to the given
email. If the user is found, an email will be send with a new
password. Otherwise an error will occured.
- Parameters:
email - User email
- Throws:
InvalidEmailException - if the email is not valid
UserNotFoundException - if no user matches the given email
getNewUser
public UserAccount getNewUser()
deleteUser
public void deleteUser(String id)
throws UserNotFoundException
- Throws:
UserNotFoundException
getUsers
public List<UserAccount> getUsers(org.nuiton.topia.persistence.TopiaFilterPagerUtil.FilterPagerBean pager)
getNbUsers
public int getNbUsers()
createDefaultUsers
public void createDefaultUsers()
generatePassword
protected String generatePassword()
encodePassword
protected String encodePassword(String password)
copyUserAccount
protected void copyUserAccount(UserAccount source,
UserAccount destination)
- Copy
source user account to destination one.
The email is lower cased in the destination user account.
- Parameters:
source - user account to copydestination - which receive the copy- See Also:
Binder.copy(Object, Object, String...)
Copyright © 2009-2012 CodeLutin. All Rights Reserved.