Class NDCAmendAncillaryStrategy

java.lang.Object
de.hybris.platform.ndc182facades.facades.order.strategies.impl.NDCAmendAncillaryStrategy
All Implemented Interfaces:
NDCChangeOrderStrategy

public class NDCAmendAncillaryStrategy extends Object implements NDCChangeOrderStrategy
The type Ndc amend ancillary strategy.
  • Constructor Details

    • NDCAmendAncillaryStrategy

      public NDCAmendAncillaryStrategy()
  • Method Details

    • changeOrder

      public void changeOrder(OrderModel clonedOrder, IATAOrderChangeRQ orderChangeRQ, List<AbstractOrderEntryModel> orderEntries) throws NDCException
      Description copied from interface: NDCChangeOrderStrategy
      Change order.
      Specified by:
      changeOrder in interface NDCChangeOrderStrategy
      Parameters:
      clonedOrder - the cloned order
      orderChangeRQ - the order change rq
      Throws:
      NDCException
    • checkPassenger

      protected void checkPassenger(IATAOrderChangeRQ orderChangeRQ, ReservationData reservationData) throws NDCException
      Validate passenger.
      Parameters:
      orderChangeRQ - the order change rq
      reservationData - the reservation data
      Throws:
      NDCException - the ndc exception
    • getNdcAlaCarteOrderItem

      protected NDCAlaCarteOfferItemData getNdcAlaCarteOrderItem(NDCAlaCarteOfferData ndcAlaCarteOfferData, SelectedOfferItemType selectedOfferItem) throws NDCException
      Gets ndc ala carte order item.
      Parameters:
      ndcAlaCarteOfferData - the ndc ala carte offer data
      selectedOfferItem - the selected offer item
      Returns:
      the ndc ala carte order item
      Throws:
      NDCException - the ndc exception
    • isSameTransportOfferings

      protected boolean isSameTransportOfferings(NDCAlaCarteOfferItemData ndcAlaCarteOfferItemData, SelectedOfferItemType selectedOfferItem)
      Check if the transport offerings in the offer item retrieved from cache contains the pasengers from the request.
      Parameters:
      ndcAlaCarteOfferItemData - the ndc ala carte offer item data
      selectedOfferItem - the selected offer item
      Returns:
      the boolean
    • getTravellerFromPassenger

      protected TravellerModel getTravellerFromPassenger(String paxRefId, Set<TravellerModel> travellerModels) throws NDCException
      Gets traveller from passenger.
      Parameters:
      paxRefId - the pax ref id
      travellerModels - the traveller models
      Returns:
      the traveller from passenger
      Throws:
      NDCException - the ndc exception
    • validateTravellers

      protected void validateTravellers(OrderModel order, TravellerModel traveller) throws NDCException
      Checks if at least one order entry associated to the {traveller is in active status for all the TravellerModel provided if not throws NDCException
      Parameters:
      order - the order
      traveller - the traveller
      Throws:
      NDCException - the ndc exception
    • isActiveTraveller

      protected boolean isActiveTraveller(OrderModel order, TravellerModel traveller)
      Checks if at least one order entry associated to the traveller is in active status
      Parameters:
      order - the order
      traveller - the traveller
      Returns:
      boolean boolean
    • updateAncillary

      protected void updateAncillary(NDCAlaCarteOfferItemData ndcAlaCarteOfferItem, OrderModel amendedOrder, int quantity, TravellerModel traveller, List<AbstractOrderEntryModel> orderEntries, List<String> transportOfferingCodes, SelectedOfferItemType selectedOfferItem) throws NDCException
      Gets product from order.
      Parameters:
      ndcAlaCarteOfferItem - the ndc ala carte offer item
      amendedOrder - the amended order
      quantity - the quantity
      traveller - the traveller
      orderEntries - the order entries
      transportOfferingCodes - the transport offering codes
      selectedOfferItem - the selected offer item
      Throws:
      NDCException - the ndc exception
    • addAccommodation

      protected void addAccommodation(SelectedOfferItemType selectedOfferItem, TravellerModel traveller, List<String> transportOfferingCodes, OrderModel amendedOrder, String productRestriction, NDCAlaCarteOfferItemData ndcAlaCarteOfferItem, ProductModel product, List<AbstractOrderEntryModel> orderEntries, int quantity) throws NDCException
      Add accommodation.
      Parameters:
      selectedOfferItem - the selected offer item
      traveller - the traveller
      transportOfferingCodes - the transport offering codes
      amendedOrder - the amended order
      productRestriction - the product restriction
      ndcAlaCarteOfferItem - the ndc ala carte offer item
      product - the product
      orderEntries - the order entries
      quantity - the quantity
      Throws:
      NDCException - the ndc exception
    • checkProductCategory

      protected void checkProductCategory(ProductModel ancillaryProduct) throws NDCException
      Checks that the product category is not among the restricted ones. Throws an exception otherwise. (i.e. Seat are accommodation products and needs to be included in a different element in the OrderChangeRQ
      Parameters:
      ancillaryProduct - the ancillary product
      Throws:
      NDCException - the ndc exception
    • isValidDate

      protected boolean isValidDate(TransportOfferingModel transportOffering)
      Is valid date boolean.
      Parameters:
      transportOffering - the transport offering
      Returns:
      the boolean
    • getTransportOfferings

      protected List<TransportOfferingModel> getTransportOfferings(List<String> transportOfferingCodes) throws NDCException
      Gets transport offerings.
      Parameters:
      transportOfferingCodes - the transport offering codes
      Returns:
      the transport offerings
      Throws:
      NDCException - the ndc exception
    • getNdcOfferFacade

      protected NDCOfferFacade getNdcOfferFacade()
      Gets ndc offer facade.
      Returns:
      the ndc offer facade
    • setNdcOfferFacade

      public void setNdcOfferFacade(NDCOfferFacade ndcOfferFacade)
      Sets ndc offer facade.
      Parameters:
      ndcOfferFacade - the ndc offer facade
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
      Gets product service.
      Returns:
      the product service
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)
      Sets product service.
      Parameters:
      productService - the product service
    • getTravelRestrictionFacade

      protected TravelRestrictionFacade getTravelRestrictionFacade()
      Gets travel restriction facade.
      Returns:
      the travel restriction facade
    • setTravelRestrictionFacade

      public void setTravelRestrictionFacade(TravelRestrictionFacade travelRestrictionFacade)
      Sets travel restriction facade.
      Parameters:
      travelRestrictionFacade - the travel restriction facade
    • getTravellerService

      protected TravellerService getTravellerService()
      Gets traveller service.
      Returns:
      the traveller service
    • setTravellerService

      public void setTravellerService(TravellerService travellerService)
      Sets traveller service.
      Parameters:
      travellerService - the traveller service
    • getCategoriesNotAllowed

      protected List<String> getCategoriesNotAllowed()
      Gets categories not allowed.
      Returns:
      the categories not allowed
    • setCategoriesNotAllowed

      public void setCategoriesNotAllowed(List<String> categoriesNotAllowed)
      Sets categories not allowed.
      Parameters:
      categoriesNotAllowed - the categories not allowed
    • getBookingService

      protected BookingService getBookingService()
      Gets booking service.
      Returns:
      the booking service
    • setBookingService

      public void setBookingService(BookingService bookingService)
      Sets booking service.
      Parameters:
      bookingService - the booking service
    • getModelService

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

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

      protected NDCOrderFacade getNdcOrderFacade()
      Gets ndc order facade.
      Returns:
      the ndc order facade
    • setNdcOrderFacade

      public void setNdcOrderFacade(NDCOrderFacade ndcOrderFacade)
      Sets ndc order facade.
      Parameters:
      ndcOrderFacade - the ndc order facade
    • getNdcAddAncillariesToOrderRestrictionStrategyMap

      protected Map<String,NDCAddAncillaryToOrderStrategy> getNdcAddAncillariesToOrderRestrictionStrategyMap()
      Gets ndc add ancillaries to order restriction strategy map.
      Returns:
      the ndc add ancillaries to order restriction strategy map
    • setNdcAddAncillariesToOrderRestrictionStrategyMap

      public void setNdcAddAncillariesToOrderRestrictionStrategyMap(Map<String,NDCAddAncillaryToOrderStrategy> ndcAddAncillariesToOrderRestrictionStrategyMap)
      Sets ndc add ancillaries to order restriction strategy map.
      Parameters:
      ndcAddAncillariesToOrderRestrictionStrategyMap - the ndc add ancillaries to order restriction strategy map
    • getTransportOfferingService

      protected TransportOfferingService getTransportOfferingService()
      Gets transport offering service.
      Returns:
      the transport offering service
    • setTransportOfferingService

      public void setTransportOfferingService(TransportOfferingService transportOfferingService)
      Sets transport offering service.
      Parameters:
      transportOfferingService - the transport offering service
    • getTimeService

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

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

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

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

      protected ReservationFacade getReservationFacade()
      Gets reservation facade.
      Returns:
      the reservation facade
    • setReservationFacade

      public void setReservationFacade(ReservationFacade reservationFacade)
      Sets reservation facade.
      Parameters:
      reservationFacade - the reservation facade
    • getAccommodationMapService

      protected AccommodationMapService getAccommodationMapService()
      Gets accommodation map service.
      Returns:
      the accommodation map service
    • setAccommodationMapService

      public void setAccommodationMapService(AccommodationMapService accommodationMapService)
      Sets accommodation map service.
      Parameters:
      accommodationMapService - the accommodation map service
    • getNdcRemoveAccommodationOrderEntryStrategy

      protected NDCRemoveOrderEntryStrategy getNdcRemoveAccommodationOrderEntryStrategy()
      Gets ndc remove accommodation order entry strategy.
      Returns:
      the ndc remove accommodation order entry strategy
    • setNdcRemoveAccommodationOrderEntryStrategy

      public void setNdcRemoveAccommodationOrderEntryStrategy(NDCRemoveOrderEntryStrategy ndcRemoveAccommodationOrderEntryStrategy)
      Sets ndc remove accommodation order entry strategy.
      Parameters:
      ndcRemoveAccommodationOrderEntryStrategy - the ndc remove accommodation order entry strategy
    • getNdcOrderService

      protected NDCOrderService getNdcOrderService()
      Gets ndc order service.
      Returns:
      the ndc order service
    • setNdcOrderService

      public void setNdcOrderService(NDCOrderService ndcOrderService)
      Sets ndc order service.
      Parameters:
      ndcOrderService - the ndc order service
    • getNdcAlaCarteValidator

      protected NDCAlaCarteValidator getNdcAlaCarteValidator()
      Gets ndc ala carte validator.
      Returns:
      the ndc ala carte validator
    • setNdcAlaCarteValidator

      public void setNdcAlaCarteValidator(NDCAlaCarteValidator ndcAlaCarteValidator)
      Sets ndc ala carte validator.
      Parameters:
      ndcAlaCarteValidator - the ndc ala carte validator