Interface JustifiableService

All Known Implementing Classes:
JustifiableServiceImpl

public interface JustifiableService
Service interface for managing justifications related to student absences and delays. Provides methods to justify, retrieve, and calculate absences and delays.
  • Method Details

    • justify

      JustifiableResponse justify(UUID studentId, UUID justificationId, String justificationText, Boolean absence)
      Justifies an absence or delay for a student.
      Parameters:
      studentId - the UUID of the student
      justificationId - the UUID of the justification
      justificationText - the text explaining the justification
      absence - true if justifying an absence, false if justifying a delay
      Returns:
      a `JustifiableResponse` object representing the justification details Pre-condition: The `studentId` and `justificationId` must not be null. The `justificationText` must not be null or empty. Post-condition: A justification is created or updated, and a response object with the justification details is returned.
    • getAbsencesByYear

      List<JustifiableResponse> getAbsencesByYear(UUID studentId, Year year)
      Retrieves a list of absences for a student in a specific year.
      Parameters:
      studentId - the UUID of the student
      year - the year to filter absences
      Returns:
      a list of `JustifiableResponse` objects representing the absences Pre-condition: The `studentId` and `year` must not be null. Post-condition: Returns a list of absences for the specified student and year.
    • getDelayByYear

      List<JustifiableResponse> getDelayByYear(UUID studentId, Year year)
      Retrieves a list of delays for a student in a specific year.
      Parameters:
      studentId - the UUID of the student
      year - the year to filter delays
      Returns:
      a list of `JustifiableResponse` objects representing the delays Pre-condition: The `studentId` and `year` must not be null. Post-condition: Returns a list of delays for the specified student and year.
    • getTotalAbsences

      Integer getTotalAbsences(UUID studentId, Year year)
      Retrieves the total number of absences for a student in a specific year.
      Parameters:
      studentId - the UUID of the student
      year - the year to filter absences
      Returns:
      the total number of absences as an integer Pre-condition: The `studentId` and `year` must not be null. Post-condition: Returns the total number of absences for the specified student and year.
    • getTotalDelays

      Integer getTotalDelays(UUID studentId, Year year)
      Retrieves the total number of delays for a student in a specific year.
      Parameters:
      studentId - the UUID of the student
      year - the year to filter delays
      Returns:
      the total number of delays as an integer Pre-condition: The `studentId` and `year` must not be null. Post-condition: Returns the total number of delays for the specified student and year.