Class PerLegPerPaxValidationStrategy

java.lang.Object
de.hybris.platform.coretransportocc.validators.strategies.impl.PerLegPerPaxValidationStrategy
All Implemented Interfaces:
AddAncillaryToCartRequestValidationStrategy

public class PerLegPerPaxValidationStrategy extends Object implements AddAncillaryToCartRequestValidationStrategy
Strategy to validate transportOfferingCodes not empty in add ancillary request to cart, If empty throws exception
  • Constructor Details

    • PerLegPerPaxValidationStrategy

      public PerLegPerPaxValidationStrategy()
  • Method Details

    • validate

      public void validate(AncillaryEntryRequest ancillaryEntryRQ)
      Description copied from interface: AddAncillaryToCartRequestValidationStrategy
      Validates transportOfferingCodes, passenger, travelRouteCode and throws exception
      Specified by:
      validate in interface AddAncillaryToCartRequestValidationStrategy
      Parameters:
      ancillaryEntryRQ - ancillary entry request
    • getCategoryMapping

      protected String getCategoryMapping(ProductModel ancillaryProduct)
      Returns the mapping extracted from the category that the provided ProductModel belongs to.
      Parameters:
      ancillaryProduct - the ancillary product
      Returns:
      category mapping
    • getProductService

      protected de.hybris.platform.product.ProductService getProductService()
      Get product service
      Returns:
      productService
    • setProductService

      public void setProductService(de.hybris.platform.product.ProductService productService)
      Set product service
      Parameters:
      productService -
    • getOfferGroupToOriginDestinationMapping

      protected Map<String,String> getOfferGroupToOriginDestinationMapping()
      Gets offer group to origin destination mapping.
      Returns:
      the offer group to origin destination mapping
    • setOfferGroupToOriginDestinationMapping

      public void setOfferGroupToOriginDestinationMapping(Map<String,String> offerGroupToOriginDestinationMapping)
      Sets offer group to origin destination mapping.
      Parameters:
      offerGroupToOriginDestinationMapping - the offer group to origin destination mapping
    • getErrorCodeResolver

      protected ErrorCodeResolver getErrorCodeResolver()
      Gets error code resolver.
      Returns:
      the error code resolver
    • setErrorCodeResolver

      public void setErrorCodeResolver(ErrorCodeResolver errorCodeResolver)
      Sets error code resolver.
      Parameters:
      errorCodeResolver - the error code resolver