Class ReservationService


  • @Service
    public class ReservationService
    extends Object
    Author:
    ehugonnet
    • Constructor Detail

      • ReservationService

        public ReservationService()
    • Method Detail

      • createReservation

        public void createReservation​(Reservation reservation,
                                      List<Long> resourceIds)
      • computeReservationStatus

        public String computeReservationStatus​(Reservation reservation)
      • updateReservation

        public void updateReservation​(Reservation reservation)
      • getReservation

        public Reservation getReservation​(long id)
      • deleteReservation

        public void deleteReservation​(long id)
      • findAllReservationsInRange

        public List<Reservation> findAllReservationsInRange​(String instanceId,
                                                            Integer userId,
                                                            String startPeriod,
                                                            String endPeriod)
        Finds all reservations related to the given user on the given period. If user parameter (userId) is not defined, the reservations returned are not filtered by user.
        Parameters:
        instanceId -
        userId -
        startPeriod -
        endPeriod -
        Returns:
      • findAllReservationsForCategoryInRange

        public List<Reservation> findAllReservationsForCategoryInRange​(String instanceId,
                                                                       Integer userId,
                                                                       Long categoryId,
                                                                       String startPeriod,
                                                                       String endPeriod)
        Finds all reservations related to the given user on the given period and for which at least one resource of the given category is attached. If user parameter (userId) is not defined, the reservations returned are not filtered by user.
        Parameters:
        instanceId -
        userId -
        categoryId -
        startPeriod -
        endPeriod -
        Returns:
      • findAllReservationsForResourceInRange

        public List<Reservation> findAllReservationsForResourceInRange​(String instanceId,
                                                                       Integer userId,
                                                                       Long resourceId,
                                                                       String startPeriod,
                                                                       String endPeriod)
        Finds all reservations related to the given user on the given period and for which the given resource is attached. If user parameter (userId) is not defined, the reservations returned are not filtered by user.
        Parameters:
        instanceId -
        userId -
        resourceId -
        startPeriod -
        endPeriod -
        Returns: