Interface NDCOrderService

All Known Implementing Classes:
DefaultNDCOrderService

public interface NDCOrderService
The ndc 18.2 Order Service interface.
  • Method Details

    • removeOrder

      void removeOrder(OrderModel order)
      Checks if the order has already been saved and, in case, deletes it.
      Parameters:
      order - the order
    • validatePaymentInfoAgainstOrderEntries

      void validatePaymentInfoAgainstOrderEntries(OrderModel order, List<AbstractOrderEntryModel> orderEntries, BigDecimal paymentInfoAmount) throws NDCException
      Validates the amount of the payment info against the total amount of the order entries associated to it.
      Parameters:
      order - the order
      orderEntries - the order entries
      paymentInfoAmount - the payment info amount
      Throws:
      NDCException - the ndc exception
    • validateProductAgainstMaximumQuantityRestriction

      void validateProductAgainstMaximumQuantityRestriction(long selectedOfferItemQty, AbstractOrderEntryModel existingProduct, ProductModel product, OrderModel order) throws NDCException
      Validates the product against the maximum quantity restriction.
      Parameters:
      selectedOfferItemQty - the selectedOfferItemQty
      existingProduct - the existing product
      product - the product
      order - the order
      Throws:
      NDCException - the ndc exception
    • createSelectedAccommodations

      void createSelectedAccommodations(ProductModel product, BigDecimal rowSeat, String columnSeat, List<String> transportOfferingCodes, TravellerModel traveller, OrderModel order, String routeCode) throws NDCException
      Creates a selected accommodation for each transport offering associated to the selected seat. Verifies if the seat belongs to the right class of the fare product, is already present in the order for the same traveller and if it is already occupied by someone else.
      Parameters:
      product - the product
      rowSeat - the row seat
      columnSeat - the column seat
      transportOfferingCodes - the transport offering codes
      traveller - the traveller
      order - the order
      routeCode - the route code
      Throws:
      NDCException - the ndc exception
    • isSameTransportOfferingList

      boolean isSameTransportOfferingList(AbstractOrderEntryModel orderEntry, List<String> transportOfferings, int originDestiRefNumber)
      Checks if the list of transport offerings is the same with the one in the order entry, together with the originDestinationRefNumber.
      Parameters:
      orderEntry - the order entry
      transportOfferings - the transport offerings
      originDestiRefNumber - the origin desti ref number
      Returns:
      true if the transport offerings and the originDestinationRefNumber is the same.
    • isSamePassenger

      boolean isSamePassenger(AbstractOrderEntryModel orderEntry, TravellerModel traveller)
      Checks if the traveller in the orderEntry is the same.
      Parameters:
      orderEntry - the order entry
      traveller - the traveller
      Returns:
      the boolean
    • isAmendedOrderEntry

      boolean isAmendedOrderEntry(AbstractOrderEntryModel orderEntry)
      Checks if the order entry has amend status equal to NEW or CHANGED.
      Parameters:
      orderEntry - the order entry
      Returns:
      the boolean
    • getProductCatalogIdFromBaseSite

      String getProductCatalogIdFromBaseSite() throws NDCException
      Gets product catalog id from baseSite.
      Returns:
      the product catalog
      Throws:
      NDCException - the ndc exception
    • createOrderEntry

      OrderEntryModel createOrderEntry(OrderModel order, ProductModel product, Set<Integer> orderEntryGroupNumber, List<TransportOfferingModel> transportOfferings, TravellerModel traveller, String routeCode, int originDestinationRefNumber, long quantity, Integer bundleNumber, BundleTemplateModel bundleTemplate)
      Creates an order entry.
      Parameters:
      order - the order
      product - the product
      orderEntryGroupNumber - the order entry group number
      transportOfferings - the transport offerings
      traveller - the traveller
      routeCode - the route code
      originDestinationRefNumber - the origin destination ref number
      quantity - the quantity
      bundleNumber - the bundleNumber
      bundleTemplate - the bundleTemplate
      Returns:
      the order entry model
    • updateEntriesAmendStatus

      void updateEntriesAmendStatus(List<AbstractOrderEntryModel> entries, AmendStatus status)
      Update entries amend status.
      Parameters:
      entries - the entries
      status - the status
    • isAmendmentOrder

      Boolean isAmendmentOrder(OrderModel orderModel)
      Is amendment order boolean.
      Parameters:
      orderModel - the order model
      Returns:
      the boolean
    • getOriginalOrderCode

      String getOriginalOrderCode(OrderModel orderModel)
      Gets original order code.
      Parameters:
      orderModel - the order model
      Returns:
      the original order code