Interface DealBundleTemplateFacade

All Known Implementing Classes:
DefaultDealBundleTemplateFacade

public interface DealBundleTemplateFacade
DealBundleTemplate Facade interface which provides functionality for the DealBundleTemplates.
  • Method Details

    • getFormattedDealValidDates

      List<String> 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.
      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

      List<Date> getDealValidDates(String dealStartingDatePattern, String dealDepartureDate)
      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

      List<Date> getDealValidDates(String dealStartingDatePattern, Date dealDepartureDate)
      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

      Set<Date> getDealValidDates(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.
      Parameters:
      bundleTemplateModel - the bundleTemplateModel
      dealDepartureDate - 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 bundleTemplateModel
      startingDate - the date to use as a startingDate for the deal requested
      endingDate - the date to use as a endingDate for the deal requested
      Returns:
      the list of valid dates
    • getDealValidDatesFromRange

      Set<Date> 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.
      Parameters:
      dealId - the dealId
      startingDate - the date to use as a startingDate for the deal requested
      endingDate - 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 bundleTemplateModel
      startingDate - the date to use as a startingDate for the deal requested
      endingDate - the date to use as a endingDate for the deal requested
      Returns:
      the list of valid dates in the yyyy-MM-dd format
    • getDealBundleTemplateById

      DealBundleTemplateModel getDealBundleTemplateById(String dealBundleTemplateId)
      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

      String getDealValidCronJobExpressionById(String dealBundleTemplateId)
      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

      PackageRequestData getPackageRequestData(String dealBundleTemplateId, String selectedDepartureDate)
      Returns the PackageRequestData populated from the given dealBundleTemplateId
      Parameters:
      dealBundleTemplateId - the dealBundleTemplateId to use to populate the PackagesResponseData
      selectedDepartureDate - the date to use as a selectedDepartureDate for the deal requested
      Returns:
      the PackageRequestData
    • getPackageResponseDetails

      PackagesResponseData getPackageResponseDetails(PackageRequestData packageRequestData)
      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

      boolean isDealBundleTemplateMatchesCart(String dealBundleTemplateId)
      Checks if the deal bundle template exists in the cart.
      Parameters:
      dealBundleTemplateId - the deal bundle template id
      Returns:
      the boolean
    • isDepartureDateInCartEquals

      boolean isDepartureDateInCartEquals(Date dealDepartureDate)
      Checks if is departure date in cart equals.
      Parameters:
      dealDepartureDate - the deal departure date
      Returns:
      true, if is departure date in cart equals
    • isDealAbstractOrder

      boolean isDealAbstractOrder(AbstractOrderModel abstractOrderModel)
      Checks whether given abstract order contains a deal
      Parameters:
      abstractOrderModel -
      Returns:
    • getDealBundleTemplateIdFromAbstractOrder

      String getDealBundleTemplateIdFromAbstractOrder(AbstractOrderModel abstractOrderModel)
      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