@Path(value="/usermanagement/") @Produces(value="application/json") @Consumes(value="application/json") public interface UserManagementResource
UserManagementResource provides methods for authenticate users of a given
application.| Modifier and Type | Method and Description |
|---|---|
de.alpharogroup.user.domain.User |
addUserContact(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.domain.User> saveModel)
Adds the given contact
User object to the contacts of the given User object. |
de.alpharogroup.user.management.domain.UserData |
deleteAddress(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.address.book.domain.Address,de.alpharogroup.user.management.domain.UserData> deleteModel)
Deletes the given
Address object from the given UserData object. |
de.alpharogroup.user.management.domain.UserData |
deleteBlacklisted(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Integer> deleteModel)
Deletes the given black listed
User object from the given user data id. |
void |
deleteResource(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.resource.system.application.model.ResourcesModel,Integer> deleteModel)
Deletes the
Resource object from the given resource model object with the given user
data id. |
boolean |
existsUserWithEmail(de.alpharogroup.user.management.domain.Contactmethod emailContact)
Checks if a user exists with the given email.
|
boolean |
existsUserWithEmail(String email)
Checks if a user exists with the given email.
|
de.alpharogroup.auth.enums.InsertUserState |
existsUserWithEmailOrUsername(de.alpharogroup.collections.pairs.KeyValuePair<String,String> searchModel)
Checks if a user exists with the given email or user name.
|
boolean |
existsUserWithEmailOrUsername(String emailOrUsername)
Checks if a user exists with the given email or user name.
|
boolean |
existsUserWithUsername(String username)
Checks if a user exists with the given 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<de.alpharogroup.user.management.domain.Contactmethod> |
findAllEmailContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all email contacts from the given
User. |
List<de.alpharogroup.user.management.domain.Contactmethod> |
findAllFaxContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all fax contacts from the given
User. |
List<de.alpharogroup.user.management.domain.Contactmethod> |
findAllInternetContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all internet contacts from the given
User. |
List<de.alpharogroup.user.management.domain.Contactmethod> |
findAllMobileContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all mobile contacts from user.
|
List<de.alpharogroup.user.management.domain.Contactmethod> |
findAllTelefonContactmethodsFromUser(de.alpharogroup.user.domain.User user)
Find all telefon contacts from the given
User. |
de.alpharogroup.user.management.domain.Contactmethod |
findEmailContactFromUser(de.alpharogroup.user.domain.User user)
Find email contact from the given
User. |
de.alpharogroup.user.management.domain.Contactmethod |
findFaxContactFromUser(de.alpharogroup.user.domain.User user)
Find fax contact from the given
User. |
de.alpharogroup.user.management.domain.Contactmethod |
findInternetContactFromUser(de.alpharogroup.user.domain.User user)
Find internet contact from the given
User. |
de.alpharogroup.user.management.domain.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. |
de.alpharogroup.user.management.domain.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(de.alpharogroup.collections.pairs.KeyValuePair<String,List<de.alpharogroup.user.domain.Role>> roleSearchModel)
Checks if a
Role object exist in the given list with the given role name. |
boolean |
isUserInRole(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,String> userSearchModel)
Checks if the given
User object is in the given role from the given role name. |
de.alpharogroup.resource.system.domain.Resource |
persistResource(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.resource.system.application.model.ResourcesModel,Integer> saveModel)
Persist the given resource model object with the given user id.
|
void |
saveAddressesFromUser(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Collection<de.alpharogroup.address.book.domain.Address>> userSaveModel)
Persist the given collection of
Address objects from the given User object. |
void |
saveAddressFromUser(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.address.book.domain.Address> userSaveModel)
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. |
de.alpharogroup.user.management.domain.Contactmethod |
saveUserWithContactmethod(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.management.domain.Contactmethod> userSaveModel)
Persist the given
Contactmethod object to the given User object contacts. |
List<de.alpharogroup.user.management.domain.Contactmethod> |
saveUserWithContactmethods(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,List<de.alpharogroup.user.management.domain.Contactmethod>> userSaveModel)
Persist the given list of
Contactmethod objects to the given User object
contacts. |
void |
saveUserWithRoles(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Collection<de.alpharogroup.user.domain.Role>> userSaveModel)
Persist the given
User object with the given collection of Role objects. |
de.alpharogroup.user.management.domain.Contactmethod |
setEmail(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> userSaveModel)
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(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> userSaveModel)
Sets a new user name to the the given
User object. |
de.alpharogroup.user.management.sign.up.SignUpUserResult |
signUpUser(de.alpharogroup.collections.pairs.Triple<de.alpharogroup.auth.models.UsernameSignUpModel,Set<de.alpharogroup.user.domain.Role>,de.alpharogroup.user.management.sign.up.UserModel> saveModel)
Sign up process for insert a new user in the database.
|
de.alpharogroup.user.management.domain.Contactmethod |
updateContactmethod(de.alpharogroup.collections.pairs.Triple<String,de.alpharogroup.user.management.enums.ContactmethodType,de.alpharogroup.user.management.domain.Contactmethod> updateModel)
Update an existing
Contactmethod object. |
boolean |
updateUsername(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> updateModel)
Update user name from the given
User object if the user name has changed. |
boolean |
userIsInRole(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.domain.Role> searchModel)
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. |
@POST @Path(value="/add/user/contact") de.alpharogroup.user.domain.User addUserContact(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.domain.User> saveModel)
User object to the contacts of the given User object.saveModel - the KeyValuePair object that encapsulate the user and the contactUser object with the new contacts.@POST @Path(value="/delete/address") de.alpharogroup.user.management.domain.UserData deleteAddress(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.address.book.domain.Address,de.alpharogroup.user.management.domain.UserData> deleteModel)
Address object from the given UserData object.deleteModel - the KeyValuePair object that encapsulate the Address object and
the UserData objectUserData object.@POST @Path(value="/delete/blacklisted") de.alpharogroup.user.management.domain.UserData deleteBlacklisted(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Integer> deleteModel)
User object from the given user data id.deleteModel - the KeyValuePair object that encapsulate the black listed user and the
user data idUserData object.@POST @Path(value="/delete/resource") void deleteResource(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.resource.system.application.model.ResourcesModel,Integer> deleteModel)
Resource object from the given resource model object with the given user
data id.deleteModel - the KeyValuePair object that encapsulate the resource and the user data id@POST @Path(value="/exists/user/by/email") boolean existsUserWithEmail(de.alpharogroup.user.management.domain.Contactmethod emailContact)
emailContact - the email contact@GET @Path(value="/exists/user/with/email/{email}") boolean existsUserWithEmail(@PathParam(value="email") String email)
email - the email@POST @Path(value="/exists/user/with/email/or/username") de.alpharogroup.auth.enums.InsertUserState existsUserWithEmailOrUsername(de.alpharogroup.collections.pairs.KeyValuePair<String,String> searchModel)
searchModel - the KeyValuePair object that encapsulate the email and the user nameInsertUserState object.@GET @Path(value="/exists/user/with/emailOrUsername/{emailOrUsername}") boolean existsUserWithEmailOrUsername(@PathParam(value="emailOrUsername") String emailOrUsername)
emailOrUsername - the email or user name@GET @Path(value="/exists/user/with/username/{username}") boolean existsUserWithUsername(@PathParam(value="username") String username)
username - the user name@POST @Path(value="/find/addresses") List<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.@POST @Path(value="/find/address") 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.@POST @Path(value="/find/all/emails") List<de.alpharogroup.user.management.domain.Contactmethod> findAllEmailContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/all/faxes") List<de.alpharogroup.user.management.domain.Contactmethod> findAllFaxContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/all/internets") List<de.alpharogroup.user.management.domain.Contactmethod> findAllInternetContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/all/mobiles") List<de.alpharogroup.user.management.domain.Contactmethod> findAllMobileContactmethodsFromUser(de.alpharogroup.user.domain.User user)
user - the userContactmethod from the given User.@POST @Path(value="/find/all/tel") List<de.alpharogroup.user.management.domain.Contactmethod> findAllTelefonContactmethodsFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/email") de.alpharogroup.user.management.domain.Contactmethod findEmailContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/fax") de.alpharogroup.user.management.domain.Contactmethod findFaxContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/internet") de.alpharogroup.user.management.domain.Contactmethod findInternetContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/mobile") de.alpharogroup.user.management.domain.Contactmethod findMobileContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@POST @Path(value="/find/roles") List<de.alpharogroup.user.domain.Role> findRolesFromUser(de.alpharogroup.user.domain.User user)
User.user - the userRole from the given User.@POST @Path(value="/find/tel") de.alpharogroup.user.management.domain.Contactmethod findTelefonContactFromUser(de.alpharogroup.user.domain.User user)
User.user - the userContactmethod from the given User.@GET @Path(value="/find/by/email/{email}") de.alpharogroup.user.domain.User findUserWithEmail(@PathParam(value="email") String email)
User object with the given email.email - the emailUser object@GET @Path(value="/find/by/email/or/username/{emailOrUsername}") de.alpharogroup.user.domain.User findUserWithEmailOrUsername(@PathParam(value="emailOrUsername") String emailOrUsername)
User object from the given email or user name.emailOrUsername - the email or user nameUser object@GET @Path(value="/find/by/username/{username}") de.alpharogroup.user.domain.User findUserWithUsername(@PathParam(value="username") String username)
User object from the given user name.username - the user nameUser object@POST @Path(value="/isin/role") boolean isInRole(de.alpharogroup.collections.pairs.KeyValuePair<String,List<de.alpharogroup.user.domain.Role>> roleSearchModel)
Role object exist in the given list with the given role name.roleSearchModel - the KeyValuePair object that encapsulate the role name and rolesRole object exist in the list otherwise false.@POST @Path(value="/is/user/in/role") boolean isUserInRole(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,String> userSearchModel)
User object is in the given role from the given role name.userSearchModel - the KeyValuePair object that encapsulate the user and the role nameUser object is in role otherwise false.@POST @Path(value="/persist/resource") de.alpharogroup.resource.system.domain.Resource persistResource(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.resource.system.application.model.ResourcesModel,Integer> saveModel)
saveModel - the KeyValuePair object that encapsulate the ResourcesModel object
and the user id.Resource object@POST @Path(value="/save/addresses") void saveAddressesFromUser(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Collection<de.alpharogroup.address.book.domain.Address>> userSaveModel)
Address objects from the given User object.userSaveModel - the KeyValuePair object that encapsulate the user and the addresses@POST @Path(value="/save/address") void saveAddressFromUser(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.address.book.domain.Address> userSaveModel)
Address object from the given User object.userSaveModel - the KeyValuePair object that encapsulate the user and the address@POST @Path(value="/new/user") Serializable 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.@POST @Path(value="/new/user/onlywith/email") 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.@POST @Path(value="/save/user/with/contactmethod") de.alpharogroup.user.management.domain.Contactmethod saveUserWithContactmethod(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.management.domain.Contactmethod> userSaveModel) throws BatchUpdateException
Contactmethod object to the given User object contacts.userSaveModel - the KeyValuePair object that encapsulate the user and the contact to saveContactmethod object.BatchUpdateException - is thrown if a batch update occured@POST @Path(value="/save/user/with/contactmethods") List<de.alpharogroup.user.management.domain.Contactmethod> saveUserWithContactmethods(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,List<de.alpharogroup.user.management.domain.Contactmethod>> userSaveModel) throws BatchUpdateException
Contactmethod objects to the given User object
contacts.userSaveModel - the KeyValuePair object that encapsulate the user and the contacts to saveContactmethod objects.BatchUpdateException - is thrown if a batch update occured@POST @Path(value="/save/user/with/roles") void saveUserWithRoles(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,Collection<de.alpharogroup.user.domain.Role>> userSaveModel)
User object with the given collection of Role objects.userSaveModel - the KeyValuePair object that encapsulate the user and the roles to save@POST @Path(value="/set/email") de.alpharogroup.user.management.domain.Contactmethod setEmail(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> userSaveModel) 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.userSaveModel - the KeyValuePair object that encapsulate the email and the userContactmethod objectde.alpharogroup.auth.exceptions.EmailAlreadyExistsException - is thrown if the email already exists.@POST @Path(value="/set/username") boolean setUsername(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> userSaveModel) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object.userSaveModel - the KeyValuePair object that encapsulate the user name and the user to setde.alpharogroup.auth.exceptions.UserAlreadyExistsException - is thrown if the user already exists with the given user name.@POST @Path(value="/signup/user") de.alpharogroup.user.management.sign.up.SignUpUserResult signUpUser(de.alpharogroup.collections.pairs.Triple<de.alpharogroup.auth.models.UsernameSignUpModel,Set<de.alpharogroup.user.domain.Role>,de.alpharogroup.user.management.sign.up.UserModel> saveModel)
saveModel - the Triple object that encapsulate the UsernameSignUpModel object,
the roles and the UserModel object.SignUpUserResult object with the result of the sign up process@POST @Path(value="/update/contactmethod") de.alpharogroup.user.management.domain.Contactmethod updateContactmethod(de.alpharogroup.collections.pairs.Triple<String,de.alpharogroup.user.management.enums.ContactmethodType,de.alpharogroup.user.management.domain.Contactmethod> updateModel)
Contactmethod object. If the contact method has changed the new
Contactmethod object will be returned or null if nothing changed.updateModel - the Triple object that encapsulate the contact method value and type and
the contact method to update.Contactmethod object@POST @Path(value="/update/username") boolean updateUsername(de.alpharogroup.collections.pairs.KeyValuePair<String,de.alpharogroup.user.domain.User> updateModel) throws de.alpharogroup.auth.exceptions.UserAlreadyExistsException
User object if the user name has changed. Returns
true if the user name has changed otherwise false.updateModel - the KeyValuePair object that encapsulate the user name and the userde.alpharogroup.auth.exceptions.UserAlreadyExistsException - is thrown if the user already exists with the given user name.@POST @Path(value="/user/is/in/role") boolean userIsInRole(de.alpharogroup.collections.pairs.KeyValuePair<de.alpharogroup.user.domain.User,de.alpharogroup.user.domain.Role> searchModel)
User object is in the given Role object.searchModel - the KeyValuePair object that encapsulate the user and the role@POST @Path(value="/validate") de.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.