Class ContentSlotsForPageConverter
- java.lang.Object
-
- de.hybris.platform.cms2.version.converter.customattribute.impl.ContentSlotsForPageConverter
-
- All Implemented Interfaces:
CustomAttributeContentConverter
public class ContentSlotsForPageConverter extends java.lang.Object implements CustomAttributeContentConverter
Converter for ContentSlotForPage relation.
-
-
Constructor Summary
Constructors Constructor Description ContentSlotsForPageConverter()
-
Method Summary
-
-
-
Method Detail
-
convertModelToData
public java.util.List<ContentSlotForPageRelationData> convertModelToData(ItemModel itemModel)
Description copied from interface:CustomAttributeContentConverterConvertsItemModelto representation that can be serialized.- Specified by:
convertModelToDatain interfaceCustomAttributeContentConverter- Parameters:
itemModel- theItemModelthat is used to generate custom attribute.- Returns:
CMSVersionCustomAttributeorList
-
populateItemModel
public void populateItemModel(ItemModel itemModel, java.lang.String value)
. TheContentSlotForPageModelis not accessible throughAbstractPageModeltherefore
the method saves theContentSlotForPageModelto a session and it can be
used later while rebuilding the page.- Specified by:
populateItemModelin interfaceCustomAttributeContentConverter- Parameters:
itemModel- theItemModelto populate.value- the value.
-
getContentSlotByPk
protected ContentSlotModel getContentSlotByPk(PK pk)
Returns aContentSlotModelby primary key.- Parameters:
pk- thePK- Returns:
- the
ContentSlotModel
-
convertContentSlotModelToRelationData
protected ContentSlotForPageRelationData convertContentSlotModelToRelationData(ContentSlotForPageModel contentSlotForPageModel)
ConvertsContentSlotForPageModelto aContentSlotForPageRelationData- Parameters:
contentSlotForPageModel- theContentSlotForPageModelto convert.- Returns:
- the
ContentSlotForPageRelationData.
-
getConstrainedBy
public java.util.function.Predicate<ItemModel> getConstrainedBy()
Description copied from interface:CustomAttributeContentConverterPredicate to verify whether current converter is applicable to providedItemModel.- Specified by:
getConstrainedByin interfaceCustomAttributeContentConverter- Returns:
- the
Predicate.
-
setConstrainedBy
public void setConstrainedBy(java.util.function.Predicate<ItemModel> constrainedBy)
-
getCmsItemToDataConverter
protected CMSItemToDataConverter getCmsItemToDataConverter()
-
setCmsItemToDataConverter
public void setCmsItemToDataConverter(CMSItemToDataConverter cmsItemToDataConverter)
-
getContentSlotRelationDataFactory
protected org.springframework.beans.factory.ObjectFactory<ContentSlotForPageRelationData> getContentSlotRelationDataFactory()
-
setContentSlotRelationDataFactory
public void setContentSlotRelationDataFactory(org.springframework.beans.factory.ObjectFactory<ContentSlotForPageRelationData> contentSlotRelationDataFactory)
-
getQualifier
public java.lang.String getQualifier()
Description copied from interface:CustomAttributeContentConverterReturns the qualifier for custom attribute.- Specified by:
getQualifierin interfaceCustomAttributeContentConverter- Returns:
- custom qualifier.
-
setQualifier
public void setQualifier(java.lang.String qualifier)
-
getCmsAdminContentSlotService
protected CMSAdminContentSlotService getCmsAdminContentSlotService()
-
setCmsAdminContentSlotService
public void setCmsAdminContentSlotService(CMSAdminContentSlotService cmsAdminContentSlotService)
-
getPkDataToModelConverter
protected Converter<VersionPayloadDescriptor,ItemModel> getPkDataToModelConverter()
-
setPkDataToModelConverter
public void setPkDataToModelConverter(Converter<VersionPayloadDescriptor,ItemModel> pkDataToModelConverter)
-
getCmsVersionSessionContextProvider
protected CMSVersionSessionContextProvider getCmsVersionSessionContextProvider()
-
setCmsVersionSessionContextProvider
public void setCmsVersionSessionContextProvider(CMSVersionSessionContextProvider cmsVersionSessionContextProvider)
-
-