Class AbstractAccommodationMarketLocationRaoPopulator
java.lang.Object
de.hybris.platform.travelrulesengine.converters.populator.AbstractAccommodationMarketLocationRaoPopulator
- Direct Known Subclasses:
AccommodationAvailabilityRequestMarketLocationRaoPopulator,AccommodationReservationMarketLocationRaoPopulator,AccommodationSearchResponseMarketLocationRaoPopulator,MarketLocationCartRaoPopulator
Abstract class that expose the functionalities for the Accommodation Market Location Rao Populator.
The market location is mocked and populated from the address saved against the userModel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected List<LocationModel>getLocationModels(String locationName) Gets location model.getLocations(String locationName) Get the location codes set for the given location nameGets the set of market location codes for the given collection of addresses.protected RuleTravelLocationDaoGets rule travel location dao.protected de.hybris.platform.servicelayer.user.UserServiceGets user service.protected voidpopulateLocationsFromLocation(LocationModel locationModel, Set<String> locationHierarchySet) Populate locations from location.voidsetRuleTravelLocationDao(RuleTravelLocationDao ruleTravelLocationDao) Sets rule travel location dao.voidsetUserService(de.hybris.platform.servicelayer.user.UserService userService) Sets user service.
-
Constructor Details
-
AbstractAccommodationMarketLocationRaoPopulator
public AbstractAccommodationMarketLocationRaoPopulator()
-
-
Method Details
-
getMarketLocations
Gets the set of market location codes for the given collection of addresses. It retrieves the town name first and search for a correspondence with the locations in the system. If nothing can be found, it searches for the country name and lastly for the region.- Returns:
- the set of codes
-
getLocations
Get the location codes set for the given location name- Parameters:
locationName- the location name- Returns:
- the location codes set
-
populateLocationsFromLocation
protected void populateLocationsFromLocation(LocationModel locationModel, Set<String> locationHierarchySet) Populate locations from location.- Parameters:
locationModel- the location modellocationHierarchySet- the location hierarchy set
-
getLocationModels
Gets location model.- Parameters:
locationName- the location name- Returns:
- the location model
-
getRuleTravelLocationDao
Gets rule travel location dao.- Returns:
- the rule travel location dao
-
setRuleTravelLocationDao
Sets rule travel location dao.- Parameters:
ruleTravelLocationDao- the rule travel location dao
-
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
-