Class TransportOfferingsTimesValidationStrategy
java.lang.Object
de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy
de.hybris.platform.travelfacades.strategies.impl.TransportOfferingsTimesValidationStrategy
- All Implemented Interfaces:
AddBundleToCartValidationStrategy
public class TransportOfferingsTimesValidationStrategy
extends AbstractAddBundleToCartValidationStrategy
Strategy that extends the
AbstractAddBundleToCartValidationStrategy. The strategy is used to validate the
addBundleToCart, that will be valid only if the departure time of the first transport offerings specified in the
AddBundleToCartRequestData is after the arrival time of the last transport offering of the previous leg of
the journey and its arrival time is after the departure time of the first transport offering of the next leg of the journey.-
Field Summary
FieldsFields inherited from class de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy
ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_SESSION_CART -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected de.hybris.platform.order.CartServiceprotected TransportOfferingServiceprotected ZonedDateTimegetUTCDepartureTime(TransportOfferingModel transportOfferingModel) Return the UTC departure time for the given transportOfferingvoidsetCartService(de.hybris.platform.order.CartService cartService) voidsetTransportOfferingService(TransportOfferingService transportOfferingService) validate(AddBundleToCartRequestData addBundleToCartRequestData) Validates the add bundle to cartMethods inherited from class de.hybris.platform.travelfacades.strategies.AbstractAddBundleToCartValidationStrategy
createAddToCartResponse
-
Field Details
-
ADD_BUNDLE_TO_CART_VALIDATION_ERROR_DEPARTURE_ARRIVAL
- See Also:
-
ADD_BUNDLE_TO_CART_VALIDATION_ERROR_NO_ODREFNUMBER
- See Also:
-
-
Constructor Details
-
TransportOfferingsTimesValidationStrategy
public TransportOfferingsTimesValidationStrategy()
-
-
Method Details
-
validate
Description copied from interface:AddBundleToCartValidationStrategyValidates the add bundle to cart- Parameters:
addBundleToCartRequestData- as the add bundle to cart request data- Returns:
- the add to cart response data
-
getUTCDepartureTime
Return the UTC departure time for the given transportOffering- Parameters:
transportOfferingModel- as the tranportOffering- Returns:
- the zoned date time
-
getCartService
protected de.hybris.platform.order.CartService getCartService()- Returns:
- the cartService
-
setCartService
public void setCartService(de.hybris.platform.order.CartService cartService) - Parameters:
cartService- the cartService to set
-
getTransportOfferingService
- Returns:
- the transportOfferingService
-
setTransportOfferingService
- Parameters:
transportOfferingService- the transportOfferingService to set
-