Package leave.manager

Interface LeaveManagement

All Known Implementing Classes:
LeaveManager

public interface LeaveManagement
  • Method Details

    • approveLeave

      void approveLeave(String leaveID)
      Approves a leave request.
      Parameters:
      leaveID - the ID of the leave request to approve
    • rejectLeave

      void rejectLeave(String leaveID, int employeeID, String leaveType, int duration)
      Rejects a leave request.
      Parameters:
      leaveID - the ID of the leave request to reject
      employeeID - the ID of the employee requesting the leave
      leaveType - the type of leave requested
      duration - the duration of the leave requested
    • getLeaveRecord

      LeaveRecord getLeaveRecord(String leaveID)
      Retrieves a leave record by its ID.
      Parameters:
      leaveID - the ID of the leave record to retrieve
      Returns:
      the leave record
    • getLeaveRecord_List

      List<LeaveRecord> getLeaveRecord_List(int employeeID)
      Retrieves a list of leave records for a specific employee.
      Parameters:
      employeeID - the ID of the employee
      Returns:
      a list of leave records
    • getLeaveRecord_List

      List<LeaveRecord> getLeaveRecord_List()
      Retrieves a list of all leave records.
      Returns:
      a list of all leave records
    • getLeaveBalanceRecord

      LeaveBalanceRecord getLeaveBalanceRecord(int employeeID)
      Retrieves the leave balance record for a specific employee.
      Parameters:
      employeeID - the ID of the employee
      Returns:
      the leave balance record
    • getLeaveBalance_OfType

      int getLeaveBalance_OfType(int leaveBalance, String leaveType)
      Retrieves the leave balance for a specific type of leave.
      Parameters:
      leaveBalance - the leave balance record
      leaveType - the type of leave for which the balance is retrieved
      Returns:
      the leave balance for the specified type
    • getAllLeaveRecords

      List<LeaveRecord> getAllLeaveRecords()
      Retrieves a list of all leave records.
      Returns:
      a list of all leave records
    • addLeaveRecord

      void addLeaveRecord(LeaveRecord newRecord, LeaveBalanceRecord leaveBalance) throws LeaveException
      Adds a new leave record and updates the leave balance.
      Parameters:
      newRecord - the new leave record to add
      leaveBalance - the leave balance record to update
      Throws:
      LeaveException - if an error occurs while adding the leave record
    • getLeaveBalance_OfType

      int getLeaveBalance_OfType(LeaveBalanceRecord leaveBalance, String leaveType)
      Retrieves the leave balance for a specific type of leave from a leave balance record.
      Parameters:
      leaveBalance - the leave balance
      leaveType - the type of leave
      Returns:
      the leave balance for the specified type
    • updateLeaveBalance

      void updateLeaveBalance(LeaveBalanceRecord leaveBalanceRecord, String leaveType, int newBalance)
      Updates the leave balance for a specific type of leave.
      Parameters:
      leaveBalanceRecord - the leave balance record to update
      leaveType - the type of leave
      newBalance - the new leave balance