Class DefaultDealBundleTemplateFacade
java.lang.Object
de.hybris.platform.travelfacades.facades.packages.impl.DefaultDealBundleTemplateFacade
- All Implemented Interfaces:
DealBundleTemplateFacade
Default implementation of the
DealBundleTemplateFacade-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<PassengerTypeQuantityData>createPassengerTypeQuantities(BundleTemplateModel bundleTemplateModel) Returns the list of PassengerTypeQuantityData created from the given GuestCountModel listprotected AccommodationAvailabilityRequestDatagetAccommodationAvailabilityRequest(AccommodationBundleTemplateModel accommodationBundleTemplateModel, Date departureDate, Date returnDate) Returns the AccommodationAvailabilityRequestData created from the given accommodationBundleTemplateModelprotected AccommodationPackageRequestDatagetAccommodationPackageRequest(DealBundleTemplateModel dealBundleTemplateModel, Date departureDate, Date returnDate) Returns the AccommodationPackageRequest created for the given dealBundleTemplateprotected BundleTemplateModelGets bundle template from entry group.protected List<BundleTemplateData>getBundleTemplates(DealBundleTemplateModel dealBundleTemplateModel) Returns the list of BundleTemplateData created for the given dealBundleTemplateprotected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateServiceprotected de.hybris.platform.order.CartServicegetDealBundleDates(DealBundleTemplateModel bundleTemplateModel, Date dealStartDate, Date dealEndDate) Get all the available deal date within the given range taking care of startingDatePattern and availabilityDatesgetDealBundleTemplateById(String dealBundleTemplateId) Returns the DealBundleTemplateModel corresponding to the given dealBundleTemplateIdprotected de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel,BundleTemplateData> getDealBundleTemplateIdFromAbstractOrder(AbstractOrderModel abstractOrderModel) Returns the deal bundle template id contained in the given abstract order.protected DealBundleTemplateServiceprotected de.hybris.platform.servicelayer.dto.converter.Converter<RouteBundleTemplateModel,DealOriginDestinationInfoData> Gets deal origin destination info data converter.protected DealSearchResponsePipelineManagerprotected DealServiceGet dealServicegetDealValidCronJobExpressionById(String dealBundleTemplateId) Returns the CronJobExpression for the deal availability corresponding to the given dealBundleTemplateIdgetDealValidDates(DealBundleTemplateModel bundleTemplateModel, Date dealDepartureDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.getDealValidDates(String dealStartingDatePattern, String dealDepartureDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.getDealValidDates(String dealStartingDatePattern, Date dealDepartureDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.getDealValidDatesFromRange(DealBundleTemplateModel bundleTemplateModel, String startingDate, String endingDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.getDealValidDatesFromRange(String dealId, Date startingDate, Date endingDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.protected FareSearchRequestDatagetFareSearchRequest(BundleTemplateModel transportBundleTemplateModel, Date departureDate, Date returnDate) Returns the FareSearchRequestData created from the given transportBundleTemplateModelprotected DategetFirstDealDate(DealBundleTemplateModel dealBundleTemplateModel) Returns the first date from the current date that matches the startingDate pattern and availability dates for the given packageIdgetFormattedDealValidDates(String dealStartingDatePattern, String dealDepartureDate) Evaluates valid dates in dd/MM/yyyy format for the availability of the deal based on the dealStartingPattern and the given date.getFormattedDealValidDatesFromRange(DealBundleTemplateModel bundleTemplateModel, String startingDate, String endingDate) Evaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.getPackageRequestData(String dealBundleTemplateId, String selectedDepartureDate) Returns the PackageRequestData populated from the given dealBundleTemplateIdprotected PackageRequestDatagetPackageRequestData(String dealBundleTemplateId, Date departureDate) Deprecated.getPackageResponseDetails(PackageRequestData packageRequestData) Performs a search for the DealBundleTemplate based on the PackagesRequestData and the given date.protected de.hybris.platform.servicelayer.dto.converter.Converter<PassengerTypeModel,PassengerTypeData> protected de.hybris.platform.servicelayer.time.TimeServiceprotected TransportPackageRequestDatagetTransportPackageRequest(DealBundleTemplateModel dealBundleTemplateModel, Date departureDate, Date returnDate) Returns the TransportPackageRequest created for the given dealBundleTemplatebooleanisDealAbstractOrder(AbstractOrderModel abstractOrderModel) Checks whether given abstract order contains a dealbooleanisDealBundleTemplateMatchesCart(String dealBundleTemplateId) Checks if the deal bundle template exists in the cart.booleanisDepartureDateInCartEquals(Date dealDepartureDate) Checks if is departure date in cart equals.voidsetBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) voidsetCartService(de.hybris.platform.order.CartService cartService) voidsetDealBundleTemplateConverter(de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel, BundleTemplateData> dealBundleTemplateConverter) voidsetDealBundleTemplateService(DealBundleTemplateService dealBundleTemplateService) voidsetDealOriginDestinationInfoDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<RouteBundleTemplateModel, DealOriginDestinationInfoData> dealOriginDestinationInfoDataConverter) Sets deal origin destination info data converter.voidsetDealSearchResponsePipelineManager(DealSearchResponsePipelineManager dealSearchResponsePipelineManager) voidsetDealService(DealService dealService) Set dealServicevoidsetPassengerTypeConverter(de.hybris.platform.servicelayer.dto.converter.Converter<PassengerTypeModel, PassengerTypeData> passengerTypeConverter) voidsetTimeService(de.hybris.platform.servicelayer.time.TimeService timeService)
-
Constructor Details
-
DefaultDealBundleTemplateFacade
public DefaultDealBundleTemplateFacade()
-
-
Method Details
-
getFormattedDealValidDates
public List<String> getFormattedDealValidDates(String dealStartingDatePattern, String dealDepartureDate) Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates in dd/MM/yyyy format for the availability of the deal based on the dealStartingPattern and the given date.- Specified by:
getFormattedDealValidDatesin interfaceDealBundleTemplateFacade- Parameters:
dealStartingDatePattern- cronJob expression representing the valid dates for deal.dealDepartureDate- the date to use as a startingDate for the deal requested- Returns:
- the list of valid dates
-
getDealValidDates
Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.- Specified by:
getDealValidDatesin interfaceDealBundleTemplateFacade- Parameters:
dealStartingDatePattern- cronJob expression representing the valid dates for deal.dealDepartureDate- the date to use as a startingDate for the deal requested- Returns:
- the list of valid dates
-
getDealValidDates
Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.- Specified by:
getDealValidDatesin interfaceDealBundleTemplateFacade- Parameters:
dealStartingDatePattern- cronJob expression representing the valid dates for deal.dealDepartureDate- the date to use as a startingDate for the deal requested- Returns:
- the list of valid dates
-
getDealValidDates
public Set<Date> getDealValidDates(DealBundleTemplateModel bundleTemplateModel, Date dealDepartureDate) Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.- Specified by:
getDealValidDatesin interfaceDealBundleTemplateFacade- Parameters:
bundleTemplateModel- the bundleTemplateModeldealDepartureDate- the date to use as a startingDate for the deal requested- Returns:
- the set of valid dates
-
getDealValidDatesFromRange
Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.- Specified by:
getDealValidDatesFromRangein interfaceDealBundleTemplateFacade- Parameters:
dealId- the dealIdstartingDate- the date to use as a startingDate for the deal requestedendingDate- the date to use as a endingDate for the deal requested- Returns:
- the list of valid dates
-
getDealValidDatesFromRange
public Set<Date> getDealValidDatesFromRange(DealBundleTemplateModel bundleTemplateModel, String startingDate, String endingDate) Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.- Specified by:
getDealValidDatesFromRangein interfaceDealBundleTemplateFacade- Parameters:
bundleTemplateModel- the bundleTemplateModelstartingDate- the date to use as a startingDate for the deal requestedendingDate- the date to use as a endingDate for the deal requested- Returns:
- the list of valid dates
-
getDealBundleDates
protected Set<Date> getDealBundleDates(DealBundleTemplateModel bundleTemplateModel, Date dealStartDate, Date dealEndDate) Get all the available deal date within the given range taking care of startingDatePattern and availabilityDates- Parameters:
bundleTemplateModel- the bundleTemplateModeldealStartDate- the dealStartDatedealEndDate- the dealEndDate- Returns:
- Set
-
getFormattedDealValidDatesFromRange
public Set<String> getFormattedDealValidDatesFromRange(DealBundleTemplateModel bundleTemplateModel, String startingDate, String endingDate) Description copied from interface:DealBundleTemplateFacadeEvaluates valid dates for the availability of the deal based on the dealStartingPattern, availabilityDates and the given date range in the yyyy-MM-dd format.- Specified by:
getFormattedDealValidDatesFromRangein interfaceDealBundleTemplateFacade- Parameters:
bundleTemplateModel- the bundleTemplateModelstartingDate- the date to use as a startingDate for the deal requestedendingDate- the date to use as a endingDate for the deal requested- Returns:
- the list of valid dates in the yyyy-MM-dd format
-
getPackageRequestData
public PackageRequestData getPackageRequestData(String dealBundleTemplateId, String selectedDepartureDate) Description copied from interface:DealBundleTemplateFacadeReturns the PackageRequestData populated from the given dealBundleTemplateId- Specified by:
getPackageRequestDatain interfaceDealBundleTemplateFacade- Parameters:
dealBundleTemplateId- the dealBundleTemplateId to use to populate the PackagesResponseDataselectedDepartureDate- the date to use as a selectedDepartureDate for the deal requested- Returns:
- the PackageRequestData
-
getPackageRequestData
@Deprecated protected PackageRequestData getPackageRequestData(String dealBundleTemplateId, Date departureDate) Deprecated.since version 2003
the logic was moved to pipeline manager to be configurable for different search flows
useDealSearchRequestPipelineManager.executePipeline(DealBundleTemplateModel, Date)instead.Builds package request data for the given deal id and departure date- Parameters:
dealBundleTemplateId- the deal bundle template iddepartureDate- the departure date- Returns:
- the PackageRequestData
-
getDealBundleTemplateById
Description copied from interface:DealBundleTemplateFacadeReturns the DealBundleTemplateModel corresponding to the given dealBundleTemplateId- Specified by:
getDealBundleTemplateByIdin interfaceDealBundleTemplateFacade- Parameters:
dealBundleTemplateId- the id of the DealBundleTemplate- Returns:
- the DealBundleTemplateModel corresponding to the given id, null if no DealBundleTemplates are found.
-
getDealValidCronJobExpressionById
Description copied from interface:DealBundleTemplateFacadeReturns the CronJobExpression for the deal availability corresponding to the given dealBundleTemplateId- Specified by:
getDealValidCronJobExpressionByIdin interfaceDealBundleTemplateFacade- Parameters:
dealBundleTemplateId- the id of the DealBundleTemplate- Returns:
- the cronJobExpression corresponding to the given id, Empty if no DealBundleTemplates are found.
-
getTransportPackageRequest
protected TransportPackageRequestData getTransportPackageRequest(DealBundleTemplateModel dealBundleTemplateModel, Date departureDate, Date returnDate) Returns the TransportPackageRequest created for the given dealBundleTemplate- Parameters:
dealBundleTemplateModel- the dealBundleTemplateModeldepartureDate- the departureDatereturnDate- the returnDate- Returns:
- the TransportPackageRequestData
-
getFareSearchRequest
protected FareSearchRequestData getFareSearchRequest(BundleTemplateModel transportBundleTemplateModel, Date departureDate, Date returnDate) Returns the FareSearchRequestData created from the given transportBundleTemplateModel- Parameters:
transportBundleTemplateModel- the transportBundleTemplateModeldepartureDate- the departureDatereturnDate- the returnDate- Returns:
- the FareSearchRequestData
-
createPassengerTypeQuantities
protected List<PassengerTypeQuantityData> createPassengerTypeQuantities(BundleTemplateModel bundleTemplateModel) Returns the list of PassengerTypeQuantityData created from the given GuestCountModel list- Parameters:
bundleTemplateModel- the list of GuestCountModel- Returns:
- List
-
getAccommodationPackageRequest
protected AccommodationPackageRequestData getAccommodationPackageRequest(DealBundleTemplateModel dealBundleTemplateModel, Date departureDate, Date returnDate) Returns the AccommodationPackageRequest created for the given dealBundleTemplate- Parameters:
dealBundleTemplateModel- the dealBundleTemplateModeldepartureDate- the departureDatereturnDate- the returnDate- Returns:
- the AccommodationPackageRequest
-
getAccommodationAvailabilityRequest
protected AccommodationAvailabilityRequestData getAccommodationAvailabilityRequest(AccommodationBundleTemplateModel accommodationBundleTemplateModel, Date departureDate, Date returnDate) Returns the AccommodationAvailabilityRequestData created from the given accommodationBundleTemplateModel- Parameters:
accommodationBundleTemplateModel- the accommodationBundleTemplateModeldepartureDate- the departureDatereturnDate- the returnDate- Returns:
- the AccommodationAvailabilityRequestData
-
getBundleTemplates
protected List<BundleTemplateData> getBundleTemplates(DealBundleTemplateModel dealBundleTemplateModel) Returns the list of BundleTemplateData created for the given dealBundleTemplate- Parameters:
dealBundleTemplateModel- the dealBundleTemplateModel- Returns:
- the list of BundleTemplateData
-
getFirstDealDate
Returns the first date from the current date that matches the startingDate pattern and availability dates for the given packageId- Parameters:
dealBundleTemplateModel- the dealBundleTemplateModel- Returns:
- the first date from the current date that matches the startingDate pattern for the given packageId
-
getPackageResponseDetails
Description copied from interface:DealBundleTemplateFacadePerforms a search for the DealBundleTemplate based on the PackagesRequestData and the given date.- Specified by:
getPackageResponseDetailsin interfaceDealBundleTemplateFacade- Parameters:
packageRequestData- the PackageRequestData- Returns:
- the PackageRequestData with the deal bundle template details matching the request parameters and the given starting date
-
isDealBundleTemplateMatchesCart
Description copied from interface:DealBundleTemplateFacadeChecks if the deal bundle template exists in the cart.- Specified by:
isDealBundleTemplateMatchesCartin interfaceDealBundleTemplateFacade- Parameters:
dealBundleTemplateId- the deal bundle template id- Returns:
- the boolean
-
isDepartureDateInCartEquals
Description copied from interface:DealBundleTemplateFacadeChecks if is departure date in cart equals.- Specified by:
isDepartureDateInCartEqualsin interfaceDealBundleTemplateFacade- Parameters:
dealDepartureDate- the deal departure date- Returns:
- true, if is departure date in cart equals
-
isDealAbstractOrder
Description copied from interface:DealBundleTemplateFacadeChecks whether given abstract order contains a deal- Specified by:
isDealAbstractOrderin interfaceDealBundleTemplateFacade- Returns:
-
getDealBundleTemplateIdFromAbstractOrder
Description copied from interface:DealBundleTemplateFacadeReturns the deal bundle template id contained in the given abstract order. It returns an empty string if the abstractOrder doesn't contain any deal.- Specified by:
getDealBundleTemplateIdFromAbstractOrderin interfaceDealBundleTemplateFacade- Parameters:
abstractOrderModel- as the abstract order model- Returns:
- a string corresponding to the deal bundle template id
-
getBundleTemplateFromEntryGroup
Gets bundle template from entry group.- Parameters:
entryModel- the entry model- Returns:
- the bundle template from entry group
-
getDealBundleTemplateService
- Returns:
- the dealBundleTemplateService
-
setDealBundleTemplateService
- Parameters:
dealBundleTemplateService- the dealBundleTemplateService to set
-
getPassengerTypeConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<PassengerTypeModel,PassengerTypeData> getPassengerTypeConverter()- Returns:
- the passengerTypeConverter
-
setPassengerTypeConverter
public void setPassengerTypeConverter(de.hybris.platform.servicelayer.dto.converter.Converter<PassengerTypeModel, PassengerTypeData> passengerTypeConverter) - Parameters:
passengerTypeConverter- the passengerTypeConverter to set
-
getDealBundleTemplateConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel,BundleTemplateData> getDealBundleTemplateConverter()- Returns:
- the dealBundleTemplateConverter
-
setDealBundleTemplateConverter
public void setDealBundleTemplateConverter(de.hybris.platform.servicelayer.dto.converter.Converter<BundleTemplateModel, BundleTemplateData> dealBundleTemplateConverter) - Parameters:
dealBundleTemplateConverter- the dealBundleTemplateConverter to set
-
getDealOriginDestinationInfoDataConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<RouteBundleTemplateModel,DealOriginDestinationInfoData> getDealOriginDestinationInfoDataConverter()Gets deal origin destination info data converter.- Returns:
- the deal origin destination info data converter
-
setDealOriginDestinationInfoDataConverter
public void setDealOriginDestinationInfoDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<RouteBundleTemplateModel, DealOriginDestinationInfoData> dealOriginDestinationInfoDataConverter) Sets deal origin destination info data converter.- Parameters:
dealOriginDestinationInfoDataConverter- the deal origin destination info data converter
-
getTimeService
protected de.hybris.platform.servicelayer.time.TimeService getTimeService()- Returns:
- the timeService
-
setTimeService
public void setTimeService(de.hybris.platform.servicelayer.time.TimeService timeService) - Parameters:
timeService- the timeService to set
-
getDealSearchResponsePipelineManager
- Returns:
- the dealSearchResponsePipelineManager
-
setDealSearchResponsePipelineManager
public void setDealSearchResponsePipelineManager(DealSearchResponsePipelineManager dealSearchResponsePipelineManager) - Parameters:
dealSearchResponsePipelineManager- the dealSearchResponsePipelineManager to set
-
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
-
getBundleTemplateService
protected de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService getBundleTemplateService()- Returns:
- the bundleTemplateService
-
setBundleTemplateService
public void setBundleTemplateService(de.hybris.platform.configurablebundleservices.bundle.BundleTemplateService bundleTemplateService) - Parameters:
bundleTemplateService- the bundleTemplateService to set
-
getDealService
Get dealService- Returns:
- dealService
-
setDealService
Set dealService- Parameters:
dealService- the dealService
-
the logic was moved to pipeline manager to be configurable for different search flows
use
DealSearchRequestPipelineManager.executePipeline(DealBundleTemplateModel, Date)instead.