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 Details

  • 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 model
      reservedRoomStayData - the reserved room stay data
      accommodationReservationData - 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 model
      startDate - the checkIn date
      endDate - the checkOut date
      roomStayRefNumber - the roomStayRefNumber
      accommodationReservationData - 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 code
      roomRefNumber - the room reference number
      accommodationReservationData - 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 productModel
      requestedAccommodationOrderEntryGroupModel - the requestedAccommodationOrderEntryGroupModel
      accommodationOrderEntryGroups - the accommodationOrderEntryGroups
      accommodationOfferingModel - the accommodationOfferingModel
      date - the date
      requestedQuantity - requested Quantity
      Returns:
      the available quantity
    • getAccommodationOfferingService

      protected AccommodationOfferingService 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

      protected TravelCommerceStockService getCommerceStockService()
      Gets commerce stock service.
      Returns:
      the commerceStockService
    • setCommerceStockService

      public void setCommerceStockService(TravelCommerceStockService commerceStockService)
      Sets commerce stock service.
      Parameters:
      commerceStockService - the commerceStockService to set
    • getTravelCartService

      public TravelCartService getTravelCartService()
      getTravelCartService
      Returns:
      travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      setTravelCartService
      Parameters:
      travelCartService - the travelCartService