java.lang.Object
user.manager.UserManager
- All Implemented Interfaces:
UserManagement
Manages user-related operations.
Available methods:
createUser(UserCredentials)
Creates a new user record in the database.updateCredentials(UserCredentials)
Updates a user record in the database.deleteUser(int)
Deletes a user record from the database.getAllUserRecords()
Retrieves a list of all user records.getUserRecord(int)
Retrieves the user record for a specific employee ID.
-
Constructor Summary
ConstructorsConstructorDescriptionUserManager
(UserCredentialsDataService userCredentialsDataService) Creates a new UserManager instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createUser
(UserCredentials userCredentials) Creates a new user record in the database.void
deleteUser
(int employeeID) Deletes a user record from the database.Retrieves a list of all user records.getUserRecord
(int employeeID) Retrieves the user record for a specific employee ID.void
updateCredentials
(UserCredentials userCredential) Updates a user record in the database.
-
Constructor Details
-
UserManager
Creates a new UserManager instance.- Parameters:
userCredentialsDataService
- the UserCredentialsDataService
-
-
Method Details
-
createUser
Creates a new user record in the database.- Specified by:
createUser
in interfaceUserManagement
- Parameters:
userCredentials
- the user credentials to be created
-
updateCredentials
Updates a user record in the database.- Specified by:
updateCredentials
in interfaceUserManagement
- Parameters:
userCredential
- the user credentials to be updated- Throws:
UserRecordsException
- if an error occurs
-
deleteUser
Deletes a user record from the database.- Specified by:
deleteUser
in interfaceUserManagement
- Parameters:
employeeID
- the ID of the user to be deleted- Throws:
UserRecordsException
- if an error occurs
-
getAllUserRecords
Retrieves a list of all user records.- Specified by:
getAllUserRecords
in interfaceUserManagement
- Returns:
- a list of all user records
-
getUserRecord
Retrieves the user record for a specific employee ID.- Specified by:
getUserRecord
in interfaceUserManagement
- Parameters:
employeeID
- the employee ID for which to retrieve the user record- Returns:
- the UserCredentials object corresponding to the employee ID, or null if an error occurs
-