Interface DealBundleTemplateFacade
- All Known Implementing Classes:
DefaultDealBundleTemplateFacade
public interface DealBundleTemplateFacade
DealBundleTemplate Facade interface which provides functionality for the DealBundleTemplates.
-
Method Summary
Modifier and TypeMethodDescriptiongetDealBundleTemplateById(String dealBundleTemplateId) Returns the DealBundleTemplateModel corresponding to the given dealBundleTemplateIdgetDealBundleTemplateIdFromAbstractOrder(AbstractOrderModel abstractOrderModel) Returns the deal bundle template id contained in the given abstract order.getDealValidCronJobExpressionById(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.getFormattedDealValidDates(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 dealBundleTemplateIdgetPackageResponseDetails(PackageRequestData packageRequestData) Performs a search for the DealBundleTemplate based on the PackagesRequestData and the given date.booleanisDealAbstractOrder(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.
-
Method Details
-
getFormattedDealValidDates
Evaluates valid dates in dd/MM/yyyy format for the availability of the deal based on the dealStartingPattern and the given date.- 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
Evaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.- 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
Evaluates valid dates for the availability of the deal based on the dealStartingPattern and the given date.- 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
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.- Parameters:
bundleTemplateModel- the bundleTemplateModeldealDepartureDate- the date to use as a startingDate for the deal requested- Returns:
- the set of valid dates
-
getDealValidDatesFromRange
Set<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.- 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
-
getDealValidDatesFromRange
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.- 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
-
getFormattedDealValidDatesFromRange
Set<String> 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.- 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
-
getDealBundleTemplateById
Returns the DealBundleTemplateModel corresponding to the given dealBundleTemplateId- Parameters:
dealBundleTemplateId- the id of the DealBundleTemplate- Returns:
- the DealBundleTemplateModel corresponding to the given id, null if no DealBundleTemplates are found.
-
getDealValidCronJobExpressionById
Returns the CronJobExpression for the deal availability corresponding to the given dealBundleTemplateId- Parameters:
dealBundleTemplateId- the id of the DealBundleTemplate- Returns:
- the cronJobExpression corresponding to the given id, Empty if no DealBundleTemplates are found.
-
getPackageRequestData
Returns the PackageRequestData populated from the given dealBundleTemplateId- Parameters:
dealBundleTemplateId- the dealBundleTemplateId to use to populate the PackagesResponseDataselectedDepartureDate- the date to use as a selectedDepartureDate for the deal requested- Returns:
- the PackageRequestData
-
getPackageResponseDetails
Performs a search for the DealBundleTemplate based on the PackagesRequestData and the given date.- Parameters:
packageRequestData- the PackageRequestData- Returns:
- the PackageRequestData with the deal bundle template details matching the request parameters and the given starting date
-
isDealBundleTemplateMatchesCart
Checks if the deal bundle template exists in the cart.- Parameters:
dealBundleTemplateId- the deal bundle template id- Returns:
- the boolean
-
isDepartureDateInCartEquals
Checks if is departure date in cart equals.- Parameters:
dealDepartureDate- the deal departure date- Returns:
- true, if is departure date in cart equals
-
isDealAbstractOrder
Checks whether given abstract order contains a deal- Parameters:
abstractOrderModel-- Returns:
-
getDealBundleTemplateIdFromAbstractOrder
Returns the deal bundle template id contained in the given abstract order. It returns an empty string if the abstractOrder doesn't contain any deal.- Parameters:
abstractOrderModel- as the abstract order model- Returns:
- a string corresponding to the deal bundle template id
-