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 Summary
Modifier and TypeMethodDescriptionapplyStrategy(ProductModel productModel, ReservedRoomStayData reservedRoomStayData, AccommodationReservationData accommodationReservationData) Applies the strategy to check the availability of the product against the reservedRoomStayData for each date.booleancheckRequestedQuantity(ProductModel productModel, AccommodationOrderEntryGroupModel requestedAccommodationOrderEntryGroupModel, List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, long requestedQuantity) Check if the given restriction allows the requested quantity
-
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 aAccommodationPipelineException- Parameters:
productModel- the product modelreservedRoomStayData- the reserved room stay dataaccommodationReservationData- 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 modelrequestedAccommodationOrderEntryGroupModel- the requestedAccommodationOrderEntryGroupModelrequestedQuantity- the requestedQuantity- Returns:
- true if the requested quantity is available
-