Class DefaultBookingListFacade
java.lang.Object
de.hybris.platform.travelfacades.facades.impl.DefaultBookingListFacade
- All Implemented Interfaces:
BookingListFacade
Implementation class for bookings in My Account -> My Booking
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AccommodationReservationPipelineManagergetAccommodationRoomNameMapping(List<AccommodationReservationData> accommodationReservationDataList) Gets accommodation room name mapping.protected List<GlobalTravelReservationData>Fetches all reservation data for specific ordersprotected de.hybris.platform.store.services.BaseStoreServiceReturns a list of accommodation reservation data which corresponds to all accommodation bookings of the current customer in sessionReturns a list of reservation data which corresponds to all the bookings of the current customer in sessiongetCurrentCustomerTravelBookingList(SearchPageData searchPageData, boolean activeOnly) Returns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in sessionReturns a list of global travel reservation data which corresponds to all travel bookings of the current customer in sessiongetCurrentCustomerTravelBookings(SearchPageData searchPageData, boolean activeOnly) Returns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in sessionprotected TravelCustomerAccountServiceprotected List<OrderModel>protected SearchPageData<OrderModel>getCustomerOrders(SearchPageData searchPageData, OrderStatus... statuses) Fetches all bookings for the current customer with pagination and filtering by OrderStatusprotected DategetDateForComparison(GlobalTravelReservationData globalTravelReservationData) Provides date which is to be used for Sorting bookings for Travel.protected GlobalTravelReservationPipelineManagerGets global travel booking list pipeline manager.protected List<GlobalTravelReservationData>getGlobalTravelReservationData(List<OrderModel> orders) Fetches all reservation data for specific ordersprotected StringgetOrderNumberForComparison(GlobalTravelReservationData globalTravelReservationData) protected IntegergetOrderStatusValue(String orderStatusCode) protected ZonedDateTimegetReservationDepartureTime(ReservationData reservationData) Returns the zonedDateTime corresponding to the departureTime of the first transportOffering of the given reservationData.protected ReservationPipelineManagerprotected GlobalTravelReservationPipelineManagerprotected de.hybris.platform.servicelayer.user.UserServiceReturns only the accommodation bookings visible to the current userReturns only the bookings visible to the current uservoidsetAccommodationBookingListPipelineManager(AccommodationReservationPipelineManager accommodationBookingListPipelineManager) voidsetBaseStoreService(de.hybris.platform.store.services.BaseStoreService baseStoreService) voidsetCustomerAccountService(TravelCustomerAccountService customerAccountService) voidsetGlobalTravelBookingListPipelineManager(GlobalTravelReservationPipelineManager globalTravelBookingListPipelineManager) Sets global travel booking list pipeline manager.voidsetOrderStatusValueMap(Map<String, Integer> orderStatusValueMap) voidsetTransportBookingListPipelineManager(ReservationPipelineManager transportBookingListPipelineManager) voidsetTravelBookingListPipelineManager(GlobalTravelReservationPipelineManager travelBookingListPipelineManager) voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService) protected List<AccommodationReservationData>sortAccommodationBookings(List<AccommodationReservationData> myBookings) Sorts users booking by departure time ascendingprotected List<ReservationData>sortBookings(List<ReservationData> myBookings) Sorts users booking by departure time ascending and puts active bookings firstprotected List<GlobalTravelReservationData>sortTravelBookings(List<GlobalTravelReservationData> myBookings) Sorts users booking by departure time ascending
-
Constructor Details
-
DefaultBookingListFacade
public DefaultBookingListFacade()
-
-
Method Details
-
getCurrentCustomerBookings
Description copied from interface:BookingListFacadeReturns a list of reservation data which corresponds to all the bookings of the current customer in session- Specified by:
getCurrentCustomerBookingsin interfaceBookingListFacade- Returns:
- list of current customer's bookings
-
getCurrentCustomerAccommodationBookings
Description copied from interface:BookingListFacadeReturns a list of accommodation reservation data which corresponds to all accommodation bookings of the current customer in session- Specified by:
getCurrentCustomerAccommodationBookingsin interfaceBookingListFacade- Returns:
- list of current customer's bookings
-
getVisibleCurrentCustomerAccommodationBookings
Description copied from interface:BookingListFacadeReturns only the accommodation bookings visible to the current user- Specified by:
getVisibleCurrentCustomerAccommodationBookingsin interfaceBookingListFacade- Returns:
- list of visible current customer accommodation bookings
-
getCurrentCustomerTravelBookings
Description copied from interface:BookingListFacadeReturns a list of global travel reservation data which corresponds to all travel bookings of the current customer in session- Specified by:
getCurrentCustomerTravelBookingsin interfaceBookingListFacade- Returns:
- list of current customer's bookings
-
getCurrentCustomerTravelBookings
public SearchPageData<GlobalTravelReservationData> getCurrentCustomerTravelBookings(SearchPageData searchPageData, boolean activeOnly) Description copied from interface:BookingListFacadeReturns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in session- Specified by:
getCurrentCustomerTravelBookingsin interfaceBookingListFacade- Parameters:
searchPageData- the searchPageData contains requested pagination and sorting informationactiveOnly- when true only the active booking will be returned- Returns:
- list of current customer's bookings
-
getGlobalTravelReservationData
Fetches all reservation data for specific orders- Parameters:
orders- list of orders- Returns:
- sorted reservation data list
-
getVisibleCurrentCustomerTravelBookings
Description copied from interface:BookingListFacadeReturns only the bookings visible to the current user- Specified by:
getVisibleCurrentCustomerTravelBookingsin interfaceBookingListFacade- Returns:
- list of visible current customer travel bookings
-
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 informationstatuses- one or more OrderStatuses to include in the result- Returns:
- the searchPageData contains requested pagination and sorting information with list of orders
-
sortBookings
Sorts users booking by departure time ascending and puts active bookings first- Parameters:
myBookings-- Returns:
- sorted bookings list
-
getReservationDepartureTime
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
Provides date which is to be used for Sorting bookings for Travel.- Parameters:
globalTravelReservationData-- Returns:
- date
-
getOrderNumberForComparison
protected String getOrderNumberForComparison(GlobalTravelReservationData globalTravelReservationData) -
getOrderStatusValue
-
getCurrentCustomerTravelBookingList
public SearchPageData<GlobalTravelReservationData> getCurrentCustomerTravelBookingList(SearchPageData searchPageData, boolean activeOnly) Description copied from interface:BookingListFacadeReturns a list of global travel reservation data with pagination which corresponds to all travel bookings of the current customer in session- Specified by:
getCurrentCustomerTravelBookingListin interfaceBookingListFacade- Parameters:
searchPageData- the searchPageData contains requested pagination and sorting informationactiveOnly- when true only the active booking will be returned- Returns:
- list of current customer's bookings
-
getAccommodationRoomNameMapping
public Map<String,Map<String, getAccommodationRoomNameMappingInteger>> (List<AccommodationReservationData> accommodationReservationDataList) Description copied from interface:BookingListFacadeGets accommodation room name mapping.- Specified by:
getAccommodationRoomNameMappingin interfaceBookingListFacade- 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
- Returns:
- the orderStatusValueMap
-
setOrderStatusValueMap
- Parameters:
orderStatusValueMap- the orderStatusValueMap to set
-
getTransportBookingListPipelineManager
- Returns:
- the transportBookingListPipelineManager
-
setTransportBookingListPipelineManager
public void setTransportBookingListPipelineManager(ReservationPipelineManager transportBookingListPipelineManager) - Parameters:
transportBookingListPipelineManager- the transportBookingListPipelineManager to set
-
getAccommodationBookingListPipelineManager
- Returns:
- the accommodationBookingListPipelineManager
-
setAccommodationBookingListPipelineManager
public void setAccommodationBookingListPipelineManager(AccommodationReservationPipelineManager accommodationBookingListPipelineManager) - Parameters:
accommodationBookingListPipelineManager- the accommodationBookingListPipelineManager to set
-
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
- Returns:
- the customerAccountService
-
setCustomerAccountService
- Parameters:
customerAccountService- the customerAccountService to set
-
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
-