Class AccommodationOfferingBasicPopulator
java.lang.Object
de.hybris.platform.travelfacades.populators.AccommodationOfferingBasicPopulator
- All Implemented Interfaces:
de.hybris.platform.converters.Populator<AccommodationOfferingModel,PropertyData>
public class AccommodationOfferingBasicPopulator
extends Object
implements de.hybris.platform.converters.Populator<AccommodationOfferingModel,PropertyData>
The type Accommodation offering basic populator.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddImagesInFormats(MediaContainerModel mediaContainer, ImageDataType imageType, int galleryIndex, List<ImageData> imagesList) This method will add on the images list the medias converted from the given media container.protected voidaddLocation(AccommodationOfferingModel source, PropertyData target) Populates location to property data.protected AccommodationOfferingGalleryServiceGets accommodation offering gallery service.getAccommodationOfferingTypes(AccommodationOfferingModel accommodationOfferingModel) Get accommodation offering type list.protected de.hybris.platform.converters.impl.AbstractPopulatingConverter<AddressModel,AddressData> Gets address converter.protected AddressDatagetAddressData(AccommodationOfferingModel accommodationOfferingModel) Gets address data.getAwards(AccommodationOfferingModel accommodationOfferingModel) Gets awards.protected CatalogVersionModelGets catalog version.protected de.hybris.platform.catalog.CatalogVersionServiceGets catalog version service.protected Comparator<FacilityData>Gets configured facility data comparator.protected de.hybris.platform.servicelayer.dto.converter.Converter<MediaModel,ImageData> Gets image converter.protected de.hybris.platform.commercefacades.product.ImageFormatMappingGets image format mapping.Gets image formats.protected de.hybris.platform.servicelayer.dto.converter.Converter<LocationModel,LocationData> Gets location converter.protected List<MediaContainerModel>getMediaContainerForSelectedAccommodation(String galleryCode) Gets media container for selected accommodation.protected de.hybris.platform.servicelayer.media.MediaContainerServiceGets media container service.protected de.hybris.platform.servicelayer.media.MediaServiceGets media service.protected PositionDatagetPosition(LocationModel location) Gets position.protected de.hybris.platform.converters.impl.AbstractPopulatingConverter<PropertyFacilityModel,FacilityData> Gets property facility converter.voidpopulate(AccommodationOfferingModel source, PropertyData target) voidsetAccommodationOfferingGalleryService(AccommodationOfferingGalleryService accommodationOfferingGalleryService) Sets accommodation offering gallery service.voidsetAddressConverter(de.hybris.platform.converters.impl.AbstractPopulatingConverter<AddressModel, AddressData> addressConverter) Sets address converter.voidsetCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) Sets catalog version service.voidsetConfiguredFacilityDataComparator(Comparator<FacilityData> configuredFacilityDataComparator) Sets configured facility data comparator.voidsetImageConverter(de.hybris.platform.servicelayer.dto.converter.Converter<MediaModel, ImageData> imageConverter) Sets image converter.voidsetImageFormatMapping(de.hybris.platform.commercefacades.product.ImageFormatMapping imageFormatMapping) Sets image format mapping.voidsetImageFormats(List<String> imageFormats) Sets image formats.voidsetLocationConverter(de.hybris.platform.servicelayer.dto.converter.Converter<LocationModel, LocationData> locationConverter) Sets location converter.voidsetMediaContainerService(de.hybris.platform.servicelayer.media.MediaContainerService mediaContainerService) Sets media container service.voidsetMediaService(de.hybris.platform.servicelayer.media.MediaService mediaService) Sets media service.voidsetPropertyFacilityConverter(de.hybris.platform.converters.impl.AbstractPopulatingConverter<PropertyFacilityModel, FacilityData> propertyFacilityConverter) Sets property facility converter.
-
Constructor Details
-
AccommodationOfferingBasicPopulator
public AccommodationOfferingBasicPopulator()
-
-
Method Details
-
populate
public void populate(AccommodationOfferingModel source, PropertyData target) throws de.hybris.platform.servicelayer.dto.converter.ConversionException - Specified by:
populatein interfacede.hybris.platform.converters.Populator<AccommodationOfferingModel,PropertyData> - Throws:
de.hybris.platform.servicelayer.dto.converter.ConversionException
-
addLocation
Populates location to property data.- Parameters:
source- the accommodation offering modeltarget- the property data
-
getAccommodationOfferingTypes
protected List<String> getAccommodationOfferingTypes(AccommodationOfferingModel accommodationOfferingModel) Get accommodation offering type list.- Parameters:
accommodationOfferingModel- the accommodation offering model- Returns:
- the list
-
getAddressData
Gets address data.- Parameters:
accommodationOfferingModel- the accommodation offering model- Returns:
- the address data
-
getAwards
Gets awards.- Parameters:
accommodationOfferingModel- the accommodation offering model- Returns:
- the awards
-
getPosition
Gets position.- Parameters:
location- the location- Returns:
- the position
-
addImagesInFormats
protected void addImagesInFormats(MediaContainerModel mediaContainer, ImageDataType imageType, int galleryIndex, List<ImageData> imagesList) This method will add on the images list the medias converted from the given media container. If the imageType is of type GALLERY then also the galleryIndex is set on the Image data- Parameters:
mediaContainer- the media containerimageType- the image typegalleryIndex- the gallery indeximagesList- the images list
-
getMediaContainerForSelectedAccommodation
Gets media container for selected accommodation.- Parameters:
galleryCode- the gallery code- Returns:
- the media container for selected accommodation
-
getCatalogVersion
Gets catalog version.- Returns:
- the catalog version
-
getAccommodationOfferingGalleryService
Gets accommodation offering gallery service.- Returns:
- the accommodation offering gallery service
-
setAccommodationOfferingGalleryService
public void setAccommodationOfferingGalleryService(AccommodationOfferingGalleryService accommodationOfferingGalleryService) Sets accommodation offering gallery service.- Parameters:
accommodationOfferingGalleryService- the accommodation offering gallery service
-
getCatalogVersionService
protected de.hybris.platform.catalog.CatalogVersionService getCatalogVersionService()Gets catalog version service.- Returns:
- the catalog version service
-
setCatalogVersionService
public void setCatalogVersionService(de.hybris.platform.catalog.CatalogVersionService catalogVersionService) Sets catalog version service.- Parameters:
catalogVersionService- the catalog version service
-
getImageFormats
Gets image formats.- Returns:
- the image formats
-
setImageFormats
Sets image formats.- Parameters:
imageFormats- the image formats
-
getImageFormatMapping
protected de.hybris.platform.commercefacades.product.ImageFormatMapping getImageFormatMapping()Gets image format mapping.- Returns:
- the image format mapping
-
setImageFormatMapping
public void setImageFormatMapping(de.hybris.platform.commercefacades.product.ImageFormatMapping imageFormatMapping) Sets image format mapping.- Parameters:
imageFormatMapping- the image format mapping
-
getMediaService
protected de.hybris.platform.servicelayer.media.MediaService getMediaService()Gets media service.- Returns:
- the media service
-
setMediaService
public void setMediaService(de.hybris.platform.servicelayer.media.MediaService mediaService) Sets media service.- Parameters:
mediaService- the media service
-
getImageConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<MediaModel,ImageData> getImageConverter()Gets image converter.- Returns:
- the image converter
-
setImageConverter
public void setImageConverter(de.hybris.platform.servicelayer.dto.converter.Converter<MediaModel, ImageData> imageConverter) Sets image converter.- Parameters:
imageConverter- the image converter
-
getMediaContainerService
protected de.hybris.platform.servicelayer.media.MediaContainerService getMediaContainerService()Gets media container service.- Returns:
- the media container service
-
setMediaContainerService
public void setMediaContainerService(de.hybris.platform.servicelayer.media.MediaContainerService mediaContainerService) Sets media container service.- Parameters:
mediaContainerService- the media container service
-
getPropertyFacilityConverter
protected de.hybris.platform.converters.impl.AbstractPopulatingConverter<PropertyFacilityModel,FacilityData> getPropertyFacilityConverter()Gets property facility converter.- Returns:
- the propertyFacilityConverter
-
setPropertyFacilityConverter
public void setPropertyFacilityConverter(de.hybris.platform.converters.impl.AbstractPopulatingConverter<PropertyFacilityModel, FacilityData> propertyFacilityConverter) Sets property facility converter.- Parameters:
propertyFacilityConverter- the propertyFacilityConverter to set
-
getConfiguredFacilityDataComparator
Gets configured facility data comparator.- Returns:
- the configuredFacilityDataComparator
-
setConfiguredFacilityDataComparator
public void setConfiguredFacilityDataComparator(Comparator<FacilityData> configuredFacilityDataComparator) Sets configured facility data comparator.- Parameters:
configuredFacilityDataComparator- the configuredFacilityDataComparator to set
-
getAddressConverter
protected de.hybris.platform.converters.impl.AbstractPopulatingConverter<AddressModel,AddressData> getAddressConverter()Gets address converter.- Returns:
- the addressConverter
-
setAddressConverter
public void setAddressConverter(de.hybris.platform.converters.impl.AbstractPopulatingConverter<AddressModel, AddressData> addressConverter) Sets address converter.- Parameters:
addressConverter- the addressConverter to set
-
getLocationConverter
protected de.hybris.platform.servicelayer.dto.converter.Converter<LocationModel,LocationData> getLocationConverter()Gets location converter.- Returns:
- the location converter
-
setLocationConverter
public void setLocationConverter(de.hybris.platform.servicelayer.dto.converter.Converter<LocationModel, LocationData> locationConverter) Sets location converter.- Parameters:
locationConverter- the location converter
-