Class DefaultB2BReservationFacade

java.lang.Object
de.hybris.platform.travelb2bfacades.reservation.impl.DefaultB2BReservationFacade
All Implemented Interfaces:
B2BReservationFacade

public class DefaultB2BReservationFacade extends Object implements B2BReservationFacade
Default implementation of B2BReservationFacade
  • Constructor Details

    • DefaultB2BReservationFacade

      public DefaultB2BReservationFacade()
  • Method Details

    • findReservations

      @Deprecated public SearchPageData<B2BReservationData> findReservations(SearchStateData searchState, PageableData pageableData, String unitCode, String email, Date fromDate, Date toDate, String costCenterUid, String currency)
      Deprecated.
      Deprecated since version 3.0.
      Description copied from interface: B2BReservationFacade
      Retrieves a certain number of reservation based on the parameter passed in the method. b2bUnitCode is mandatory, everything else can be passed as null
      Specified by:
      findReservations in interface B2BReservationFacade
      Parameters:
      searchState - the search state
      pageableData - the pageableData
      unitCode - the b2b unit code
      email - the email
      fromDate - the from date
      toDate - the to date
      costCenterUid - the cost center
      currency - the currency
      Returns:
    • findReservations

      public SearchPageData<B2BReservationData> findReservations(SearchStateData searchState, PageableData pageableData, List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenterUid, String currency)
      Description copied from interface: B2BReservationFacade
      Retrieves a certain number of reservation based on the parameter passed in the method. b2bUnitCode is mandatory, everything else can be passed as null
      Specified by:
      findReservations in interface B2BReservationFacade
      Parameters:
      searchState - the search state
      pageableData - the pageableData
      unitCodes - the b2b unit code
      email - the email
      fromDate - the from date
      toDate - the to date
      costCenterUid - the cost center
      currency - the currency
      Returns:
      SearchPageData the search results
    • checkDatesInterval

      public boolean checkDatesInterval(Date fromDate, Date toDate)
      Check if fromDate is before toDate.
      Specified by:
      checkDatesInterval in interface B2BReservationFacade
      Parameters:
      fromDate - the date to compare
      toDate - the date to be compared with
      Returns:
      true if fromDate is before toDate, false otherwise.
    • setSorts

      protected void setSorts(SearchPageData<OrderModel> searchPageData, List<String> sortCodes)
      Sets the sorting parameters in the searchPageData.
      Parameters:
      searchPageData - the searchPage
      sortCodes - the sort codes
    • convertSearchPageData

      protected SearchPageData<B2BReservationData> convertSearchPageData(SearchPageData<OrderModel> searchPageModelData)
      Convert search page data search page data.
      Parameters:
      searchPageModelData - the search page model
      Returns:
      searchPageData This method converts the list of orderModels in B2BReservationData
    • getDefaultUnit

      public String getDefaultUnit()
      Description copied from interface: B2BReservationFacade
      retrieves the default unit for the current user
      Specified by:
      getDefaultUnit in interface B2BReservationFacade
      Returns:
      the default unit
    • validateUnit

      public boolean validateUnit(String unitCode)
      Description copied from interface: B2BReservationFacade
      Validate unit boolean.
      Specified by:
      validateUnit in interface B2BReservationFacade
      Parameters:
      unitCode - the unit code validates a certain unit against the current user to make sure he can access the related informations
      Returns:
      the boolean
    • findTotal

      @Deprecated public PriceData findTotal(String unitCode, String email, Date fromDate, Date toDate, String costCenter, String currencyIso)
      Deprecated.
      Deprecated since version 3.0.
      Description copied from interface: B2BReservationFacade
      Returns the total price for all the bookings matching the search parameters. unitId is mandatory, everything else can be passed as null
      Specified by:
      findTotal in interface B2BReservationFacade
      Parameters:
      unitCode - the b2b unit code
      email - the email
      fromDate - the from date
      toDate - the to date
      costCenter -
      currencyIso - the currency iso code
      Returns:
    • findTotal

      public PriceData findTotal(List<String> unitCodes, String email, Date fromDate, Date toDate, String costCenter, String currencyIso)
      Description copied from interface: B2BReservationFacade
      Returns the total price for all the bookings matching the search parameters. unitId is mandatory, everything else can be passed as null
      Specified by:
      findTotal in interface B2BReservationFacade
      Parameters:
      unitCodes - the b2b unit code
      email - the email
      fromDate - the from date
      toDate - the to date
      costCenter - the cost center
      currencyIso - the currency iso code
      Returns:
      SearchPageData the search results
    • getPriceDataFactory

      @Deprecated protected de.hybris.platform.commercefacades.product.PriceDataFactory getPriceDataFactory()
      Deprecated.
      Deprecated since version 3.0.
      Gets price data factory.
      Returns:
      price data factory
    • setPriceDataFactory

      @Deprecated public void setPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory)
      Deprecated.
      Deprecated since version 3.0.
      Sets price data factory.
      Parameters:
      priceDataFactory - the price data factory
    • getTravelb2bOrderService

      protected TravelB2BOrderService getTravelb2bOrderService()
      Gets travelb 2 b order service.
      Returns:
      the travelb 2 b order service
    • setTravelb2bOrderService

      public void setTravelb2bOrderService(TravelB2BOrderService travelb2bOrderService)
      Sets travelb 2 b order service.
      Parameters:
      travelb2bOrderService - the travelb 2 b order service
    • getUserService

      protected de.hybris.platform.servicelayer.user.UserService getUserService()
      Gets user service.
      Returns:
      the user service
    • setUserService

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
      Sets user service.
      Parameters:
      userService - the user service
    • getB2bReservationPipelineManager

      protected B2BReservationPipelineManager getB2bReservationPipelineManager()
      Gets b 2 b reservation pipeline manager.
      Returns:
      the b 2 b reservation pipeline manager
    • setB2bReservationPipelineManager

      public void setB2bReservationPipelineManager(B2BReservationPipelineManager b2bReservationPipelineManager)
      Sets b 2 b reservation pipeline manager.
      Parameters:
      b2bReservationPipelineManager - the b 2 b reservation pipeline manager
    • getTravelCommercePriceFacade

      protected TravelCommercePriceFacade getTravelCommercePriceFacade()
      Gets travel commerce price facade.
      Returns:
      the travelCommercePriceFacade
    • setTravelCommercePriceFacade

      public void setTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade)
      Sets travel commerce price facade.
      Parameters:
      travelCommercePriceFacade - the travelCommercePriceFacade to set