Class AccommodationMapHandler
java.lang.Object
de.hybris.platform.travelfacades.ancillary.search.accommodation.handlers.AccommodationMapHandler
- All Implemented Interfaces:
AncillarySearchHandler
Deprecated.
Handler to populate seat map options for a transport vehicle retrieved from DB based on mapping between the vehicle
config and configured accommodations
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected SeatMapResponseDataDeprecated.Creates instance of SeatMapResponseDataprotected PriceDatacreatePriceData(de.hybris.platform.jalo.order.price.PriceInformation priceInfo) Deprecated.Method takes a PriceInformation object and performs a null check.protected voidcreateSeat(List<SeatInfoData> seatInfo, int colNum, ConfiguredAccommodationModel seat, CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)Create a seatinfodata object for an accommodation, and adds it to list of seatinfos passed to it as parameter 2)Sets the column no.protected voidcreateSeatAvailabilityData(CabinData cabinData, ConfiguredAccommodationModel seat, SelectedAccommodationModel selectedAccommodationModel) Deprecated.create a seat availabilty data for a seat and set its availability indicator to N to represent non-availability of that seat.protected voidcreateSeats(CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap, List<SeatInfoData> seatInfo, int colNum, List<ConfiguredAccommodationModel> seats) Deprecated.Creates seats for given columnprotected Comparator<SeatInfoData>Deprecated.protected AccommodationMapModelgetAccommodationMap(ItineraryData itineraryData, TransportOfferingModel transportOffering, TravelSectorData travelSector, String vehicleInfoCode) Deprecated.Gets and return accommodation map for transport offering, route, sector and vehicle info codeprotected List<ConfiguredAccommodationModel>getAccommodationMapConfiguration(AccommodationMapModel accommodationMap) Deprecated.Gets and return list of configured accommodations belonging to an accommodation mapprotected AccommodationMapServiceDeprecated.protected TravelCommerceStockServiceDeprecated.protected Comparator<ConfiguredAccommodationModel>Deprecated.protected de.hybris.platform.commercefacades.product.PriceDataFactoryDeprecated.Deprecated since version 3.0.protected List<SelectedAccommodationModel>getSelectedAccommodations(TransportOfferingModel transportOffering) Deprecated.Create the status parameters to find selected accommodations that belong to an order, for making accommodations already selected and already added to order(not in cancelled state), unavailableprotected TransportOfferingServiceDeprecated.protected TransportVehicleDatagetTransportVehicle(TransportOfferingData transportOfferingData) Deprecated.Gets and returns Transport vehicle associated with a transport offeringprotected TransportVehicleInfoDatagetTransportVehicleInfo(TransportVehicleData transportVehicle) Deprecated.Gets and returns Transport vehicle info data from the transport vehicle data passed as paramprotected TravelCommercePriceFacadeDeprecated.protected TravelCommercePriceServiceDeprecated.protected de.hybris.platform.servicelayer.dto.converter.Converter<TravellerModel,TravellerData> Deprecated.voidhandle(OfferRequestData offerRequestData, OfferResponseData offerResponseData) Deprecated.Populates seat map based on following rules : 1) Get all itineraries from request 2) Get origindestinationoption for each itinerary and then for each transport offering in origindestinationoption get the transport vehicle to retrieve seat map for that vehicle 3) Using vehicle info code and transport offering, route and sector, accommodation map is retrieved 4) Finally all configured accommodation(decks, cabins, rows, columns and seats) are retrieved and populated in the AccommodationMapResponseData in respective DTOs.protected voidpopulateAccommodationMap(SeatMapResponseData seatMapResonseData, List<ConfiguredAccommodationModel> seatMapConfigurations, TransportOfferingData transportOfferingData, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, ItineraryData itineraryData, String accommodationMapCode) Deprecated.This method does following : 1)Checks if seatMapConfigurations i.e.protected voidpopulateAccommodationMapDetailData(SeatMapDetailData seatMapDetail, ConfiguredAccommodationModel deck, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, ItineraryData itineraryData, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1) Checks if current configured accommodation(deck) contains cabin, if Not it returns 2) Else : a)Create a modifiable list of cabins, to sort them based on number using configuredAccomNumberComparator b)For each configured accommodation(cabin) get all the rows and create a modifiable list of rows to sort them based on number using configuredAccomNumberComparator.protected voidpopulateAccomodationMapForODOptions(OfferResponseData offerResponseData, ItineraryData itineraryData, OriginDestinationOptionData originDestinationOptionData) Deprecated.protected voidpopulateFromPrice(CabinData cabinData) Deprecated.This method gets all accommodations belonging to all row/column of a cabin, and sort them in ascending order by price, to get the lowest accommodation fare of the cabin, this is done to display "From LowestPrice" for a cabin on FE.protected voidpopulateRowInfo(CabinData cabinData, List<ConfiguredAccommodationModel> rows, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)Checks if the rows(belonging to a cabin) and passed to it as parameter is empty, it returns if the theres no rows.protected voidpopulateSeatAvailability(CabinData cabinData, ConfiguredAccommodationModel seat, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)For the seat passed to it as parameter, it gets product associated with the seat.protected voidpopulateSeatFare(SeatInfoData seatInfoData, ConfiguredAccommodationModel seat, TransportOfferingModel transportOffering, ItineraryData itineraryData) Deprecated.This method does following : For seat passed to it as parameter : 1)Gets associated product.protected voidpopulateSeatFeatureData(ProximityItemModel proximityItemModel, SeatFeatureData seatFeatureData) Deprecated.Create SeatFeatureData for each proximity item associated with a seatprotected voidpopulateSeatInfo(ConfiguredAccommodationModel row, RowInfoData rowInfoData, CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)For the row passed to it as parameter it gets all columns and sort them using configuredAccomNumberComparator to have column sorted based on number.voidsetAccommodationInfoDataComparator(Comparator<SeatInfoData> accommodationInfoDataComparator) Deprecated.voidsetAccommodationMapService(AccommodationMapService accommodationMapService) Deprecated.voidsetCommerceStockService(TravelCommerceStockService commerceStockService) Deprecated.voidsetConfiguredAccomNumberComparator(Comparator<ConfiguredAccommodationModel> configuredAccomNumberComparator) Deprecated.voidsetPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.protected voidsetSeatInfoPrice(SeatInfoData seatInfoData, PriceData priceData) Deprecated.voidsetTransportOfferingService(TransportOfferingService transportOfferingService) Deprecated.voidsetTravelCommercePriceFacade(TravelCommercePriceFacade travelCommercePriceFacade) Deprecated.voidsetTravelCommercePriceService(TravelCommercePriceService travelCommercePriceService) Deprecated.voidsetTravellerDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TravellerModel, TravellerData> travellerDataConverter) Deprecated.
-
Constructor Details
-
AccommodationMapHandler
public AccommodationMapHandler()Deprecated.
-
-
Method Details
-
handle
Deprecated.Populates seat map based on following rules : 1) Get all itineraries from request 2) Get origindestinationoption for each itinerary and then for each transport offering in origindestinationoption get the transport vehicle to retrieve seat map for that vehicle 3) Using vehicle info code and transport offering, route and sector, accommodation map is retrieved 4) Finally all configured accommodation(decks, cabins, rows, columns and seats) are retrieved and populated in the AccommodationMapResponseData in respective DTOs.- Specified by:
handlein interfaceAncillarySearchHandler- Parameters:
offerRequestData- the offer request dataofferResponseData- the offer response data
-
populateAccomodationMapForODOptions
protected void populateAccomodationMapForODOptions(OfferResponseData offerResponseData, ItineraryData itineraryData, OriginDestinationOptionData originDestinationOptionData) Deprecated. -
getSelectedAccommodations
protected List<SelectedAccommodationModel> getSelectedAccommodations(TransportOfferingModel transportOffering) Deprecated.Create the status parameters to find selected accommodations that belong to an order, for making accommodations already selected and already added to order(not in cancelled state), unavailable- Parameters:
transportOffering-- Returns:
-
createAccommodationMapResonseData
Deprecated.Creates instance of SeatMapResponseData- Returns:
-
populateAccommodationMap
protected void populateAccommodationMap(SeatMapResponseData seatMapResonseData, List<ConfiguredAccommodationModel> seatMapConfigurations, TransportOfferingData transportOfferingData, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, ItineraryData itineraryData, String accommodationMapCode) Deprecated.This method does following : 1)Checks if seatMapConfigurations i.e. Deck(s) exist, if not then it returns. 2)Else : a)it instantiates a seatmapdata for current transport offering(within the loop) b)instantiates and associate a seatmapdetail(containing a list of cabins) to seatmapdata c)adds seatmapdata to the list of seatmaps belonging to SeatMapResponseData. 3)Creates a modifiable list of current list of configured accommodations(i.e. deck) so as to sort them based on deck no. using configuredAccomNumberComparator, this can be used to position more than one decks. 4)Start looping through current list of configured accommodations i.e., and for first Deck, calls "populateAccommodationMapDetailData" to populate child configured accommodation(cabin, row, columns etc.) belonging to each deck.- Parameters:
seatMapResonseData-seatMapConfigurations-transportOfferingData-selectedAccommodations-transportOffering-itineraryData-accommodationMapCode-
-
populateAccommodationMapDetailData
protected void populateAccommodationMapDetailData(SeatMapDetailData seatMapDetail, ConfiguredAccommodationModel deck, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, ItineraryData itineraryData, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1) Checks if current configured accommodation(deck) contains cabin, if Not it returns 2) Else : a)Create a modifiable list of cabins, to sort them based on number using configuredAccomNumberComparator b)For each configured accommodation(cabin) get all the rows and create a modifiable list of rows to sort them based on number using configuredAccomNumberComparator. 3)Gets the row number of first row from sorted rows and sets that as starting row num of current cabin, gets last row num of the sorted rows and sets that as ending row num of the cabin(these are used to draw total rows of a cabin on FE) 4)Check and set upper deck indicator, associates cabin class data to determine cabin class on FE and set column headers for all accommodation columns belonging to current cabin. 5)Finally it calls "populateRowInfo" to populate rows, columns and accommodation info of all accommodations within current cabin.- Parameters:
seatMapDetail-deck-selectedAccommodations-transportOffering-itineraryData-productStockMap-
-
populateFromPrice
Deprecated.This method gets all accommodations belonging to all row/column of a cabin, and sort them in ascending order by price, to get the lowest accommodation fare of the cabin, this is done to display "From LowestPrice" for a cabin on FE.- Parameters:
cabinData-
-
populateRowInfo
protected void populateRowInfo(CabinData cabinData, List<ConfiguredAccommodationModel> rows, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)Checks if the rows(belonging to a cabin) and passed to it as parameter is empty, it returns if the theres no rows. 2)Else : a)Loop through all the rows and for each row create a RowInfoData and calls "populateSeatInfo" to associate accommodation info of all accommodations belonging to current row. b)adds this rowinfodata to list of rowinfos belonging to a cabin- Parameters:
cabinData-rows-transportOffering-itineraryData-selectedAccommodations-productStockMap-
-
populateSeatInfo
protected void populateSeatInfo(ConfiguredAccommodationModel row, RowInfoData rowInfoData, CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)For the row passed to it as parameter it gets all columns and sort them using configuredAccomNumberComparator to have column sorted based on number. 2)It checks if modifiable list of column is empty, returns if it is empty, Else : a)Loop through columns of the row, and for each column, gets all accommodations belonging to the column. b)Calls "createSeat" method to create the accommodation info.- Parameters:
row-rowInfoData-cabinData-transportOffering-itineraryData-selectedAccommodations-productStockMap-
-
createSeats
protected void createSeats(CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap, List<SeatInfoData> seatInfo, int colNum, List<ConfiguredAccommodationModel> seats) Deprecated.Creates seats for given column- Parameters:
cabinData-transportOffering-itineraryData-selectedAccommodations-productStockMap-seatInfo-colNum-seats-
-
populateSeatFeatureData
protected void populateSeatFeatureData(ProximityItemModel proximityItemModel, SeatFeatureData seatFeatureData) Deprecated.Create SeatFeatureData for each proximity item associated with a seat- Parameters:
proximityItemModel-seatFeatureData-
-
getAccommodationMapConfiguration
protected List<ConfiguredAccommodationModel> getAccommodationMapConfiguration(AccommodationMapModel accommodationMap) Deprecated.Gets and return list of configured accommodations belonging to an accommodation map- Parameters:
accommodationMap-- Returns:
-
getAccommodationMap
protected AccommodationMapModel getAccommodationMap(ItineraryData itineraryData, TransportOfferingModel transportOffering, TravelSectorData travelSector, String vehicleInfoCode) Deprecated.Gets and return accommodation map for transport offering, route, sector and vehicle info code- Parameters:
itineraryData-transportOffering-travelSector-vehicleInfoCode-- Returns:
-
getTransportVehicleInfo
Deprecated.Gets and returns Transport vehicle info data from the transport vehicle data passed as param- Parameters:
transportVehicle-- Returns:
-
getTransportVehicle
Deprecated.Gets and returns Transport vehicle associated with a transport offering- Parameters:
transportOfferingData-- Returns:
-
createSeat
protected void createSeat(List<SeatInfoData> seatInfo, int colNum, ConfiguredAccommodationModel seat, CabinData cabinData, TransportOfferingModel transportOffering, ItineraryData itineraryData, List<SelectedAccommodationModel> selectedAccommodations, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)Create a seatinfodata object for an accommodation, and adds it to list of seatinfos passed to it as parameter 2)Sets the column no. to which this accommodation belong. 3)Check if seat have proximity items(WC, GALLEY etc.) associated with it, if yes then creates proximity item data and associate it with seat. 4)Calls "populateSeatFare" to set fare for each seat 5)Calls "populateSeatAvailability" to set the availabilty of seat.- Parameters:
seatInfo-colNum-seat-cabinData-transportOffering-itineraryData-selectedAccommodations-productStockMap-
-
populateSeatAvailability
protected void populateSeatAvailability(CabinData cabinData, ConfiguredAccommodationModel seat, List<SelectedAccommodationModel> selectedAccommodations, TransportOfferingModel transportOffering, Map<ProductModel, Long> productStockMap) Deprecated.This method does following : 1)For the seat passed to it as parameter, it gets product associated with the seat. 2)If the product is not null, it checks if productStockMap passed as param has entry of the product as key, if found, it gets stock of that product as value against the key. 3)If product is not found, it checks stock of product in DB, and sets it as key/value pair in productStockMap(to avoid hitting DB to check stock of same product, in case theres same product associated with another seat) 4)If stock is 0, it calls "createSeatAvailabilityData" to create SeatAvailabilityData for that seat with availability indicator = N 5)If stock is not 0, it checks for selected accommodation for this seat in the selectedAccommodations(list of all accommodations belonging to this transport offering already added to order) passed to it as param. 6)If selectedAccommodation is found for this seat, it calls "createSeatAvailabilityData" to create SeatAvailabilityData for that seat with availability indicator = N- Parameters:
cabinData-seat-selectedAccommodations-transportOffering-productStockMap-
-
createSeatAvailabilityData
protected void createSeatAvailabilityData(CabinData cabinData, ConfiguredAccommodationModel seat, SelectedAccommodationModel selectedAccommodationModel) Deprecated.create a seat availabilty data for a seat and set its availability indicator to N to represent non-availability of that seat.- Parameters:
cabinData-seat-selectedAccommodationModel-
-
populateSeatFare
protected void populateSeatFare(SeatInfoData seatInfoData, ConfiguredAccommodationModel seat, TransportOfferingModel transportOffering, ItineraryData itineraryData) Deprecated.This method does following : For seat passed to it as parameter : 1)Gets associated product. 2)Gets price information for associated product and transport offering 3)If not found, look for price information for associated product and travel sector 4)If not found, look for price information for associated product and travel route 5)If not found, look for price information for associated product 6)If still not found then do not associate price with the seat else, create TotalFareData based on price information and associate it with seatInfoData(representing current seat) passed as param- Parameters:
seatInfoData-seat-transportOffering-itineraryData-
-
setSeatInfoPrice
Deprecated. -
createPriceData
Deprecated.Method takes a PriceInformation object and performs a null check. If the object a is null then null will be returned otherwise a new PriceData object is created and returned using the PriceValue on the PriceInformation object- Parameters:
priceInfo-- Returns:
-
getAccommodationMapService
Deprecated.- Returns:
- the accommodationMapService
-
setAccommodationMapService
Deprecated.- Parameters:
accommodationMapService- the accommodationMapService to set
-
getTransportOfferingService
Deprecated.- Returns:
- the transportOfferingService
-
setTransportOfferingService
Deprecated.- Parameters:
transportOfferingService- the transportOfferingService to set
-
getCommerceStockService
Deprecated.- Returns:
- the commerceStockService
-
setCommerceStockService
Deprecated.- Parameters:
commerceStockService- the commerceStockService to set
-
getTravelCommercePriceService
Deprecated.- Returns:
- the travelCommercePriceService
-
setTravelCommercePriceService
Deprecated.- Parameters:
travelCommercePriceService- the travelCommercePriceService to set
-
getPriceDataFactory
@Deprecated protected de.hybris.platform.commercefacades.product.PriceDataFactory getPriceDataFactory()Deprecated.Deprecated since version 3.0.- Returns:
- the priceDataFactory
-
setPriceDataFactory
@Deprecated public void setPriceDataFactory(de.hybris.platform.commercefacades.product.PriceDataFactory priceDataFactory) Deprecated.Deprecated since version 3.0.- Parameters:
priceDataFactory- the priceDataFactory to set
-
getConfiguredAccomNumberComparator
Deprecated.- Returns:
- the configuredAccomNumberComparator
-
setConfiguredAccomNumberComparator
public void setConfiguredAccomNumberComparator(Comparator<ConfiguredAccommodationModel> configuredAccomNumberComparator) Deprecated.- Parameters:
configuredAccomNumberComparator- the configuredAccomNumberComparator to set
-
getAccommodationInfoDataComparator
Deprecated.- Returns:
- the accommodationInfoDataComparator
-
setAccommodationInfoDataComparator
public void setAccommodationInfoDataComparator(Comparator<SeatInfoData> accommodationInfoDataComparator) Deprecated.- Parameters:
accommodationInfoDataComparator- the accommodationInfoDataComparator to set
-
getTravellerDataConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<TravellerModel,TravellerData> getTravellerDataConverter()Deprecated. -
setTravellerDataConverter
public void setTravellerDataConverter(de.hybris.platform.servicelayer.dto.converter.Converter<TravellerModel, TravellerData> travellerDataConverter) Deprecated. -
getTravelCommercePriceFacade
Deprecated.- Returns:
- the travelCommercePriceFacade
-
setTravelCommercePriceFacade
Deprecated.- Parameters:
travelCommercePriceFacade- the travelCommercePriceFacade to set
-
TravelAccommodationMapHandler