Class ContentSlotCloningStrategy
- java.lang.Object
-
- de.hybris.platform.cms2.cloning.strategy.impl.ContentSlotCloningStrategy
-
- All Implemented Interfaces:
CMSCloningStrategy<ContentSlotModel>
public class ContentSlotCloningStrategy extends java.lang.Object implements CMSCloningStrategy<ContentSlotModel>
This strategy clones a content slot and either deep clones its cms components or excludes them all based on the context value "shouldCloneComponents"
-
-
Constructor Summary
Constructors Constructor Description ContentSlotCloningStrategy()
-
Method Summary
-
-
-
Method Detail
-
clone
public ContentSlotModel clone(ContentSlotModel sourceContentSlotModel, java.util.Optional<ContentSlotModel> template, java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> context) throws CMSItemNotFoundException
Description copied from interface:CMSCloningStrategy
Clones the CMS item given by the source universal identifier. If a template is provided, it may be augmented, otherwise a new item may be created.- Specified by:
clone
in interfaceCMSCloningStrategy<ContentSlotModel>
- Parameters:
sourceContentSlotModel
- the cms item model to be copiedtemplate
- (optional) the template of the cloned item that may be augmentedcontext
- (optional) this map contains any context specific data required to clone the item- Returns:
- the cloned CMS item model
- Throws:
CMSItemNotFoundException
- when no CMS item with the given source Uid can be found
-
createContentSlotForPageRelation
protected void createContentSlotForPageRelation(CatalogVersionModel catalogVersionModel, java.lang.String position, AbstractPageModel pageModel, ContentSlotModel contentSlotModel)
Creates a new ContentSlotForPageModel- Parameters:
catalogVersionModel
- the catalog version of the ContentSlotForPageModelposition
- the position of the content slot with respect to other slots on the page. Same as the source content slot.pageModel
- the page where the content slot will be associated to. Same as the source content slot.contentSlotModel
- the cloned content slot
-
getCmsSessionSearchRestrictionsDisabler
protected SessionSearchRestrictionsDisabler getCmsSessionSearchRestrictionsDisabler()
-
setCmsSessionSearchRestrictionsDisabler
public void setCmsSessionSearchRestrictionsDisabler(SessionSearchRestrictionsDisabler cmsSessionSearchRestrictionsDisabler)
-
getCatalogVersionService
protected CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getCmsItemCloningService
protected CMSItemCloningService getCmsItemCloningService()
-
setCmsItemCloningService
public void setCmsItemCloningService(CMSItemCloningService cmsItemCloningService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getCmsAdminContentSlotService
protected CMSAdminContentSlotService getCmsAdminContentSlotService()
-
setCmsAdminContentSlotService
public void setCmsAdminContentSlotService(CMSAdminContentSlotService cmsAdminContentSlotService)
-
-