public interface UserManagementService
extends de.alpharogroup.auth.usermanagement.UserExistenceService
UserManagementService.| Modifier and Type | Method and Description |
|---|---|
de.alpharogroup.user.domain.User |
addUserContact(de.alpharogroup.user.domain.User user,
de.alpharogroup.user.domain.User contact)
Adds the given contact
User object to the contacts of the given User object. |
UserData |
deleteAddress(de.alpharogroup.address.book.domain.Address address,
UserData ud)
Deletes the given
Address object from the given UserData object. |
UserData |
deleteBlacklisted(de.alpharogroup.user.domain.User blacklisted,
Integer userDataId)
Deletes the given black listed
User object from the given user data id. |
void |
deleteResource(de.alpharogroup.resource.system.application.model.ResourcesModel resource,
Integer userDataId)
Deletes the
Resource object from the given resource model object with the given user
data id. |
boolean |
existsUserWithEmail(Contactmethod emailContact)
Checks if a user exists with the given email.
|
boolean |
existsUserWithEmailOrUsername(String emailOrUsername)
Checks if a user exists with the given email or user name.
|
List<de.alpharogroup.address.book.domain.Address> |
findAddessesFromUser(de.alpharogroup.user.domain.User user)
Find all
Address from the given User. |
de.alpharogroup.address.book.domain.Address |
findAddressFromUser(de.alpharogroup.user.domain.User user)
Find the main
Address from the given User. |
List<Contactmethod> |
findAllEmailContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all email contacts from the given
User. |
List<Contactmethod> |
findAllFaxContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all fax contacts from the given
User. |
List<Contactmethod> |
findAllInternetContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all internet contacts from the given
User. |
List<Contactmethod> |
findAllMobileContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all mobile contacts from user.
|
List<Contactmethod> |
findAllTelefonContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all telefon contacts from the given
User. |
Contactmethod |
findEmailContactFromUser(de.alpharogroup.user.domain.User user)
Find email contact from the given
User. |
Contactmethod |
findFaxContactFromUser(de.alpharogroup.user.domain.User user)
Find fax contact from the given
User. |
Contactmethod |
findInternetContactFromUser(de.alpharogroup.user.domain.User user)
Find internet contact from the given
User. |
Contactmethod |
findMobileContactFromUser(de.alpharogroup.user.domain.User user)
Find mobile contact from the given
User. |
List<de.alpharogroup.user.domain.Role> |
findRolesFromUser(de.alpharogroup.user.domain.User user)
Find roles from the given
User. |
Contactmethod |
findTelefonContactFromUser(de.alpharogroup.user.domain.User user)
Find telefon contact from the given
User. |
de.alpharogroup.user.domain.User |
findUserWithEmail(String email)
Find the
User object with the given email. |
de.alpharogroup.user.domain.User |
findUserWithEmailOrUsername(String emailOrUsername)
Find
User object from the given email or user name. |
de.alpharogroup.user.domain.User |
findUserWithUsername(String username)
Find
User object from the given user name. |
boolean |
isInRole(String rolename,
List<de.alpharogroup.user.domain.Role> roles)
Checks if a
Role object exist in the given list with the given role name. |
boolean |
isUserInRole(de.alpharogroup.user.domain.User user,
String rolename)
Checks if the given
User object is in the given role from the given role name. |
boolean |
isValid(String token)
Checks if the given token is valid.
|
String |
newAuthenticationToken(String username)
Factory method that creates a new authentication token from the given user name.
|
de.alpharogroup.resource.system.domain.Resource |
persistResource(de.alpharogroup.resource.system.application.model.ResourcesModel resourceModel,
Integer userId)
Persist the given resource model object with the given user id.
|
void |
saveAddressesFromUser(de.alpharogroup.user.domain.User user,
Collection<de.alpharogroup.address.book.domain.Address> addresses)
Persist the given collection of
Address objects from the given User object. |
void |
saveAddressFromUser(de.alpharogroup.user.domain.User user,
de.alpharogroup.address.book.domain.Address address)
Persist the given
Address object from the given User object. |
Serializable |
saveNewUser(de.alpharogroup.user.domain.User user)
Persist the given
User object. |
Serializable |
saveUserOnlyWithEmail(de.alpharogroup.user.domain.User user)
Persist the given
User object without checking the user name. |
Contactmethod |
saveUserWithContactmethod(de.alpharogroup.user.domain.User user,
Contactmethod contact)
Persist the given
Contactmethod object to the given User object contacts. |
List<Contactmethod> |
saveUserWithContactmethods(de.alpharogroup.user.domain.User user,
List<Contactmethod> contacts)
Persist the given list of
Contactmethod objects to the given User object
contacts. |
void |
saveUserWithRoles(de.alpharogroup.user.domain.User user,
Collection<de.alpharogroup.user.domain.Role> roles)
Persist the given
User object with the given collection of Role objects. |
Contactmethod |
setEmail(String email,
de.alpharogroup.user.domain.User user)
Update email from the given
User object if the email has changed and return the new
contactMethod object or the contactMethod that is persist in database. |
boolean |
setUsername(String username,
de.alpharogroup.user.domain.User user)
Sets a new user name to the the given
User object. |
de.alpharogroup.user.management.sign.up.SignUpUserResult |
signUpUser(de.alpharogroup.auth.models.UsernameSignUpModel model,
Set<de.alpharogroup.user.domain.Role> roles,
de.alpharogroup.user.management.sign.up.UserModel userModel)
Sign up process for insert a new user in the database.
|
Contactmethod |
updateContactmethod(String contactmethodValue,
de.alpharogroup.user.management.enums.ContactmethodType contactmethodType,
Contactmethod contactmethod)
Update an existing
Contactmethod object. |
boolean |
updateUsername(String username,
de.alpharogroup.user.domain.User user)
Update user name from the given
User object if the user name has changed. |
boolean |
userIsInRole(de.alpharogroup.user.domain.User user,
de.alpharogroup.user.domain.Role role)
Checks if the given
User object is in the given Role object. |
de.alpharogroup.auth.models.ValidationErrors |
validate(de.alpharogroup.auth.models.UsernameSignUpModel model)
Validate the given
UsernameSignUpModel object. |
de.alpharogroup.user.domain.User addUserContact(de.alpharogroup.user.domain.User user,
de.alpharogroup.user.domain.User contact)
User object to the contacts of the given User object.user - the usercontact - the contact to addUser object with the new contacts.UserData deleteAddress(de.alpharogroup.address.book.domain.Address address, UserData ud)
Address object from the given UserData object.UserData deleteBlacklisted(de.alpharogroup.user.domain.User blacklisted, Integer userDataId)
User object from the given user data id.blacklisted - the black listed useruserDataId - the user data idUserData object.void deleteResource(de.alpharogroup.resource.system.application.model.ResourcesModel resource,
Integer userDataId)
Resource object from the given resource model object with the given user
data id.resource - the resourceuserDataId - the user data idboolean existsUserWithEmail(Contactmethod emailContact)
emailContact - the email contactboolean existsUserWithEmailOrUsername(String emailOrUsername)
existsUserWithEmailOrUsername in interface de.alpharogroup.auth.usermanagement.UserExistenceServiceemailOrUsername - the email or user nameList<de.alpharogroup.address.book.domain.Address> findAddessesFromUser(de.alpharogroup.user.domain.User user)
Address from the given User.user - the userAddress from the given User.de.alpharogroup.address.book.domain.Address findAddressFromUser(de.alpharogroup.user.domain.User user)
Address from the given User.user - the userAddress from the given User.List<Contactmethod> findAllEmailContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.List<Contactmethod> findAllFaxContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.List<Contactmethod> findAllInternetContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.List<Contactmethod> findAllMobileContactmethodsFromUser(de.alpharogroup.user.domain.User user)
user - the userContactmethod from the given User.List<Contactmethod> findAllTelefonContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.Contactmethod findEmailContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.Contactmethod findFaxContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.Contactmethod findInternetContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.Contactmethod findMobileContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.List<de.alpharogroup.user.domain.Role> findRolesFromUser(de.alpharogroup.user.domain.User user)
User.user - the userRole from the given User.Contactmethod findTelefonContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.de.alpharogroup.user.domain.User findUserWithEmail(String email)
User object with the given email.email - the emailUser objectde.alpharogroup.user.domain.User findUserWithEmailOrUsername(String emailOrUsername)
User object from the given email or user name.emailOrUsername - the email or user nameUser objectde.alpharogroup.user.domain.User findUserWithUsername(String username)
User object from the given user name.username - the user nameUser objectboolean isInRole(String rolename, List<de.alpharogroup.user.domain.Role> roles)
Role object exist in the given list with the given role name.rolename - the role nameroles - the rolesRole object exist in the list otherwise false.boolean isUserInRole(de.alpharogroup.user.domain.User user,
String rolename)
User object is in the given role from the given role name.user - the userrolename - the role nameUser object is in role otherwise false.boolean isValid(String token)
token - the token to validateString newAuthenticationToken(String username)
username - the usernamede.alpharogroup.resource.system.domain.Resource persistResource(de.alpharogroup.resource.system.application.model.ResourcesModel resourceModel,
Integer userId)
resourceModel - the resource modeluserId - the user idResource objectvoid saveAddressesFromUser(de.alpharogroup.user.domain.User user,
Collection<de.alpharogroup.address.book.domain.Address> addresses)
Address objects from the given User object.user - the useraddresses - the addressesvoid saveAddressFromUser(de.alpharogroup.user.domain.User user,
de.alpharogroup.address.book.domain.Address address)
Address object from the given User object.user - the useraddress - the addressSerializable saveNewUser(de.alpharogroup.user.domain.User user) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object.user - The User object to persist.User object.de.alpharogroup.auth.exceptions.UserAlreadyExistsException - Thrown if the given User object already exists in the database.Serializable saveUserOnlyWithEmail(de.alpharogroup.user.domain.User user) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object without checking the user name.user - The User object to persist.User object.de.alpharogroup.auth.exceptions.UserAlreadyExistsException - Thrown if the given User object already exists in the database.Contactmethod saveUserWithContactmethod(de.alpharogroup.user.domain.User user, Contactmethod contact) throws BatchUpdateException
Contactmethod object to the given User object contacts.user - the usercontact - the contactContactmethod object.BatchUpdateException - the batch update exceptionList<Contactmethod> saveUserWithContactmethods(de.alpharogroup.user.domain.User user, List<Contactmethod> contacts) throws BatchUpdateException
Contactmethod objects to the given User object
contacts.user - the usercontacts - the contactsContactmethod objects.BatchUpdateException - the batch update exceptionvoid saveUserWithRoles(de.alpharogroup.user.domain.User user,
Collection<de.alpharogroup.user.domain.Role> roles)
User object with the given collection of Role objects.user - the userroles - the rolesContactmethod setEmail(String email, de.alpharogroup.user.domain.User user) throws de.alpharogroup.auth.exceptions.EmailAlreadyExistsException
User object if the email has changed and return the new
contactMethod object or the contactMethod that is persist in database. Consider to check if
the email already exists before you call this method otherwise an exception is thrown.email - the emailuser - the userContactmethod objectde.alpharogroup.auth.exceptions.EmailAlreadyExistsException - the email already exists exceptionboolean setUsername(String username, de.alpharogroup.user.domain.User user) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object.username - the usernameuser - the userde.alpharogroup.auth.exceptions.UserAlreadyExistsException - is thrown if the user already exists with the given user name.de.alpharogroup.user.management.sign.up.SignUpUserResult signUpUser(de.alpharogroup.auth.models.UsernameSignUpModel model,
Set<de.alpharogroup.user.domain.Role> roles,
de.alpharogroup.user.management.sign.up.UserModel userModel)
model - the modelroles - the rolesuserModel - the user modelSignUpUserResult object with the result of the sign up processContactmethod updateContactmethod(String contactmethodValue, de.alpharogroup.user.management.enums.ContactmethodType contactmethodType, Contactmethod contactmethod)
Contactmethod object. If the contact method has changed the new
Contactmethod object will be returned or null if nothing changed.contactmethodValue - the contact method valuecontactmethodType - the contact method typecontactmethod - the contact methodContactmethod objectboolean updateUsername(String username, de.alpharogroup.user.domain.User user) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object if the user name has changed. Returns
true if the user name has changed otherwise false.username - the user nameuser - the userde.alpharogroup.auth.exceptions.UserAlreadyExistsException - is thrown if the user already exists with the given user name.boolean userIsInRole(de.alpharogroup.user.domain.User user,
de.alpharogroup.user.domain.Role role)
User object is in the given Role object.user - the userrole - the rolede.alpharogroup.auth.models.ValidationErrors validate(de.alpharogroup.auth.models.UsernameSignUpModel model)
UsernameSignUpModel object.model - the UsernameSignUpModel object.ValidationErrors object if validation fail otherwise null if the validation
is successful.Copyright © 2015–2017 Alpha Ro Group UG (haftungsbeschrÀngt). All rights reserved.