Interface AccommodationRestrictionExtrasStrategy

All Known Implementing Classes:
AbstractRestrictionExtrasStrategy, AddExactlyNQuantityExtrasStrategy, AddFreeQuantityExtrasStrategy, ShoppingAbstractRestrictionExtrasStrategy, ShoppingAddExactlyNQuantityExtrasStrategy, ShoppingAddFreeQuantityExtrasStrategy

public interface AccommodationRestrictionExtrasStrategy
Abstract strategy to create check the availability of the extra services and create an accommodationRestrictionData for each product
  • Method Details

    • applyStrategy

      AccommodationRestrictionData applyStrategy(ProductModel productModel, ReservedRoomStayData reservedRoomStayData, AccommodationReservationData accommodationReservationData) throws AccommodationPipelineException
      Applies the strategy to check the availability of the product against the reservedRoomStayData for each date. If the product is available it returns the corresponding restrictionData, otherwise it throws a AccommodationPipelineException
      Parameters:
      productModel - the product model
      reservedRoomStayData - the reserved room stay data
      accommodationReservationData - the accommodation reservation data
      Returns:
      the accommodationRestrictionData if the product is available
      Throws:
      AccommodationPipelineException - if the product is not available for the given accommodationOffering in the selected dates.
    • checkRequestedQuantity

      boolean checkRequestedQuantity(ProductModel productModel, AccommodationOrderEntryGroupModel requestedAccommodationOrderEntryGroupModel, List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, long requestedQuantity)
      Check if the given restriction allows the requested quantity
      Parameters:
      productModel - the product model
      requestedAccommodationOrderEntryGroupModel - the requestedAccommodationOrderEntryGroupModel
      requestedQuantity - the requestedQuantity
      Returns:
      true if the requested quantity is available