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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringgetCategoryMapping(ProductModel ancillaryProduct) Returns the mapping extracted from the category that the providedProductModelbelongs to.protected ErrorCodeResolverGets error code resolver.Gets offer group to origin destination mapping.protected de.hybris.platform.product.ProductServiceGet product servicevoidsetErrorCodeResolver(ErrorCodeResolver errorCodeResolver) Sets error code resolver.voidsetOfferGroupToOriginDestinationMapping(Map<String, String> offerGroupToOriginDestinationMapping) Sets offer group to origin destination mapping.voidsetProductService(de.hybris.platform.product.ProductService productService) Set product servicevoidvalidate(AncillaryEntryRequest ancillaryEntryRQ) Validates transportOfferingCodes, passenger, travelRouteCode and throws exception
-
Constructor Details
-
PerLegPerPaxValidationStrategy
public PerLegPerPaxValidationStrategy()
-
-
Method Details
-
validate
Description copied from interface:AddAncillaryToCartRequestValidationStrategyValidates transportOfferingCodes, passenger, travelRouteCode and throws exception- Specified by:
validatein interfaceAddAncillaryToCartRequestValidationStrategy- Parameters:
ancillaryEntryRQ- ancillary entry request
-
getCategoryMapping
Returns the mapping extracted from the category that the providedProductModelbelongs 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
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
Gets error code resolver.- Returns:
- the error code resolver
-
setErrorCodeResolver
Sets error code resolver.- Parameters:
errorCodeResolver- the error code resolver
-