@Service(value="userService") public class UserService extends AbstractExtDirectCrudService<de.terrestris.shogun2.model.User>
User model.AbstractCrudServicedao| Constructor and Description |
|---|
UserService() |
| Modifier and Type | Method and Description |
|---|---|
void |
activateUser(String tokenValue) |
de.terrestris.shogun2.model.User |
findByAccountName(String accountName)
Returns the user for the given (unique) account name.
|
de.terrestris.shogun2.model.User |
findByEmail(String email) |
de.terrestris.shogun2.model.Role |
getDefaultUserRole() |
org.springframework.security.crypto.password.PasswordEncoder |
getPasswordEncoder() |
RegistrationTokenService |
getRegistrationTokenService() |
de.terrestris.shogun2.model.User |
getUserBySession() |
de.terrestris.shogun2.model.User |
persistNewUser(de.terrestris.shogun2.model.User user,
boolean encryptPassword)
Persists a new user in the database.
|
de.terrestris.shogun2.model.User |
registerUser(String email,
String rawPassword,
boolean isActive,
javax.servlet.http.HttpServletRequest request)
Registers a new user.
|
void |
setDefaultUserRole(de.terrestris.shogun2.model.Role defaultUserRole) |
void |
setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder) |
void |
setRegistrationTokenService(RegistrationTokenService registrationTokenService) |
void |
updatePassword(de.terrestris.shogun2.model.User user,
String rawPassword) |
delete, deleteCollection, findAll, findById, findWithSortingAndPagingExtDirect, formLoadById, saveOrUpdate, saveOrUpdateCollectionloadByIdpublic de.terrestris.shogun2.model.User findByAccountName(String accountName)
accountName - A unique account name.public de.terrestris.shogun2.model.User findByEmail(String email)
email - public de.terrestris.shogun2.model.User registerUser(String email, String rawPassword, boolean isActive, javax.servlet.http.HttpServletRequest request) throws Exception
email - rawPassword - isActive - request - Exceptionpublic void activateUser(String tokenValue) throws Exception
token - Exceptionpublic de.terrestris.shogun2.model.User persistNewUser(de.terrestris.shogun2.model.User user,
boolean encryptPassword)
user - The user to createencryptPassword - Whether or not the current password of the user object should
be encrypted or not before the object is persisted in the dbpublic void updatePassword(de.terrestris.shogun2.model.User user,
String rawPassword)
throws Exception
user - rawPassword - Exceptionpublic de.terrestris.shogun2.model.User getUserBySession()
request - Exceptionpublic RegistrationTokenService getRegistrationTokenService()
public void setRegistrationTokenService(RegistrationTokenService registrationTokenService)
registrationTokenService - the registrationTokenService to setpublic org.springframework.security.crypto.password.PasswordEncoder getPasswordEncoder()
public void setPasswordEncoder(org.springframework.security.crypto.password.PasswordEncoder passwordEncoder)
passwordEncoder - the passwordEncoder to setpublic de.terrestris.shogun2.model.Role getDefaultUserRole()
public void setDefaultUserRole(de.terrestris.shogun2.model.Role defaultUserRole)
defaultUserRole - the defaultUserRole to setCopyright © 2016 terrestris GmbH & Co. KG. All rights reserved.