Class DefaultBookingListFacade

java.lang.Object
de.hybris.platform.travelfacades.facades.impl.DefaultBookingListFacade
All Implemented Interfaces:
BookingListFacade

public class DefaultBookingListFacade extends Object implements BookingListFacade
Implementation class for bookings in My Account -> My Booking
  • Constructor Details

    • DefaultBookingListFacade

      public DefaultBookingListFacade()
  • Method Details

    • getCurrentCustomerBookings

      public List<ReservationData> getCurrentCustomerBookings()
      Description copied from interface: BookingListFacade
      Returns a list of reservation data which corresponds to all the bookings of the current customer in session
      Specified by:
      getCurrentCustomerBookings in interface BookingListFacade
      Returns:
      list of current customer's bookings
    • getCurrentCustomerAccommodationBookings

      public List<AccommodationReservationData> getCurrentCustomerAccommodationBookings()
      Description copied from interface: BookingListFacade
      Returns a list of accommodation reservation data which corresponds to all accommodation bookings of the current customer in session
      Specified by:
      getCurrentCustomerAccommodationBookings in interface BookingListFacade
      Returns:
      list of current customer's bookings
    • getVisibleCurrentCustomerAccommodationBookings

      public List<AccommodationReservationData> getVisibleCurrentCustomerAccommodationBookings()
      Description copied from interface: BookingListFacade
      Returns only the accommodation bookings visible to the current user
      Specified by:
      getVisibleCurrentCustomerAccommodationBookings in interface BookingListFacade
      Returns:
      list of visible current customer accommodation bookings
    • getCurrentCustomerTravelBookings

      public List<GlobalTravelReservationData> getCurrentCustomerTravelBookings()
      Description copied from interface: BookingListFacade
      Returns a list of global travel reservation data which corresponds to all travel bookings of the current customer in session
      Specified by:
      getCurrentCustomerTravelBookings in interface BookingListFacade
      Returns:
      list of current customer's bookings
    • getCurrentCustomerTravelBookings

      public SearchPageData<GlobalTravelReservationData> getCurrentCustomerTravelBookings(SearchPageData searchPageData, boolean activeOnly)
      Description copied from interface: BookingListFacade
      Returns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in session
      Specified by:
      getCurrentCustomerTravelBookings in interface BookingListFacade
      Parameters:
      searchPageData - the searchPageData contains requested pagination and sorting information
      activeOnly - when true only the active booking will be returned
      Returns:
      list of current customer's bookings
    • getGlobalTravelReservationData

      protected List<GlobalTravelReservationData> getGlobalTravelReservationData(List<OrderModel> orders)
      Fetches all reservation data for specific orders
      Parameters:
      orders - list of orders
      Returns:
      sorted reservation data list
    • getVisibleCurrentCustomerTravelBookings

      public List<GlobalTravelReservationData> getVisibleCurrentCustomerTravelBookings()
      Description copied from interface: BookingListFacade
      Returns only the bookings visible to the current user
      Specified by:
      getVisibleCurrentCustomerTravelBookings in interface BookingListFacade
      Returns:
      list of visible current customer travel bookings
    • getCustomerOrders

      protected List<OrderModel> getCustomerOrders()
    • getCustomerOrders

      protected SearchPageData<OrderModel> getCustomerOrders(SearchPageData searchPageData, OrderStatus... statuses)
      Fetches all bookings for the current customer with pagination and filtering by OrderStatus
      Parameters:
      searchPageData - the searchPageData contains requested pagination and sorting information
      statuses - one or more OrderStatuses to include in the result
      Returns:
      the searchPageData contains requested pagination and sorting information with list of orders
    • sortBookings

      protected List<ReservationData> sortBookings(List<ReservationData> myBookings)
      Sorts users booking by departure time ascending and puts active bookings first
      Parameters:
      myBookings -
      Returns:
      sorted bookings list
    • getReservationDepartureTime

      protected ZonedDateTime getReservationDepartureTime(ReservationData reservationData)
      Returns the zonedDateTime corresponding to the departureTime of the first transportOffering of the given reservationData.
      Parameters:
      reservationData - as the reservation data
      Returns:
      the zoned date time
    • sortAccommodationBookings

      protected List<AccommodationReservationData> sortAccommodationBookings(List<AccommodationReservationData> myBookings)
      Sorts users booking by departure time ascending
      Parameters:
      myBookings -
      Returns:
      sorted bookings list
    • sortTravelBookings

      protected List<GlobalTravelReservationData> sortTravelBookings(List<GlobalTravelReservationData> myBookings)
      Sorts users booking by departure time ascending
      Parameters:
      myBookings -
      Returns:
      sorted bookings list
    • getDateForComparison

      protected Date getDateForComparison(GlobalTravelReservationData globalTravelReservationData)
      Provides date which is to be used for Sorting bookings for Travel.
      Parameters:
      globalTravelReservationData -
      Returns:
      date
    • getOrderNumberForComparison

      protected String getOrderNumberForComparison(GlobalTravelReservationData globalTravelReservationData)
    • getOrderStatusValue

      protected Integer getOrderStatusValue(String orderStatusCode)
    • getCurrentCustomerTravelBookingList

      public SearchPageData<GlobalTravelReservationData> getCurrentCustomerTravelBookingList(SearchPageData searchPageData, boolean activeOnly)
      Description copied from interface: BookingListFacade
      Returns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in session
      Specified by:
      getCurrentCustomerTravelBookingList in interface BookingListFacade
      Parameters:
      searchPageData - the searchPageData contains requested pagination and sorting information
      activeOnly - when true only the active booking will be returned
      Returns:
      list of current customer's bookings
    • getAccommodationRoomNameMapping

      public Map<String,Map<String,Integer>> getAccommodationRoomNameMapping(List<AccommodationReservationData> accommodationReservationDataList)
      Description copied from interface: BookingListFacade
      Gets accommodation room name mapping.
      Specified by:
      getAccommodationRoomNameMapping in interface BookingListFacade
      Parameters:
      accommodationReservationDataList - the accommodation reservation datas
      Returns:
      the accommodation room name mapping
    • getBaseGlobalTravelReservationData

      protected List<GlobalTravelReservationData> getBaseGlobalTravelReservationData(List<OrderModel> orders)
      Fetches all reservation data for specific orders
      Parameters:
      orders - list of orders
      Returns:
      sorted reservation data list
    • getOrderStatusValueMap

      protected Map<String,Integer> getOrderStatusValueMap()
      Returns:
      the orderStatusValueMap
    • setOrderStatusValueMap

      public void setOrderStatusValueMap(Map<String,Integer> orderStatusValueMap)
      Parameters:
      orderStatusValueMap - the orderStatusValueMap to set
    • getTransportBookingListPipelineManager

      protected ReservationPipelineManager getTransportBookingListPipelineManager()
      Returns:
      the transportBookingListPipelineManager
    • setTransportBookingListPipelineManager

      public void setTransportBookingListPipelineManager(ReservationPipelineManager transportBookingListPipelineManager)
      Parameters:
      transportBookingListPipelineManager - the transportBookingListPipelineManager to set
    • getAccommodationBookingListPipelineManager

      protected AccommodationReservationPipelineManager getAccommodationBookingListPipelineManager()
      Returns:
      the accommodationBookingListPipelineManager
    • setAccommodationBookingListPipelineManager

      public void setAccommodationBookingListPipelineManager(AccommodationReservationPipelineManager accommodationBookingListPipelineManager)
      Parameters:
      accommodationBookingListPipelineManager - the accommodationBookingListPipelineManager to set
    • getTravelBookingListPipelineManager

      protected GlobalTravelReservationPipelineManager getTravelBookingListPipelineManager()
      Returns:
      the travelBookingListPipelineManager
    • setTravelBookingListPipelineManager

      public void setTravelBookingListPipelineManager(GlobalTravelReservationPipelineManager travelBookingListPipelineManager)
      Parameters:
      travelBookingListPipelineManager - the travelBookingListPipelineManager to set
    • getUserService

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

      public void setUserService(de.hybris.platform.servicelayer.user.UserService userService)
      Parameters:
      userService - the userService to set
    • getBaseStoreService

      protected de.hybris.platform.store.services.BaseStoreService getBaseStoreService()
      Returns:
      the baseStoreService
    • setBaseStoreService

      public void setBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService)
      Parameters:
      baseStoreService - the baseStoreService to set
    • getCustomerAccountService

      protected TravelCustomerAccountService getCustomerAccountService()
      Returns:
      the customerAccountService
    • setCustomerAccountService

      public void setCustomerAccountService(TravelCustomerAccountService customerAccountService)
      Parameters:
      customerAccountService - the customerAccountService to set
    • getGlobalTravelBookingListPipelineManager

      protected GlobalTravelReservationPipelineManager getGlobalTravelBookingListPipelineManager()
      Gets global travel booking list pipeline manager.
      Returns:
      the global travel booking list pipeline manager
    • setGlobalTravelBookingListPipelineManager

      public void setGlobalTravelBookingListPipelineManager(GlobalTravelReservationPipelineManager globalTravelBookingListPipelineManager)
      Sets global travel booking list pipeline manager.
      Parameters:
      globalTravelBookingListPipelineManager - the global travel booking list pipeline manager