Interface ReservationService


  • public interface ReservationService
    Service dedicated to the management of Reservation on a Component
    Author:
    Christopher Laszczuk
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<com.flower.docs.domain.reservation.Reservation> get​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
      Get reservations for multiple components
      void release​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
      Releases multiple components
      java.util.List<com.flower.docs.domain.reservation.Reservation> reserve​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
      Reserves multiple components.
    • Method Detail

      • reserve

        java.util.List<com.flower.docs.domain.reservation.Reservation> reserve​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
                                                                        throws com.flower.docs.domain.exception.TechnicalException,
                                                                               com.flower.docs.domain.exception.FunctionalException
        Reserves multiple components.

        To ensure persistence of component reservation, the data layer should be called in order to persist create Reservation objects
        Parameters:
        componentReferences - The references of components to reserve
        Returns:
        The created reservations according to supplied components
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs as the reservation of an already reserved component
      • release

        void release​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
              throws com.flower.docs.domain.exception.TechnicalException,
                     com.flower.docs.domain.exception.FunctionalException
        Releases multiple components
        Parameters:
        componentReferences - The references to components to release
        Throws:
        com.flower.docs.domain.exception.TechnicalException - If a technical error occurs
        com.flower.docs.domain.exception.FunctionalException - If a functional error occurs
      • get

        java.util.List<com.flower.docs.domain.reservation.Reservation> get​(java.util.List<com.flower.docs.domain.component.ComponentReference> componentReferences)
                                                                    throws com.flower.docs.domain.exception.TechnicalException,
                                                                           com.flower.docs.domain.exception.FunctionalException
        Get reservations for multiple components
        Parameters:
        componentReferences - The references to component for which reservations are asked
        Returns:
        Fetched reservations
        Throws:
        com.flower.docs.domain.exception.TechnicalException
        com.flower.docs.domain.exception.FunctionalException