Package de.fraunhofer.iese.mydata.user
Interface IUserService
- All Known Subinterfaces:
IManagementService
public interface IUserService
The Interface IUserService.
-
Method Summary
Modifier and TypeMethodDescriptionaddSuperAdmin
(User userModel) Adds the super admin.addUser
(User userModel, AffiliationId affiliationId) Adds the user.void
deleteUser
(String userId) Delete user.Gets the user.getUserByName
(String username) Get a user by user namegetUsers
(boolean includeLocked) getUsers
(AffiliationId affiliationId, boolean includeLocked) Gets the users.getUsers
(SolutionId solutionId, boolean includeLocked) Gets the users.listUsers
(boolean includeLocked) listUsers
(AffiliationId affiliationId, boolean includeLocked) Set users.listUsers
(SolutionId solutionId, boolean includeLocked) List users.void
Lock user.void
setPassword
(String userId, String newPassword) Set password from static call.void
unlockUser
(String userId) Unlock user.void
updatePassword
(String userId, String oldPassword, String newPassword) Update password.void
updateRole
(String userId, MyDataRole newRole) update the role of a uservoid
updateUser
(User userModel) Update user.boolean
userIdExists
(String userId) User id exists.boolean
usernameExists
(String username) Username exists.
-
Method Details
-
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 exceptionInvalidEntityException
NoSuchEntityException
- if the affiliation does not existMessagingException
- if the account created user could not be sent
-
userIdExists
User id exists.- Parameters:
userId
- the user id- Returns:
- true, if successful
- Throws:
IOException
NoSuchEntityException
-
usernameExists
Username exists.- Parameters:
username
- the username- Returns:
- true, if successful
- Throws:
IOException
NoSuchEntityException
- 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
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
- 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.InvalidEntityException
NoSuchEntityException
-
getUsers
- 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.InvalidEntityException
NoSuchEntityException
-
lockUser
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
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
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 exceptionInvalidEntityException
MessagingException
- if the account created message could not be sent
-
getUserByName
Get a user by user name- Parameters:
username
- Name of the user- Returns:
- Throws:
NoSuchEntityException
IOException
-
updateRole
void updateRole(String userId, MyDataRole newRole) throws NoSuchEntityException, InvalidEntityException, IOException update the role of a user- Parameters:
userId
-newRole
-- Throws:
NoSuchEntityException
IllegalArgumentException
InvalidEntityException
IOException
-