Class UserManagementService

java.lang.Object
io.github.navjotsrakhra.eventmanager.service.UserManagementService

@Service public class UserManagementService extends Object
The UserManagementService class provides methods for managing user-related operations.
  • Constructor Details

    • UserManagementService

      public UserManagementService(UserRepository userRepository)
      Constructor for the UserManagementService class.
      Parameters:
      userRepository - The UserRepository used for managing user data.
  • Method Details

    • getAllUsers

      public org.springframework.http.ResponseEntity<List<UserDTO>> getAllUsers()
      Get a list of all users.
      Returns:
      ResponseEntity containing a list of UserDTO objects representing users.
    • updateUserRoles

      public org.springframework.http.ResponseEntity<Boolean> updateUserRoles(Long id, List<Role> updatedRoles)
      Update the roles of a user with the specified ID.
      Parameters:
      id - The ID of the user to be updated.
      updatedRoles - The updated list of roles for the user.
      Returns:
      ResponseEntity indicating the result of the operation.