java.lang.Object
user.roles.Employee
user.roles.ITAdmin
Represents an IT Admin in the system, responsible for managing user credentials and employee records.
Available methods:
getEmployeeIDList()
Retrieves a list of employee IDs.getUserCredentials(int)
Retrieves the user credentials for the specified employee.getAllUserRecords()
Retrieves a list of all user records.getEmployeeRecord(int)
Retrieves the employee record for the specified employee.createUser(UserCredentials)
Creates a new user with the given credentials.updateCredentials(UserCredentials)
Updates the credentials of an existing user.deleteUser(int)
Deletes a user's credentials based on the employee ID.
-
Constructor Summary
ConstructorsConstructorDescriptionITAdmin
(FileDataService dataService, int employeeID) Constructs an ITAdmin object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
createUser
(UserCredentials userCredentials) Creates a new user with the given credentials.void
deleteUser
(int employeeID) Deletes a user's credentials based on the employee ID.Retrieves a list of all user records.Retrieves a list of employee IDs.getEmployeeRecord
(int employeeID) Retrieves the employee record for the specified employee.getUserCredentials
(int employeeID) Retrieves the user credentials for the specified employee.void
updateCredentials
(UserCredentials userCredential) Updates the credentials of an existing user.Methods inherited from class user.roles.Employee
clockIn, clockOut, getAttendanceID, getEmployeeID, getLeaveBalance, getLeaveBalance_OfType, getLeaveID, getPayslip, getPersonalAttendanceRecordList, getPersonalLeaveRecordList, getPersonalRecord, submitLeaveRequest
-
Constructor Details
-
ITAdmin
Constructs an ITAdmin object.- Parameters:
dataService
- The data service used for data manipulation.employeeID
- The unique identifier of the IT Admin employee.
-
-
Method Details
-
getEmployeeIDList
Retrieves a list of employee IDs.- Returns:
- A list of employee IDs.
-
getUserCredentials
Retrieves the user credentials for the specified employee.- Parameters:
employeeID
- The ID of the employee.- Returns:
- The user credentials for the specified employee.
-
getAllUserRecords
Retrieves a list of all user records.- Returns:
- A list of all user records.
-
getEmployeeRecord
Retrieves the employee record for the specified employee.- Parameters:
employeeID
- The ID of the employee.- Returns:
- The employee record for the specified employee.
-
createUser
Creates a new user with the given credentials.- Parameters:
userCredentials
- The credentials of the new user.
-
updateCredentials
Updates the credentials of an existing user.- Parameters:
userCredential
- The updated credentials.- Throws:
UserRecordsException
- If an error occurs while updating the user credentials.
-
deleteUser
Deletes a user's credentials based on the employee ID.- Parameters:
employeeID
- The ID of the employee whose credentials are to be deleted.- Throws:
UserRecordsException
- If an error occurs while deleting the user credentials.
-