Package de.fraunhofer.iese.mydata.user
Interface IUserService
-
- All Known Subinterfaces:
IManagementService
public interface IUserServiceThe Interface IUserService.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringaddSuperAdmin(User userModel)Adds the super admin.StringaddUser(User userModel, AffiliationId affiliationId)Adds the user.voiddeleteUser(String userId)Delete user.UsergetUser(String userId)Gets the user.UsergetUserByName(String username)Get a user by user nameSet<User>getUsers(boolean includeLocked)Set<User>getUsers(AffiliationId affiliationId, boolean includeLocked)Gets the users.Set<User>getUsers(SolutionId solutionId, boolean includeLocked)Gets the users.Set<String>listUsers(boolean includeLocked)Set<String>listUsers(AffiliationId affiliationId, boolean includeLocked)Set users.Set<String>listUsers(SolutionId solutionId, boolean includeLocked)List users.voidlockUser(String userId)Lock user.voidsetPassword(String userId, String newPassword)Set password from static call.voidunlockUser(String userId)Unlock user.voidupdatePassword(String userId, String oldPassword, String newPassword)Update password.voidupdateRole(String userId, MyDataRole newRole)update the role of a uservoidupdateUser(User userModel)Update user.booleanuserIdExists(String userId)User id exists.booleanusernameExists(String username)Username exists.
-
-
-
Method Detail
-
addUser
String addUser(User userModel, AffiliationId affiliationId) throws IOException, ConflictingResourceException, ResourceUpdateException, InvalidEntityException, NoSuchEntityException, MessagingException
Adds the user.- Parameters:
userModel- the useraffiliationId- the affiliation id- Returns:
- the string
- Throws:
IOException- Signals that an I/O exception has occurred.ConflictingResourceException- the conflicting resource exceptionResourceUpdateException- the resource update exceptionInvalidEntityExceptionNoSuchEntityException- if the affiliation does not existMessagingException- if the account created user could not be sent
-
userIdExists
boolean userIdExists(String userId) throws IOException, NoSuchEntityException
User id exists.- Parameters:
userId- the user id- Returns:
- true, if successful
- Throws:
IOExceptionNoSuchEntityException
-
usernameExists
boolean usernameExists(String username) throws IOException, NoSuchEntityException
Username exists.- Parameters:
username- the username- Returns:
- true, if successful
- Throws:
IOExceptionNoSuchEntityException- if the username does not exist
-
updateUser
void updateUser(User userModel) throws IOException, ResourceUpdateException, NoSuchEntityException, InvalidEntityException
Update user.- Parameters:
userModel- the user- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exceptionInvalidEntityException
-
getUser
User getUser(String userId) throws IOException, NoSuchEntityException
Gets the user.- Parameters:
userId- the user id- Returns:
- the user
- Throws:
IOException- Signals that an I/O exception has occurred.NoSuchEntityException- the no such element exception
-
listUsers
Set<String> listUsers(boolean includeLocked) throws IOException
- Throws:
IOException
-
listUsers
Set<String> listUsers(AffiliationId affiliationId, boolean includeLocked) throws IOException, NoSuchEntityException, InvalidEntityException
Set users.- Parameters:
affiliationId- the affiliation component_idincludeLocked- the include locked- Returns:
- the list
- Throws:
IOException- Signals that an I/O exception has occurred.NoSuchEntityException- the no such element exceptionInvalidEntityException
-
listUsers
Set<String> listUsers(SolutionId solutionId, boolean includeLocked) throws IOException, InvalidEntityException, NoSuchEntityException
List users.- Parameters:
solutionId- the solution idincludeLocked- the include locked- Returns:
- the sets the
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityExceptionNoSuchEntityException
-
getUsers
Set<User> getUsers(boolean includeLocked) throws IOException
- Throws:
IOException
-
getUsers
Set<User> getUsers(AffiliationId affiliationId, boolean includeLocked) throws IOException, NoSuchEntityException, InvalidEntityException
Gets the users.- Parameters:
affiliationId- the affiliation idincludeLocked- the include locked- Returns:
- the users
- Throws:
IOException- Signals that an I/O exception has occurred.NoSuchEntityException- the no such element exceptionInvalidEntityException
-
getUsers
Set<User> getUsers(SolutionId solutionId, boolean includeLocked) throws IOException, InvalidEntityException, NoSuchEntityException
Gets the users.- Parameters:
solutionId- the solution idincludeLocked- the include locked- Returns:
- the users
- Throws:
IOException- Signals that an I/O exception has occurred.InvalidEntityExceptionNoSuchEntityException
-
lockUser
void lockUser(String userId) throws IOException, ResourceUpdateException, NoSuchEntityException
Lock user.- Parameters:
userId- the user id- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exception
-
unlockUser
void unlockUser(String userId) throws IOException, ResourceUpdateException, NoSuchEntityException
Unlock user.- Parameters:
userId- the user id- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exception
-
deleteUser
void deleteUser(String userId) throws IOException, ResourceUpdateException, NoSuchEntityException
Delete user.- Parameters:
userId- the user id- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exception
-
updatePassword
void updatePassword(String userId, String oldPassword, String newPassword) throws IOException, ResourceUpdateException, NoSuchEntityException, MessagingException
Update password.- Parameters:
userId- the user idoldPassword- the old passwordnewPassword- the new passwordnewPasswordRepeat- the new password repeat- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exceptionMessagingException- if the password updated message could not be sent
-
setPassword
void setPassword(String userId, String newPassword) throws IOException, ResourceUpdateException, NoSuchEntityException, MessagingException
Set password from static call.- Parameters:
userId- the user UUIDnewPassword- the new passwordnewPasswordRepeat- the new password repeat- Throws:
IOException- Signals that an I/O exception has occurred.ResourceUpdateException- the resource update exceptionNoSuchEntityException- the no such element exceptionMessagingException- if the password updated message could not be sent
-
addSuperAdmin
String addSuperAdmin(User userModel) throws IOException, ConflictingResourceException, ResourceUpdateException, InvalidEntityException, MessagingException
Adds the super admin.- Parameters:
userModel- the userloggedUser- the logged user- Returns:
- the string
- Throws:
IOException- Signals that an I/O exception has occurred.ConflictingResourceException- the conflicting resource exceptionResourceUpdateException- the resource update exceptionInvalidEntityExceptionMessagingException- if the account created message could not be sent
-
getUserByName
User getUserByName(String username) throws NoSuchEntityException, IOException
Get a user by user name- Parameters:
username- Name of the user- Returns:
- Throws:
NoSuchEntityExceptionIOException
-
updateRole
void updateRole(String userId, MyDataRole newRole) throws NoSuchEntityException, InvalidEntityException, IOException
update the role of a user- Parameters:
userId-newRole-- Throws:
NoSuchEntityExceptionIllegalArgumentExceptionInvalidEntityExceptionIOException
-
-