Class DefaultCmsItemModelUniqueIdentifierConverter
- java.lang.Object
-
- de.hybris.platform.cmsfacades.uniqueidentifier.functions.DefaultCmsItemModelUniqueIdentifierConverter
-
- All Implemented Interfaces:
UniqueIdentifierConverter<CMSItemModel>
public class DefaultCmsItemModelUniqueIdentifierConverter extends java.lang.Object implements UniqueIdentifierConverter<CMSItemModel>
Default implementation for conversion ofCMSItemModel
-
-
Constructor Summary
Constructors Constructor Description DefaultCmsItemModelUniqueIdentifierConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemData
convert(CMSItemModel cmsItemModel)
Convert an ItemModel object to the correspondingItemData
instance.CMSItemModel
convert(ItemData itemData)
protected CMSItemModel
findItemByComposedKey(EncodedItemComposedKey itemComposedKey, CatalogVersionModel catalogVersion)
protected CMSItemModel
findItemById(ItemData itemData)
protected CatalogVersionService
getCatalogVersionService()
protected CMSAdminItemService
getCmsAdminItemService()
protected org.springframework.beans.factory.ObjectFactory<EncodedItemComposedKey>
getEncodedItemComposedKeyObjectFactory()
protected org.springframework.beans.factory.ObjectFactory<ItemData>
getItemDataDataFactory()
java.lang.String
getItemType()
Returns the item typeItemModel#getItemType
where the converter should be applied to.protected java.lang.String
getUniqueIdentifier(CMSItemModel cmsItemModel)
Returns the unique identifier using the encoded compose key class.void
setCatalogVersionService(CatalogVersionService catalogVersionService)
void
setCmsAdminItemService(CMSAdminItemService cmsAdminItemService)
void
setEncodedItemComposedKeyObjectFactory(org.springframework.beans.factory.ObjectFactory<EncodedItemComposedKey> encodedItemComposedKeyObjectFactory)
void
setItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory)
-
-
-
Method Detail
-
getItemType
public java.lang.String getItemType()
Description copied from interface:UniqueIdentifierConverter
Returns the item typeItemModel#getItemType
where the converter should be applied to.- Specified by:
getItemType
in interfaceUniqueIdentifierConverter<CMSItemModel>
- Returns:
- item type
-
convert
public ItemData convert(CMSItemModel cmsItemModel)
Description copied from interface:UniqueIdentifierConverter
Convert an ItemModel object to the correspondingItemData
instance.- Specified by:
convert
in interfaceUniqueIdentifierConverter<CMSItemModel>
- Parameters:
cmsItemModel
- - the item model entity that will be converted.- Returns:
- an instance of the
ItemData
class that corresponds to the givenItemModel
UniqueIdentifierConverter.getItemType()
.
-
convert
public CMSItemModel convert(ItemData itemData)
Description copied from interface:UniqueIdentifierConverter
- Specified by:
convert
in interfaceUniqueIdentifierConverter<CMSItemModel>
- Parameters:
itemData
- - the item data instance that will be used in the conversion.- Returns:
- the
ItemModel
entity that corresponds to the givenItemData
UniqueIdentifierConverter.getItemType()
.
-
findItemByComposedKey
protected CMSItemModel findItemByComposedKey(EncodedItemComposedKey itemComposedKey, CatalogVersionModel catalogVersion)
-
findItemById
protected CMSItemModel findItemById(ItemData itemData)
-
getUniqueIdentifier
protected java.lang.String getUniqueIdentifier(CMSItemModel cmsItemModel)
Returns the unique identifier using the encoded compose key class. See more details hereEncodedItemComposedKey
.- Parameters:
cmsItemModel
- the cms item model we want to extract the unique identifier.- Returns:
- the encoded unique identifier.
- See Also:
EncodedItemComposedKey
-
setCmsAdminItemService
public void setCmsAdminItemService(CMSAdminItemService cmsAdminItemService)
-
getCmsAdminItemService
protected CMSAdminItemService getCmsAdminItemService()
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getItemDataDataFactory
protected org.springframework.beans.factory.ObjectFactory<ItemData> getItemDataDataFactory()
-
setItemDataDataFactory
public void setItemDataDataFactory(org.springframework.beans.factory.ObjectFactory<ItemData> itemDataDataFactory)
-
getEncodedItemComposedKeyObjectFactory
protected org.springframework.beans.factory.ObjectFactory<EncodedItemComposedKey> getEncodedItemComposedKeyObjectFactory()
-
setEncodedItemComposedKeyObjectFactory
public void setEncodedItemComposedKeyObjectFactory(org.springframework.beans.factory.ObjectFactory<EncodedItemComposedKey> encodedItemComposedKeyObjectFactory)
-
-