java.lang.Object
de.hybris.platform.travelfacades.fare.search.handlers.impl.FareRulesHandler
All Implemented Interfaces:
FareSearchHandler

public class FareRulesHandler extends Object implements FareSearchHandler
Handler which filters fare products based on the outcome of drools rule evaluation
  • Constructor Details

    • FareRulesHandler

      public FareRulesHandler()
  • Method Details

    • handle

      public void handle(List<ScheduledRouteData> scheduledRoutes, FareSearchRequestData fareSearchRequestData, FareSelectionData fareSelectionData)
      Description copied from interface: FareSearchHandler
      Handle method.
      Specified by:
      handle in interface FareSearchHandler
      Parameters:
      scheduledRoutes - the scheduled routes
      fareSearchRequestData - the fare search request data
      fareSelectionData - the fare selection data
    • updateAvailability

      protected void updateAvailability(FareSelectionData fareSelectionData)
      Updates availability of bundles, itinerary pricing infos and priced itineraries after rules evaluation activity
      Parameters:
      fareSelectionData - the fare selection data
    • removeExcludedProductsFromBundles

      protected void removeExcludedProductsFromBundles(FareSelectionData fareSelectionData, List<FareProductData> excludedFareProducts)
      Removes excluded fare products from all bundles that contain them
      Parameters:
      fareSelectionData - the fare selection data
      excludedFareProducts - the excluded fare products
    • collectFareProducts

      protected List<FareProductData> collectFareProducts(FareSelectionData fareSelectionData)
      Collects unique fare products from all priced itineraries
      Parameters:
      fareSelectionData - the fare selection data
      Returns:
      list
    • isFareProductUnique

      protected Boolean isFareProductUnique(List<FareProductData> fareProducts, FareProductData fareProduct)
      Verifies that there is no fare product with the same code already in the list
      Parameters:
      fareProducts - the fare products
      fareProduct - the fare product
      Returns:
      boolean
    • getTravelRulesService

      protected TravelRulesService getTravelRulesService()
      Gets travel rules service.
      Returns:
      the travel rules service
    • setTravelRulesService

      public void setTravelRulesService(TravelRulesService travelRulesService)
      Sets travel rules service.
      Parameters:
      travelRulesService - the travel rules 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