Interface UserService
-
Method Summary
Modifier and TypeMethodDescriptionactivateUser
(UserActivationTokenDto userActivationTokenDto) Activates a user account using the provided activation token.changeEmail
(NewEmailDto newEmailDto, String token) Changes the email address of the currently authenticated user.changePassword
(ChangePasswordDto changePasswordDto, String token) Changes the password of the currently authenticated user.createUser
(CreateUserDto createUserDto) Creates a new user in the system.deleteUser
(Long userId, String token) Deletes a user by ID if the currently logged-in user has admin privileges.deleteUser
(String token) Deletes the currently logged-in user (soft delete).getActualLoginRole
(String token) Retrieves the role of the currently logged-in user based on the token.getActualLoginUser
(String token) Retrieves the currently logged-in user's details based on the provided token.getUserById
(Long id) Retrieves a user by their unique ID.getUsers
(UserSpecificationDto userSpecificationDto) Retrieves a list of users matching the specified criteria.lostPassword
(EmailDto emailDto) Initiates a lost password process for a user by their email.newPassword
(NewPasswordDto newPasswordDto) Sets a new password for a user using a verification token.refreshVerificationEmailToken
(EmailDto emailDto) Refreshes the email verification token for a user.updateUser
(UpdateUserDto updateUserDto) Updates user details such as role and holiday hours.
-
Method Details
-
getActualLoginUser
-
getUserById
-
createUser
Creates a new user in the system.- Parameters:
createUserDto
- DTO containing details of the user to create- Returns:
- The ID of the newly created user
-
getUsers
Retrieves a list of users matching the specified criteria.- Parameters:
userSpecificationDto
- DTO containing user filter criteria- Returns:
- List of UserDto matching the criteria
-
activateUser
Activates a user account using the provided activation token.- Parameters:
userActivationTokenDto
- DTO containing the activation token- Returns:
- The ID of the activated user
-
getActualLoginRole
-
refreshVerificationEmailToken
-
changePassword
Changes the password of the currently authenticated user.- Parameters:
changePasswordDto
- DTO containing current and new password detailstoken
- Authentication token of the current user- Returns:
- The ID of the user whose password was changed
-
lostPassword
-
newPassword
Sets a new password for a user using a verification token.- Parameters:
newPasswordDto
- DTO containing the new password and verification token- Returns:
- The ID of the user whose password was reset
-
changeEmail
Changes the email address of the currently authenticated user.- Parameters:
newEmailDto
- DTO containing current password and new emailtoken
- Authentication token of the current user- Returns:
- The ID of the user whose email was changed
-
updateUser
Updates user details such as role and holiday hours.- Parameters:
updateUserDto
- DTO containing updated user information- Returns:
- The ID of the updated user
-
deleteUser
-
deleteUser
-