Class UserServiceImpl
java.lang.Object
com.mirna.hospitalmanagementapi.application.services.UserServiceImpl
- All Implemented Interfaces:
UserService
This class is an implementation of the UserService interface.
This class provides methods to perform operations on User entity
- Version:
- 1.0
- Author:
- Mirna Gama
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdds a new user to the repository.org.springframework.security.core.userdetails.UserDetailsfindUserByLogin(String login) Finds a stored user information by login.
-
Constructor Details
-
UserServiceImpl
public UserServiceImpl()
-
-
Method Details
-
findUserByLogin
Finds a stored user information by login.- Specified by:
findUserByLoginin interfaceUserService- Parameters:
login- A string representing the user's system login- Returns:
- The corresponding user information if successful, or null if it is non-existent.
-
addUser
Adds a new user to the repository.- Specified by:
addUserin interfaceUserService- Parameters:
userDTO- A data transfer object representing a user to add.- Returns:
- The saved user if successful, or null if there is an error.
-