Class DefaultMediaContainerModelUniqueIdentifierConverter
- java.lang.Object
-
- de.hybris.platform.cmsfacades.uniqueidentifier.functions.DefaultMediaContainerModelUniqueIdentifierConverter
-
- All Implemented Interfaces:
UniqueIdentifierConverter<MediaContainerModel>
public class DefaultMediaContainerModelUniqueIdentifierConverter extends java.lang.Object implements UniqueIdentifierConverter<MediaContainerModel>
Default implementation for consuming the item Id, name and itemType from readingMediaContainerModelclass
-
-
Constructor Summary
Constructors Constructor Description DefaultMediaContainerModelUniqueIdentifierConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaContainerModelconvert(ItemData itemData)ItemDataconvert(MediaContainerModel mediaContainerModel)Convert an ItemModel object to the correspondingItemDatainstance.protected CatalogVersionServicegetCatalogVersionService()protected CMSMediaContainerServicegetCmsMediaContainerService()protected org.springframework.beans.factory.ObjectFactory<ItemData>getItemDataDataFactory()java.lang.StringgetItemType()Returns the item typeItemModel#getItemTypewhere the converter should be applied to.protected java.lang.StringgetUniqueIdentifier(MediaContainerModel mediaContainerModel)Returns the unique identifier using the encoded compose key class.voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCmsMediaContainerService(CMSMediaContainerService cmsMediaContainerService)voidsetItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory)
-
-
-
Method Detail
-
getItemType
public java.lang.String getItemType()
Description copied from interface:UniqueIdentifierConverterReturns the item typeItemModel#getItemTypewhere the converter should be applied to.- Specified by:
getItemTypein interfaceUniqueIdentifierConverter<MediaContainerModel>- Returns:
- item type
-
convert
public ItemData convert(MediaContainerModel mediaContainerModel)
Description copied from interface:UniqueIdentifierConverterConvert an ItemModel object to the correspondingItemDatainstance.- Specified by:
convertin interfaceUniqueIdentifierConverter<MediaContainerModel>- Parameters:
mediaContainerModel- - the item model entity that will be converted.- Returns:
- an instance of the
ItemDataclass that corresponds to the givenItemModelUniqueIdentifierConverter.getItemType().
-
convert
public MediaContainerModel convert(ItemData itemData)
Description copied from interface:UniqueIdentifierConverter- Specified by:
convertin interfaceUniqueIdentifierConverter<MediaContainerModel>- Parameters:
itemData- - the item data instance that will be used in the conversion.- Returns:
- the
ItemModelentity that corresponds to the givenItemDataUniqueIdentifierConverter.getItemType().
-
getUniqueIdentifier
protected java.lang.String getUniqueIdentifier(MediaContainerModel mediaContainerModel)
Returns the unique identifier using the encoded compose key class. See more details hereEncodedItemComposedKey.- Parameters:
mediaContainerModel- the MediaContainer model we want to extract the unique identifier.- Returns:
- the encoded unique identifier.
- See Also:
EncodedItemComposedKey
-
getItemDataDataFactory
protected org.springframework.beans.factory.ObjectFactory<ItemData> getItemDataDataFactory()
-
setItemDataDataFactory
public void setItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory)
-
getCmsMediaContainerService
protected CMSMediaContainerService getCmsMediaContainerService()
-
setCmsMediaContainerService
public void setCmsMediaContainerService(CMSMediaContainerService cmsMediaContainerService)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
-