Class DefaultBookingService

java.lang.Object
de.hybris.platform.travelservices.services.impl.DefaultBookingService
All Implemented Interfaces:
BookingService
Direct Known Subclasses:
DefaultShoppingBookingService

public class DefaultBookingService extends Object implements BookingService
Default implementation of BookingService
  • Constructor Details

    • DefaultBookingService

      public DefaultBookingService()
  • Method Details

    • createRefundPaymentTransaction

      @Deprecated public Boolean createRefundPaymentTransaction(AbstractOrderModel abstractOrder, BigDecimal amountToRefund)
      Deprecated.
      Description copied from interface: BookingService
      Creates a payment transaction for refund
      Specified by:
      createRefundPaymentTransaction in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      amountToRefund - the amount to refund
      Returns:
      true if successfully created transaction
    • createRefundPaymentTransaction

      public Boolean createRefundPaymentTransaction(AbstractOrderModel abstractOrder, BigDecimal amountToRefund, List<AbstractOrderEntryModel> entries)
      Description copied from interface: BookingService
      Creates a payment transaction for refund
      Specified by:
      createRefundPaymentTransaction in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      amountToRefund - the amount to refund
      entries - the entries the transaction is linked to
      Returns:
      true if successfully created transaction
    • getOrderModelFromStore

      public OrderModel getOrderModelFromStore(String bookingReference)
      Description copied from interface: BookingService
      Gets order model from store.
      Specified by:
      getOrderModelFromStore in interface BookingService
      Parameters:
      bookingReference - the booking reference
      Returns:
      OrderModel order model from store
    • getOrder

      public OrderModel getOrder(String bookingReference)
      Description copied from interface: BookingService
      Retrieves the orderModel for the specified bookingReference.
      Specified by:
      getOrder in interface BookingService
      Parameters:
      bookingReference - the booking reference
      Returns:
      OrderModel object.
    • getAllOrders

      public List<OrderModel> getAllOrders(String orderCode, BaseStoreModel baseStore)
      Description copied from interface: BookingService
      Return a list of all the orders for the given orderCode and baseStore
      Specified by:
      getAllOrders in interface BookingService
      Parameters:
      orderCode - the order code
      baseStore - the base store
      Returns:
      the list of OrderModel
    • isCancelPossible

      public boolean isCancelPossible(OrderModel order)
      Description copied from interface: BookingService
      Check if the cancel order is possible for the order with the given orderCode
      Specified by:
      isCancelPossible in interface BookingService
      Parameters:
      order - as the order to be cancelled
      Returns:
      true if the cancellation is possible, false otherwise
    • cancelOrder

      public boolean cancelOrder(OrderModel order)
      Description copied from interface: BookingService
      Performs the cancellation of the order with the given orderCode
      Specified by:
      cancelOrder in interface BookingService
      Parameters:
      order - as the order to be cancelled
      Returns:
      true if the cancellation of the order was successful, false otherwise
    • getTotalToRefund

      public BigDecimal getTotalToRefund(OrderModel order)
      Description copied from interface: BookingService
      Calculate the total amount to be refunded
      Specified by:
      getTotalToRefund in interface BookingService
      Parameters:
      order - as the order
      Returns:
      the BigDecimal value to be refunded
    • calculateTotalRefund

      protected BigDecimal calculateTotalRefund(OrderModel orderModel)
      This method uses a map of strategies to calculate and return the totalRefund value. Based on the distinct orderEntryTypes of the orderModel, one or more strategies are called. Each strategy returns the totalRefund for the given OrderEntryType. Then all the refunds are summed and returned.
      Parameters:
      orderModel - the order model
      Returns:
      the BigDecimal corresponding to the totalRefund
    • calculateTotalRefundForCancelledTraveller

      public BigDecimal calculateTotalRefundForCancelledTraveller(AbstractOrderModel abstractOrder)
      Description copied from interface: BookingService
      Calculate refund for cancelled traveller
      Specified by:
      calculateTotalRefundForCancelledTraveller in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      Returns:
      big decimal
    • getOriginalOrder

      public OrderModel getOriginalOrder(AbstractOrderModel abstractOrder)
      Description copied from interface: BookingService
      returns an original order
      Specified by:
      getOriginalOrder in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      Returns:
      original order
    • getGlobalDiscountForEntryType

      public BigDecimal getGlobalDiscountForEntryType(AbstractOrderModel abstractOrder, OrderEntryType entryType)
      Description copied from interface: BookingService
      Return the portio of global discounts relative to the given entry type
      Specified by:
      getGlobalDiscountForEntryType in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      entryType - the entry type
      Returns:
      global discount for entry type
    • calculateTaxValueForEntries

      public Double calculateTaxValueForEntries(AbstractOrderModel abstractOrder, List<AbstractOrderEntryModel> entries)
      Description copied from interface: BookingService
      Calculate accommodation tax value after Tax Compensation.
      Specified by:
      calculateTaxValueForEntries in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      entries - the entries
      Returns:
      the big decimal
    • getTotalToRefund

      public BigDecimal getTotalToRefund(OrderModel order, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Calculate the total amount to refund based on the given orderEntryType
      Specified by:
      getTotalToRefund in interface BookingService
      Parameters:
      order - as the order
      orderEntryType - as the orderEntryType
      Returns:
      the BigDecimal value to refund
    • calculateTotalRefund

      protected BigDecimal calculateTotalRefund(OrderModel orderModel, OrderEntryType orderEntryType)
      This method uses a map of strategies to calculate and return the totalRefund value. The correct strategy is called based on the given orderEntryType.
      Parameters:
      orderModel - the order model
      orderEntryType - the order entry type
      Returns:
      the BigDecimal corresponding to the totalRefund
    • cancelTraveller

      @Deprecated public boolean cancelTraveller(BigDecimal totalToRefund)
      Deprecated.
      Deprecated since version 2.0. Use cancelTraveller(BigDecimal, TravellerData) instead.
      Description copied from interface: BookingService
      Proceeds with cancellation of traveller, creates a refund transaction if there is any refund available
      Specified by:
      cancelTraveller in interface BookingService
      Parameters:
      totalToRefund - the total to refund
      Returns:
      true if successfully created refund payment transaction
    • cancelTraveller

      public boolean cancelTraveller(BigDecimal totalToRefund, TravellerData travellerData)
      Description copied from interface: BookingService
      Proceeds with cancellation of traveller, creates a refund transaction if there is any refund available
      Specified by:
      cancelTraveller in interface BookingService
      Parameters:
      totalToRefund - the total to refund
      travellerData - the travellerData for which to create the refund payment
      Returns:
      true if successfully created refund payment transaction
    • getOrderEntry

      public AbstractOrderEntryModel getOrderEntry(AbstractOrderModel abstractOrderModel, String productCode, String travelRouteCode, List<String> transportOfferingCodes, List<String> travellerCodes, boolean bundleNoCheckRequired)
      Description copied from interface: BookingService
      Retrieves abstractOrderEntry from given abstractOrderModel
      Specified by:
      getOrderEntry in interface BookingService
      Parameters:
      abstractOrderModel - - the abstract order model
      productCode - the productCode
      travelRouteCode - the travel Route Code
      transportOfferingCodes - list of transport Offering Code
      travellerCodes - the Traveller unique id
      bundleNoCheckRequired - flag to check if bundle no. check is required.
      Returns:
      AbstractOrderEntryModel order entry
    • getOrderEntries

      public List<AbstractOrderEntryModel> getOrderEntries(AbstractOrderModel abstractOrderModel, String productCode, String travelRouteCode, List<String> transportOfferingCodes, List<String> travellerCodes, boolean bundleNoCheckRequired)
      Description copied from interface: BookingService
      Retrieves abstractOrderEntry list from given abstractOrderModel
      Specified by:
      getOrderEntries in interface BookingService
      Parameters:
      abstractOrderModel - - the abstract order model
      productCode - the productCode
      travelRouteCode - the travel Route Code
      transportOfferingCodes - list of transport Offering Code
      travellerCodes - the Traveller unique id
      bundleNoCheckRequired - flag to check if bundle no. check is required.
      Returns:
      AbstractOrderEntryModel order entry
    • checkBundleToAmendProduct

      public boolean checkBundleToAmendProduct(AbstractOrderModel abstractOrderModel, String productCode, long qty, String travelRouteCode, List<String> transportOfferingCodes, List<String> travellerCodes)
      Description copied from interface: BookingService
      Checks if a product is included in a bundle
      Specified by:
      checkBundleToAmendProduct in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      productCode - the product code
      qty - the qty
      travelRouteCode - the travel route code
      transportOfferingCodes - the transport offering codes
      travellerCodes - the traveller codes
      Returns:
      true if the product is included in a bundle, false otherwise
    • getProductQuantityInOrderForTransportOffering

      public Long getProductQuantityInOrderForTransportOffering(String bookingReference, ProductModel productModel, TransportOfferingModel transportOfferingModel)
      Description copied from interface: BookingService
      Returns the quantity of products in the Order for a transportOffering.
      Specified by:
      getProductQuantityInOrderForTransportOffering in interface BookingService
      Parameters:
      bookingReference - the booking reference
      productModel - the product model
      transportOfferingModel - the transport offering model
      Returns:
      a Long
    • atleastOneAdultTravellerRemaining

      public boolean atleastOneAdultTravellerRemaining(String orderCode, String cancelledTravellerCode)
      Description copied from interface: BookingService
      Validates if atleast one adult traveller belongs to booking(apart from the one removed currently), while removing traveller from the booking.
      Specified by:
      atleastOneAdultTravellerRemaining in interface BookingService
      Parameters:
      orderCode - the order code
      cancelledTravellerCode - the cancelled traveller code
      Returns:
      boolean boolean
    • getOrderModelByOriginalOrderCode

      public OrderModel getOrderModelByOriginalOrderCode(String bookingReference)
      Description copied from interface: BookingService
      Gets order with original order code equal to booking reference
      Specified by:
      getOrderModelByOriginalOrderCode in interface BookingService
      Parameters:
      bookingReference - the booking reference
      Returns:
      order model by original order code
    • updateOrderStatus

      public void updateOrderStatus(OrderModel orderModel, OrderStatus status)
      Description copied from interface: BookingService
      Updates the order with the status provided as a param
      Specified by:
      updateOrderStatus in interface BookingService
      Parameters:
      orderModel - the order model
      status - the status
    • getAccommodationOrderEntryGroups

      public List<AccommodationOrderEntryGroupModel> getAccommodationOrderEntryGroups(AbstractOrderModel abstractOrder)
      Description copied from interface: BookingService
      Returns list of AccommodationOrderEntryGroups that are in the abstract order.
      Specified by:
      getAccommodationOrderEntryGroups in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      Returns:
      accommodation order entry groups
    • noMoreAdultTravellers

      protected boolean noMoreAdultTravellers(List<AbstractOrderEntryModel> travellerEntries)
      No more adult travellers boolean.
      Parameters:
      travellerEntries - the traveller entries
      Returns:
      the boolean
    • checkBundleAndProduct

      protected boolean checkBundleAndProduct(boolean bundleNoCheckRequired, AbstractOrderEntryModel orderEntry, String productCode)
      Verifies if the order entry has matching bundle number and product code
      Parameters:
      bundleNoCheckRequired - the bundle no check required
      orderEntry - the order entry
      productCode - the product code
      Returns:
      true if bundle number and product code match
    • checkTravellers

      protected boolean checkTravellers(AbstractOrderEntryModel orderEntry, List<String> travellerCodes)
      Verifies if order entry has a matching list of travellers
      Parameters:
      orderEntry - the order entry
      travellerCodes - the traveller codes
      Returns:
      true if list of travellers matches
    • checkTransportOfferings

      protected boolean checkTransportOfferings(AbstractOrderEntryModel orderEntry, List<String> transportOfferingCodes)
      Verifies if order entry has a matching list of transport offerings
      Parameters:
      orderEntry - the order entry
      transportOfferingCodes - the transport offering codes
      Returns:
      true if list of transport offering matches
    • getOriginalOrderEntry

      public AbstractOrderEntryModel getOriginalOrderEntry(String originalOrderCode, String productCode, String travelRouteCode, List<String> transportOfferingCodes, List<String> travellerCodes, Boolean bundleNoCheckRequired)
      Description copied from interface: BookingService
      Retrieves abstractOrderEntry from given abstractOrderModel's code
      Specified by:
      getOriginalOrderEntry in interface BookingService
      Parameters:
      originalOrderCode - the original order code
      productCode - the product code
      travelRouteCode - the travel route code
      transportOfferingCodes - the transport offering codes
      travellerCodes - the traveller codes
      bundleNoCheckRequired - the bundle no check required
      Returns:
      order entry for given code of abstract order model
    • getOriginalOrderEntry

      public AbstractOrderEntryModel getOriginalOrderEntry(AbstractOrderModel abstractOrderModel, String productCode, int roomStayRefNumber)
      Description copied from interface: BookingService
      Retrieves abstractOrderEntry from given abstractOrderModel
      Specified by:
      getOriginalOrderEntry in interface BookingService
      Parameters:
      abstractOrderModel - - the abstract order model
      productCode - the productCode
      roomStayRefNumber - the room stay reference number
      Returns:
      AbstractOrderEntryModel order entry
    • checkRoomStayReferenceNumber

      protected Boolean checkRoomStayReferenceNumber(AbstractOrderEntryModel orderEntry, int roomStayRefNumber)
      Check room stay reference number boolean.
      Parameters:
      orderEntry - the order entry
      roomStayRefNumber - the room stay ref number
      Returns:
      the boolean
    • hasCartBeenAmended

      public boolean hasCartBeenAmended()
      Description copied from interface: BookingService
      Checks if user made any changes during amendment
      Specified by:
      hasCartBeenAmended in interface BookingService
      Returns:
      true if something has been changed
    • isTransportBooking

      @Deprecated protected boolean isTransportBooking(AbstractOrderModel amendmentCart)
      Deprecated.
      Deprecated since version 3.0. Please use checkIfAnyOrderEntryByType in place of this method as it is doing exactly the same thing.
      Is transport booking boolean.
      Parameters:
      amendmentCart - the amendment cart
      Returns:
      boolean
    • haveSelectedAccommodationsChanged

      protected boolean haveSelectedAccommodationsChanged(List<SelectedAccommodationModel> oldSelectedAccomodation, List<SelectedAccommodationModel> newSelectedAccomodation)
      This method here is used to compare two lists for SelectedAccommodationModel. It returns false if all the SelectedAccommodationModel for the same TransporOffering and the same Traveller have the same ConfiguredAccommodationModel identifier. True if for at least one TransportOffering and one Traveller the ConfiguredAccommodationModel identifier has changed.
      Parameters:
      oldSelectedAccomodation - the list of previous SelectedAccommodationModel
      newSelectedAccomodation - the list of the newly SelectedAccommodationModel
      Returns:
      the boolean
    • getAccommodationOrderEntryGroup

      public AccommodationOrderEntryGroupModel getAccommodationOrderEntryGroup(int roomStayRefNum, AbstractOrderModel abstractOrder)
      Description copied from interface: BookingService
      Returns AccommodationOrderEntryGroupModel based on roomStayRefNumber and cart number
      Specified by:
      getAccommodationOrderEntryGroup in interface BookingService
      Parameters:
      roomStayRefNum - the room stay ref num
      abstractOrder - the abstract order
      Returns:
      accommodation order entry group
    • isReservationCancelled

      public boolean isReservationCancelled(AbstractOrderModel abstractOrderModel, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Check if the reservation for the specified orderEntryType has been cancelled.
      Specified by:
      isReservationCancelled in interface BookingService
      Parameters:
      abstractOrderModel - as the abstractOrderModel to be checked
      orderEntryType - as the OrderEntryType corresponding to the reservation to be checked
      Returns:
      true if all the orderEntries for the specified orderEntryType are inactive or if quantity is equals to 0
    • checkIfAnyOrderEntryByType

      public boolean checkIfAnyOrderEntryByType(AbstractOrderModel abstractOrderModel, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Check if the abstractOrderModel has at least one orderEntry with type equals to the given orderEntryType
      Specified by:
      checkIfAnyOrderEntryByType in interface BookingService
      Parameters:
      abstractOrderModel - as the abstractOrderModel to be checked
      orderEntryType - as the OrderEntryType to be checked
      Returns:
      true if there is at least one orderEntry with type equals to the given orderEntryType, false otherwise
    • isAbstractOrderOfType

      public boolean isAbstractOrderOfType(AbstractOrderModel abstractOrder, String bookingType)
      Description copied from interface: BookingService
      Checks if is abstract Order is of type.
      Specified by:
      isAbstractOrderOfType in interface BookingService
      Parameters:
      abstractOrder - the order
      bookingType - the booking type
      Returns:
      true, if current cart is of type
    • getBookingTotalByOrderEntryType

      public double getBookingTotalByOrderEntryType(AbstractOrderModel abstractOrder, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Calculates the base price total amount for the orderEntryType in the abstract order
      Specified by:
      getBookingTotalByOrderEntryType in interface BookingService
      Parameters:
      abstractOrder - the order
      orderEntryType - the orderEntryType
      Returns:
      totalAmount booking total by order entry type
    • isValidPassengerReference

      public boolean isValidPassengerReference(AbstractOrderModel abstractOrder, String passengerReference)
      Description copied from interface: BookingService
      Checks if the passenger reference is valid for the provided abstract order
      Specified by:
      isValidPassengerReference in interface BookingService
      Parameters:
      abstractOrder - the abstractOrder
      passengerReference - the passengerReference
      Returns:
      boolean
    • getAccommodationDetailsParameters

      public Map<String,String> getAccommodationDetailsParameters(AbstractOrderModel abstractOrderModel)
      Description copied from interface: BookingService
      Retrieves a map of parameters needed to access accommodation details page (accommodation offering, check in date, check out date)
      Specified by:
      getAccommodationDetailsParameters in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      Returns:
      accommodation details parameters
    • getAccommodationOrderEntryGroupRefs

      public List<Integer> getAccommodationOrderEntryGroupRefs(AbstractOrderModel abstractOrderModel)
      Description copied from interface: BookingService
      Returns a list of AccommodationOrderEntryGroup reference numbers for the groups that have all entries in AmendStatus.NEW
      Specified by:
      getAccommodationOrderEntryGroupRefs in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      Returns:
      new accommodation order entry group refs
    • getNewAccommodationOrderEntryGroupRefs

      public List<Integer> getNewAccommodationOrderEntryGroupRefs(AbstractOrderModel abstractOrderModel)
      Description copied from interface: BookingService
      Returns a list of AccommodationOrderEntryGroup reference numbers for the groups that have all entries in AmendStatus.NEW
      Specified by:
      getNewAccommodationOrderEntryGroupRefs in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      Returns:
      new accommodation order entry group refs
    • getOldAccommodationOrderEntryGroupRefs

      public List<Integer> getOldAccommodationOrderEntryGroupRefs(AbstractOrderModel abstractOrderModel)
      Description copied from interface: BookingService
      Returns a list of AccommodationOrderEntryGroup reference numbers for the groups that have all entries in AmendStatus.SAME
      Specified by:
      getOldAccommodationOrderEntryGroupRefs in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      Returns:
      new accommodation order entry group refs
    • addRequestToRoomStayBooking

      public void addRequestToRoomStayBooking(String request, int roomStayRefNumber, String bookingReference) throws de.hybris.platform.servicelayer.exceptions.ModelSavingException, RequestKeyGeneratorException
      Description copied from interface: BookingService
      Add an user request against a room stay booking
      Specified by:
      addRequestToRoomStayBooking in interface BookingService
      Parameters:
      request - the request
      roomStayRefNumber - the room stay ref number
      bookingReference - the booking reference
      Throws:
      de.hybris.platform.servicelayer.exceptions.ModelSavingException - the model saving exception
      RequestKeyGeneratorException - the request key generator exception
    • createRequest

      protected RemarkModel createRequest(String request, int roomStayRefNumber, String bookingReference) throws RequestKeyGeneratorException, de.hybris.platform.servicelayer.exceptions.ModelSavingException
      Create request remark model.
      Parameters:
      request - the request
      roomStayRefNumber - the room stay ref number
      bookingReference - the booking reference
      Returns:
      the remark model
      Throws:
      RequestKeyGeneratorException - the request key generator exception
      de.hybris.platform.servicelayer.exceptions.ModelSavingException - the model saving exception
    • saveRemarkModel

      protected void saveRemarkModel(RemarkModel requestToCreate, int roomStayRefNumber, String bookingReference, int attempt) throws RequestKeyGeneratorException
      Save remark model.
      Parameters:
      requestToCreate - the request to create
      roomStayRefNumber - the room stay ref number
      bookingReference - the booking reference
      attempt - the attempt
      Throws:
      RequestKeyGeneratorException - the request key generator exception
    • removeRequestFromRoomStayBooking

      public void removeRequestFromRoomStayBooking(String requestCode, int roomStayRefNumber, String bookingReference) throws de.hybris.platform.servicelayer.exceptions.ModelNotFoundException, de.hybris.platform.servicelayer.exceptions.ModelRemovalException
      Description copied from interface: BookingService
      Remove an user request from a room stay booking
      Specified by:
      removeRequestFromRoomStayBooking in interface BookingService
      Parameters:
      requestCode - the request code
      roomStayRefNumber - the room stay ref number
      bookingReference - the booking reference
      Throws:
      de.hybris.platform.servicelayer.exceptions.ModelNotFoundException - the model not found exception
      de.hybris.platform.servicelayer.exceptions.ModelRemovalException - the model removal exception
    • getOrderTotalPriceByType

      public Double getOrderTotalPriceByType(AbstractOrderModel abstractOrder, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Returns the orderTotal related to the given orderEntryType part of the order.
      Specified by:
      getOrderTotalPriceByType in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      orderEntryType - the order entry type
      Returns:
      the Double value of the totalPrice for the given orderEntryType
    • unlinkBooking

      public boolean unlinkBooking(UserModel user, OrderModel order)
      Description copied from interface: BookingService
      Unlinks the booking from user account
      Specified by:
      unlinkBooking in interface BookingService
      Parameters:
      user - the user
      order - the order
      Returns:
      boolean
    • cancelPartialOrder

      public boolean cancelPartialOrder(BigDecimal totalToRefund, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Proceeds with cancellation of a part of the order, creates a refund transaction if there is any refund available
      Specified by:
      cancelPartialOrder in interface BookingService
      Parameters:
      totalToRefund - the total to refund
      orderEntryType - the order entry type
      Returns:
      true if successfully created refund payment transaction
    • getLastActiveOrderForType

      public AbstractOrderModel getLastActiveOrderForType(AbstractOrderModel abstractOrderModel, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Returns the last active order for the specified OrderEntryType
      Specified by:
      getLastActiveOrderForType in interface BookingService
      Parameters:
      abstractOrderModel - as the abstractOrderModel
      orderEntryType - as the orderEntryType
      Returns:
      the last active OrderModel
    • getOrderTotalToPayForChangeDates

      public BigDecimal getOrderTotalToPayForChangeDates()
      Description copied from interface: BookingService
      Calculates the total to pay for change dates for the order in cart
      Specified by:
      getOrderTotalToPayForChangeDates in interface BookingService
      Returns:
      totalAmountToPay order total to pay for change dates
    • getOrderTotalPaid

      public BigDecimal getOrderTotalPaid(AbstractOrderModel abstractOrder)
      Description copied from interface: BookingService
      Calculates the total already paid for a given order
      Specified by:
      getOrderTotalPaid in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      Returns:
      order total paid
    • getOrderTotalPaidByEntryGroup

      public BigDecimal getOrderTotalPaidByEntryGroup(AbstractOrderModel abstractOrder, AbstractOrderEntryGroupModel entryGroup)
      Description copied from interface: BookingService
      Calculates the total already paid for products belonging to a given entry group within the given order
      Specified by:
      getOrderTotalPaidByEntryGroup in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      entryGroup - the entry group
      Returns:
      order total paid by entry group
    • getOrderTotalPaidForOrderEntryType

      public BigDecimal getOrderTotalPaidForOrderEntryType(AbstractOrderModel abstractOrder, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Calculates the total already paid for products of the given orderEntryType and for the given order
      Specified by:
      getOrderTotalPaidForOrderEntryType in interface BookingService
      Parameters:
      abstractOrder - the abstract order
      orderEntryType - the order entry type
      Returns:
      order total paid for order entry type
    • linkEntriesToOldPaymentTransactions

      public boolean linkEntriesToOldPaymentTransactions(AccommodationOrderEntryGroupModel orderEntryGroup, List<AbstractOrderEntryModel> entries)
      Description copied from interface: BookingService
      This method will replace all the old RoomRateModel entries belonging to specific group transaction entries , with new Entries.
      Specified by:
      linkEntriesToOldPaymentTransactions in interface BookingService
      Parameters:
      orderEntryGroup - the order entry group
      entries - the entries
      Returns:
      boolean
    • getOrderForCurrentUser

      public OrderModel getOrderForCurrentUser(String code)
      Description copied from interface: BookingService
      Returns the specified order for the current user and store.
      Specified by:
      getOrderForCurrentUser in interface BookingService
      Parameters:
      code - the code of the order to retrieve
      Returns:
      the order
    • getTotalRefundAmountByEntryType

      public BigDecimal getTotalRefundAmountByEntryType(AbstractOrderModel abstractOrderModel, OrderEntryType orderEntryType)
      Description copied from interface: BookingService
      Gets total refund amount by entry type.
      Specified by:
      getTotalRefundAmountByEntryType in interface BookingService
      Parameters:
      abstractOrderModel - the abstract order model
      orderEntryType - the order entry type
      Returns:
      the total refund amount by entry type
    • cancelOrder

      public void cancelOrder(OrderModel order, UserModel requestor) throws BookingCancelException
      Description copied from interface: BookingService
      Performs the cancellation of the order.
      Specified by:
      cancelOrder in interface BookingService
      Parameters:
      order - the order to be cancelled
      requestor - the requestor
      Throws:
      BookingCancelException - if the order cannot be cancelled
    • checkIfPartialCancelPossible

      public void checkIfPartialCancelPossible(OrderModel order, OrderEntryType orderEntryType) throws OrderCancelDeniedException
      Description copied from interface: BookingService
      Checks if the order cancellation possible for the given requestor.
      Specified by:
      checkIfPartialCancelPossible in interface BookingService
      Parameters:
      order - the order to be cancelled
      Throws:
      OrderCancelDeniedException - when cancel is denied
    • getActiveEntries

      public List<AbstractOrderEntryModel> getActiveEntries(OrderModel order, OrderEntryType excludedType)
      Description copied from interface: BookingService
      Returns active order entries whose type is not equal to given type to exclude.
      Specified by:
      getActiveEntries in interface BookingService
      Parameters:
      order - the order
      excludedType - the order entry type to exclude
      Returns:
      order entries
    • placeCancelledOrder

      protected void placeCancelledOrder(CartModel cart) throws BookingCancelException
      Place cancelled order.
      Parameters:
      cart - the cart
      Throws:
      BookingCancelException - thrown in case of errors
    • getOrder

      public OrderModel getOrder(String orderCode, boolean isOrderGuid)
      Gets order.
      Specified by:
      getOrder in interface BookingService
      Parameters:
      orderCode - the order id
      Returns:
      the order
      Throws:
      TravelModelNotFoundException - the order not found exception
    • getRequestToRoomStayBooking

      public SpecialRequestDetailModel getRequestToRoomStayBooking(int roomStayRefNumber, OrderModel orderModel) throws SpecialRequestException
      Description copied from interface: BookingService
      Get an user request against a room stay booking
      Specified by:
      getRequestToRoomStayBooking in interface BookingService
      Parameters:
      roomStayRefNumber - the room stay ref number
      orderModel - the booking reference
      Returns:
      true if the operation of adding the request is successfully performed, false otherwise
      Throws:
      SpecialRequestException - the special request exception
    • getModelService

      protected de.hybris.platform.servicelayer.model.ModelService getModelService()
      Gets model service.
      Returns:
      the modelService
    • setModelService

      public void setModelService(de.hybris.platform.servicelayer.model.ModelService modelService)
      Sets model service.
      Parameters:
      modelService - the modelService to set
    • getUserService

      protected de.hybris.platform.servicelayer.user.UserService getUserService()
      Gets user service.
      Returns:
      the userService
    • setUserService

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
      Sets user service.
      Parameters:
      userService - the userService to set
    • getCommerceCheckoutService

      protected de.hybris.platform.commerceservices.order.CommerceCheckoutService getCommerceCheckoutService()
      Gets commerce checkout service.
      Returns:
      the commerceCheckoutService
    • setCommerceCheckoutService

      public void setCommerceCheckoutService(de.hybris.platform.commerceservices.order.CommerceCheckoutService commerceCheckoutService)
      Sets commerce checkout service.
      Parameters:
      commerceCheckoutService - the commerceCheckoutService to set
    • getPaymentService

      protected de.hybris.platform.payment.PaymentService getPaymentService()
      Gets payment service.
      Returns:
      the paymentService
    • setPaymentService

      public void setPaymentService(de.hybris.platform.payment.PaymentService paymentService)
      Sets payment service.
      Parameters:
      paymentService - the paymentService to set
    • getOrderCancelService

      protected de.hybris.platform.ordercancel.OrderCancelService getOrderCancelService()
      Gets order cancel service.
      Returns:
      the orderCancelService
    • setOrderCancelService

      public void setOrderCancelService(de.hybris.platform.ordercancel.OrderCancelService orderCancelService)
      Sets order cancel service.
      Parameters:
      orderCancelService - the orderCancelService to set
    • getConfigurationService

      protected de.hybris.platform.servicelayer.config.ConfigurationService getConfigurationService()
      Gets configuration service.
      Returns:
      the configurationService
    • setConfigurationService

      public void setConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService)
      Sets configuration service.
      Parameters:
      configurationService - the configurationService to set
    • getTravelCartService

      protected TravelCartService getTravelCartService()
      Gets travel cart service.
      Returns:
      the travelCartService
    • setTravelCartService

      public void setTravelCartService(TravelCartService travelCartService)
      Sets travel cart service.
      Parameters:
      travelCartService - the travelCartService to set
    • getTotalRefundCalculationStrategy

      protected TotalRefundCalculationStrategy getTotalRefundCalculationStrategy()
      Gets total refund calculation strategy.
      Returns:
      the totalRefundCalculationStrategy
    • setTotalRefundCalculationStrategy

      public void setTotalRefundCalculationStrategy(TotalRefundCalculationStrategy totalRefundCalculationStrategy)
      Sets total refund calculation strategy.
      Parameters:
      totalRefundCalculationStrategy - the totalRefundCalculationStrategy to set
    • getBaseStoreService

      protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Gets base store service.
      Returns:
      baseStoreService base store service
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
      Sets base store service.
      Parameters:
      baseStoreService - the baseStoreService 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
    • getOrderService

      protected de.hybris.platform.order.OrderService getOrderService()
      Gets order service.
      Returns:
      the order service
    • setOrderService

      public void setOrderService(de.hybris.platform.order.OrderService orderService)
      Sets order service.
      Parameters:
      orderService - the order service
    • getCustomerAccountService

      protected TravelCustomerAccountService getCustomerAccountService()
      Gets customer account service.
      Returns:
      the customer account service
    • setCustomerAccountService

      public void setCustomerAccountService(TravelCustomerAccountService customerAccountService)
      Sets customer account service.
      Parameters:
      customerAccountService - the customer account service
    • getTimeService

      protected de.hybris.platform.servicelayer.time.TimeService getTimeService()
      Gets time service.
      Returns:
      the timeService
    • setTimeService

      public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
      Sets time service.
      Parameters:
      timeService - the timeService to set
    • getTravelKeyGeneratorService

      protected TravelKeyGeneratorService getTravelKeyGeneratorService()
      Gets travel key generator service.
      Returns:
      the travelKeyGeneratorService
    • setTravelKeyGeneratorService

      public void setTravelKeyGeneratorService(TravelKeyGeneratorService travelKeyGeneratorService)
      Sets travel key generator service.
      Parameters:
      travelKeyGeneratorService - the travelKeyGeneratorService to set
    • getTotalRefundCalculationStrategyMap

      public Map<OrderEntryType,TotalRefundCalculationStrategy> getTotalRefundCalculationStrategyMap()
      Gets total refund calculation strategy map.
      Returns:
      the totalRefundCalculationStrategyMap
    • setTotalRefundCalculationStrategyMap

      public void setTotalRefundCalculationStrategyMap(Map<OrderEntryType,TotalRefundCalculationStrategy> totalRefundCalculationStrategyMap)
      Sets total refund calculation strategy map.
      Parameters:
      totalRefundCalculationStrategyMap - as the totalRefundCalculationStrategyMap to set
    • getAbstractOrderEntryGroupDao

      protected AbstractOrderEntryGroupDao getAbstractOrderEntryGroupDao()
      Gets abstract order entry group dao.
      Returns:
      the abstractOrderEntryGroupDao
    • setAbstractOrderEntryGroupDao

      public void setAbstractOrderEntryGroupDao(AbstractOrderEntryGroupDao abstractOrderEntryGroupDao)
      Sets abstract order entry group dao.
      Parameters:
      abstractOrderEntryGroupDao - as the abstractOrderEntryGroupDao to set
    • getOrderUserAccountMappingDao

      protected OrderUserAccountMappingDao getOrderUserAccountMappingDao()
      Gets order user account mapping dao.
      Returns:
      the orderUserAccountMappingDao
    • setOrderUserAccountMappingDao

      public void setOrderUserAccountMappingDao(OrderUserAccountMappingDao orderUserAccountMappingDao)
      Sets order user account mapping dao.
      Parameters:
      orderUserAccountMappingDao - as the orderUserAccountMappingDao to set
    • getTravelOrderDao

      protected TravelOrderDao getTravelOrderDao()
      Gets travel order dao.
      Returns:
      the travelOrderDao
    • setTravelOrderDao

      public void setTravelOrderDao(TravelOrderDao travelOrderDao)
      Sets travel order dao.
      Parameters:
      travelOrderDao - as the travelOrderDao to set
    • getOrderHistoryService

      protected de.hybris.platform.orderhistory.OrderHistoryService getOrderHistoryService()
      Gets order history service.
      Returns:
      the orderHistoryService
    • setOrderHistoryService

      public void setOrderHistoryService(de.hybris.platform.orderhistory.OrderHistoryService orderHistoryService)
      Sets order history service.
      Parameters:
      orderHistoryService - as the orderHistoryService to set
    • getOrderTotalPaidCalculationStrategy

      protected OrderTotalPaidCalculationStrategy getOrderTotalPaidCalculationStrategy()
      Gets order total paid calculation strategy.
      Returns:
      the orderTotalPaidCalculationStrategy
    • setOrderTotalPaidCalculationStrategy

      public void setOrderTotalPaidCalculationStrategy(OrderTotalPaidCalculationStrategy orderTotalPaidCalculationStrategy)
      Sets order total paid calculation strategy.
      Parameters:
      orderTotalPaidCalculationStrategy - the orderTotalPaidCalculationStrategy to set
    • getOrderTotalPaidForAccommodationGroupCalculationStrategy

      protected OrderTotalPaidForEntryGroupCalculationStrategy getOrderTotalPaidForAccommodationGroupCalculationStrategy()
      Gets order total paid for accommodation group calculation strategy.
      Returns:
      the orderTotalPaidForAccommodationGroupCalculationStrategy
    • setOrderTotalPaidForAccommodationGroupCalculationStrategy

      public void setOrderTotalPaidForAccommodationGroupCalculationStrategy(OrderTotalPaidForEntryGroupCalculationStrategy orderTotalPaidForAccommodationGroupCalculationStrategy)
      Sets order total paid for accommodation group calculation strategy.
      Parameters:
      orderTotalPaidForAccommodationGroupCalculationStrategy - the orderTotalPaidForAccommodationGroupCalculationStrategy to set
    • getOrderTotalPaidForOrderEntryTypeCalculationStrategy

      public OrderTotalPaidForOrderEntryTypeCalculationStrategy getOrderTotalPaidForOrderEntryTypeCalculationStrategy()
      Gets order total paid for order entry type calculation strategy.
      Returns:
      the orderTotalPaidForOrderEntryTypeCalculationStrategy
    • setOrderTotalPaidForOrderEntryTypeCalculationStrategy

      public void setOrderTotalPaidForOrderEntryTypeCalculationStrategy(OrderTotalPaidForOrderEntryTypeCalculationStrategy orderTotalPaidForOrderEntryTypeCalculationStrategy)
      Sets order total paid for order entry type calculation strategy.
      Parameters:
      orderTotalPaidForOrderEntryTypeCalculationStrategy - the orderTotalPaidForOrderEntryTypeCalculationStrategy to set
    • getChangeDatesOrderTotalToPayStrategy

      protected ChangeDatesOrderTotalToPayStrategy getChangeDatesOrderTotalToPayStrategy()
      Gets change dates order total to pay strategy.
      Returns:
      the changeDatesOrderTotalToPayStrategy
    • setChangeDatesOrderTotalToPayStrategy

      public void setChangeDatesOrderTotalToPayStrategy(ChangeDatesOrderTotalToPayStrategy changeDatesOrderTotalToPayStrategy)
      Sets change dates order total to pay strategy.
      Parameters:
      changeDatesOrderTotalToPayStrategy - the changeDatesOrderTotalToPayStrategy to set
    • getEnumerationService

      protected de.hybris.platform.enumeration.EnumerationService getEnumerationService()
      Gets the enumeration service.
      Returns:
      the enumeration service
    • setEnumerationService

      public void setEnumerationService(de.hybris.platform.enumeration.EnumerationService enumerationService)
      Sets the enumeration service.
      Parameters:
      enumerationService - the new enumeration service
    • getEntryTypeToDiscountCalculationStrategyMap

      protected Map<OrderEntryType,GlobalDiscountByEntryTypeCalculationStrategy> getEntryTypeToDiscountCalculationStrategyMap()
      Gets entry type to discount calculation strategy map.
      Returns:
      the entryTypeToDiscountCalculationStrategyMap
    • setEntryTypeToDiscountCalculationStrategyMap

      public void setEntryTypeToDiscountCalculationStrategyMap(Map<OrderEntryType,GlobalDiscountByEntryTypeCalculationStrategy> entryTypeToDiscountCalculationStrategyMap)
      Sets entry type to discount calculation strategy map.
      Parameters:
      entryTypeToDiscountCalculationStrategyMap - the entryTypeToDiscountCalculationStrategyMap to set
    • getTaxCompensationStrategy

      protected TaxCompensationStrategy getTaxCompensationStrategy()
      Gets tax compensation strategy.
      Returns:
      the taxCompensationStrategy
    • setTaxCompensationStrategy

      public void setTaxCompensationStrategy(TaxCompensationStrategy taxCompensationStrategy)
      ]
      Parameters:
      taxCompensationStrategy - the taxCompensationStrategy to set
    • getOrderEntriesCancelStrategiesMapping

      protected Map<OrderEntryType,OrderEntriesCancelStrategy> getOrderEntriesCancelStrategiesMapping()
      Gets order entries cancel strategies mapping.
      Returns:
      the order entries cancel strategies mapping
    • setOrderEntriesCancelStrategiesMapping

      public void setOrderEntriesCancelStrategiesMapping(Map<OrderEntryType,OrderEntriesCancelStrategy> orderEntriesCancelStrategiesMapping)
      Sets order entries cancel strategies mapping.
      Parameters:
      orderEntriesCancelStrategiesMapping - the order entries cancel strategies mapping
    • getSessionService

      protected de.hybris.platform.servicelayer.session.SessionService getSessionService()
      Gets session service.
      Returns:
      the session service
    • setSessionService

      public void setSessionService(de.hybris.platform.servicelayer.session.SessionService sessionService)
      Sets session service.
      Parameters:
      sessionService - the session service