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 TypeMethodDescriptionvoidcreateUser(UserCredentials userCredentials) Creates a new user record in the database.voiddeleteUser(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.voidupdateCredentials(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:
createUserin interfaceUserManagement- Parameters:
userCredentials- the user credentials to be created
-
updateCredentials
Updates a user record in the database.- Specified by:
updateCredentialsin 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:
deleteUserin 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:
getAllUserRecordsin interfaceUserManagement- Returns:
- a list of all user records
-
getUserRecord
Retrieves the user record for a specific employee ID.- Specified by:
getUserRecordin 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
-