Class DefaultMediaModelUniqueIdentifierConverter
java.lang.Object
de.hybris.platform.cmsfacades.uniqueidentifier.functions.DefaultMediaModelUniqueIdentifierConverter
- All Implemented Interfaces:
UniqueIdentifierConverter<MediaModel>
public class DefaultMediaModelUniqueIdentifierConverter
extends Object
implements UniqueIdentifierConverter<MediaModel>
Default implementation for consuming the item Id, name and itemType from reading
MediaModel class-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(MediaModel mediaModel) Convert an ItemModel object to the correspondingItemDatainstance.protected CatalogVersionServiceprotected org.springframework.beans.factory.ObjectFactory<ItemData>Returns the item typeItemModel#getItemTypewhere the converter should be applied to.protected MediaServiceprotected StringgetUniqueIdentifier(MediaModel mediaModel) Returns the unique identifier using the encoded compose key class.voidsetCatalogVersionService(CatalogVersionService catalogVersionService) voidsetItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory) voidsetMediaService(MediaService mediaService)
-
Constructor Details
-
DefaultMediaModelUniqueIdentifierConverter
public DefaultMediaModelUniqueIdentifierConverter()
-
-
Method Details
-
getItemType
Description copied from interface:UniqueIdentifierConverterReturns the item typeItemModel#getItemTypewhere the converter should be applied to.- Specified by:
getItemTypein interfaceUniqueIdentifierConverter<MediaModel>- Returns:
- item type
-
convert
Description copied from interface:UniqueIdentifierConverterConvert an ItemModel object to the correspondingItemDatainstance.- Specified by:
convertin interfaceUniqueIdentifierConverter<MediaModel>- Parameters:
mediaModel- - the item model entity that will be converted.- Returns:
- an instance of the
ItemDataclass that corresponds to the givenItemModelUniqueIdentifierConverter.getItemType().
-
convert
Description copied from interface:UniqueIdentifierConverter- Specified by:
convertin interfaceUniqueIdentifierConverter<MediaModel>- Parameters:
itemData- - the item data instance that will be used in the conversion.- Returns:
- the
ItemModelentity that corresponds to the givenItemDataUniqueIdentifierConverter.getItemType().
-
getUniqueIdentifier
Returns the unique identifier using the encoded compose key class. See more details hereEncodedItemComposedKey.- Parameters:
mediaModel- the mediaitem model we want to extract the unique identifier.- Returns:
- the encoded unique identifier.
- See Also:
-
getItemDataDataFactory
-
setItemDataDataFactory
public void setItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory) -
getMediaService
-
setMediaService
-
getCatalogVersionService
-
setCatalogVersionService
-