Class AbstractRestrictionExtrasStrategy
java.lang.Object
de.hybris.platform.travelfacades.facades.accommodation.strategies.AbstractRestrictionExtrasStrategy
- All Implemented Interfaces:
AccommodationRestrictionExtrasStrategy
- Direct Known Subclasses:
AddExactlyNQuantityExtrasStrategy,AddFreeQuantityExtrasStrategy,ShoppingAbstractRestrictionExtrasStrategy
public abstract class AbstractRestrictionExtrasStrategy
extends Object
implements AccommodationRestrictionExtrasStrategy
Abstract Strategy implementing
AccommodationRestrictionExtrasStrategy-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AccommodationOfferingServiceGets accommodation offering service.protected intgetAvailableQuantity(ProductModel productModel, AccommodationOrderEntryGroupModel requestedAccommodationOrderEntryGroupModel, List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, AccommodationOfferingModel accommodationOfferingModel, Date date, long requestedQuantity) Calculate the available quantity for the given product, accommodation and dateprotected TravelCommerceStockServiceGets commerce stock service.protected intgetQuantityForReservedService(String productCode, Integer roomRefNumber, AccommodationReservationData accommodationReservationData) Get the quantity of the given productCode in the reservationDataprotected intgetServiceAvailableQuantity(ProductModel productModel, ReservedRoomStayData reservedRoomStayData, AccommodationReservationData accommodationReservationData) Returns the available quantity of the product, considering both the quantity in the reservationData and the stockLevel.protected intgetServiceAvailableQuantity(ProductModel productModel, Date startDate, Date endDate, int roomStayRefNumber, AccommodationReservationData accommodationReservationData) Returns the available quantity of the product, considering both the quantity in the reservationData and the stockLevel.getTravelCartServicevoidsetAccommodationOfferingService(AccommodationOfferingService accommodationOfferingService) Sets accommodation offering service.voidsetCommerceStockService(TravelCommerceStockService commerceStockService) Sets commerce stock service.voidsetTravelCartService(TravelCartService travelCartService) setTravelCartServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.travelfacades.facades.accommodation.strategies.AccommodationRestrictionExtrasStrategy
applyStrategy, checkRequestedQuantity
-
Field Details
-
travelCartService
-
-
Constructor Details
-
AbstractRestrictionExtrasStrategy
public AbstractRestrictionExtrasStrategy()
-
-
Method Details
-
getServiceAvailableQuantity
protected int getServiceAvailableQuantity(ProductModel productModel, ReservedRoomStayData reservedRoomStayData, AccommodationReservationData accommodationReservationData) Returns the available quantity of the product, considering both the quantity in the reservationData and the stockLevel.- Parameters:
productModel- the product modelreservedRoomStayData- the reserved room stay dataaccommodationReservationData- the accommodation reservation data- Returns:
- the available quantity of the product
-
getServiceAvailableQuantity
protected int getServiceAvailableQuantity(ProductModel productModel, Date startDate, Date endDate, int roomStayRefNumber, AccommodationReservationData accommodationReservationData) Returns the available quantity of the product, considering both the quantity in the reservationData and the stockLevel.- Parameters:
productModel- the product modelstartDate- the checkIn dateendDate- the checkOut dateroomStayRefNumber- the roomStayRefNumberaccommodationReservationData- the accommodation reservation data- Returns:
- the available quantity of the product
-
getQuantityForReservedService
protected int getQuantityForReservedService(String productCode, Integer roomRefNumber, AccommodationReservationData accommodationReservationData) Get the quantity of the given productCode in the reservationData- Parameters:
productCode- the product coderoomRefNumber- the room reference numberaccommodationReservationData- the accommodation reservation data- Returns:
- the quantity of the given productCode in the reservationData
-
getAvailableQuantity
protected int getAvailableQuantity(ProductModel productModel, AccommodationOrderEntryGroupModel requestedAccommodationOrderEntryGroupModel, List<AccommodationOrderEntryGroupModel> accommodationOrderEntryGroups, AccommodationOfferingModel accommodationOfferingModel, Date date, long requestedQuantity) Calculate the available quantity for the given product, accommodation and date- Parameters:
productModel- the productModelrequestedAccommodationOrderEntryGroupModel- the requestedAccommodationOrderEntryGroupModelaccommodationOrderEntryGroups- the accommodationOrderEntryGroupsaccommodationOfferingModel- the accommodationOfferingModeldate- the daterequestedQuantity- requested Quantity- Returns:
- the available quantity
-
getAccommodationOfferingService
Gets accommodation offering service.- Returns:
- the accommodationOfferingService
-
setAccommodationOfferingService
public void setAccommodationOfferingService(AccommodationOfferingService accommodationOfferingService) Sets accommodation offering service.- Parameters:
accommodationOfferingService- the accommodationOfferingService to set
-
getCommerceStockService
Gets commerce stock service.- Returns:
- the commerceStockService
-
setCommerceStockService
Sets commerce stock service.- Parameters:
commerceStockService- the commerceStockService to set
-
getTravelCartService
getTravelCartService- Returns:
- travelCartService
-
setTravelCartService
setTravelCartService- Parameters:
travelCartService- the travelCartService
-