Interface HolidayService

All Known Implementing Classes:
HolidayServiceImpl

public interface HolidayService
  • Method Details

    • createHoliday

      Long createHoliday(CreateHolidayDto createHolidayDto, String token)
      Creates a new holiday request.
      Parameters:
      createHolidayDto - DTO containing the holiday details to be created
      token - Authentication token of the user creating the holiday
      Returns:
      The ID of the created holiday
    • changeStatus

      Long changeStatus(Long id, Status status)
      Changes the status of an existing holiday request.
      Parameters:
      id - The ID of the holiday request to update
      status - The new status to set
      Returns:
      The ID of the updated holiday
    • getHolidayDto

      HolidayDto getHolidayDto(Long id)
      Retrieves a holiday DTO by its ID.
      Parameters:
      id - The ID of the holiday request
      Returns:
      The HolidayDto corresponding to the given ID
    • getHolidays

      List<HolidayDto> getHolidays(HolidaySpecificationDto holidaySpecificationDto)
      Retrieves a list of holidays matching the provided specification.
      Parameters:
      holidaySpecificationDto - DTO containing criteria to filter holidays
      Returns:
      A list of HolidayDto matching the specification
    • getHolidaysByDate

      List<HolidayDto> getHolidaysByDate(String token, LocalDateTime startDate, LocalDateTime endDate)
      Retrieves a list of holidays for the authenticated user between specified dates.
      Parameters:
      token - Authentication token of the user
      startDate - The start date/time to filter holidays (inclusive)
      endDate - The end date/time to filter holidays (inclusive)
      Returns:
      A list of HolidayDto within the specified date range for the user