Class DefaultTravellerPtcCodeValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.impl.DefaultTravellerPtcCodeValidationStrategy
- All Implemented Interfaces:
AddTravellerToCartValidationStrategy
public class DefaultTravellerPtcCodeValidationStrategy
extends Object
implements AddTravellerToCartValidationStrategy
Strategy to validate the ptcCode of a traveller.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.servicelayer.config.ConfigurationServiceGets configuration service.protected PassengerTypeServiceGets passenger type service.voidsetConfigurationService(de.hybris.platform.servicelayer.config.ConfigurationService configurationService) Sets configuration service.voidsetPassengerTypeService(PassengerTypeService passengerTypeService) Sets passenger type service.voidvalidate(TravellerQuantityListData travellerQuantityListData) Validates if 1) the ptcCodes are unique in the list; 2) the ptcCode of the travellers exists in the system.
-
Constructor Details
-
DefaultTravellerPtcCodeValidationStrategy
public DefaultTravellerPtcCodeValidationStrategy()
-
-
Method Details
-
validate
public void validate(TravellerQuantityListData travellerQuantityListData) throws AddTravellerToCartException Validates if 1) the ptcCodes are unique in the list; 2) the ptcCode of the travellers exists in the system.- Specified by:
validatein interfaceAddTravellerToCartValidationStrategy- Parameters:
travellerQuantityListData- the travellers- Throws:
AddTravellerToCartException
-
getPassengerTypeService
Gets passenger type service.- Returns:
- the passenger type service
-
setPassengerTypeService
Sets passenger type service.- Parameters:
passengerTypeService- the passenger type 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
-