Class DefaultCMSItemCloningService
- java.lang.Object
-
- de.hybris.platform.cms2.cloning.service.impl.DefaultCMSItemCloningService
-
- All Implemented Interfaces:
CMSItemCloningService
public class DefaultCMSItemCloningService extends java.lang.Object implements CMSItemCloningService
Default implementation ofCMSItemCloningServiceto deep copy item models.
-
-
Constructor Summary
Constructors Constructor Description DefaultCMSItemCloningService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<AbstractCMSComponentModel>cloneComponent(AbstractCMSComponentModel componentModel)Deep clones the provided component in the same catalog version.protected java.util.Optional<AbstractCMSComponentModel>cloneComponentInCatalogVersion(AbstractCMSComponentModel componentModel, CatalogVersionModel targetCatalogVersionModel)Deep clones the provided component in the provided catalog version.voidcloneContentSlotComponents(ContentSlotModel sourceContentSlotModel, ContentSlotModel targetContentSlotModel, CatalogVersionModel targetCatalogVersionModel)Deeps clones all cloneable cms components for a given content slot excluding non cloneable componentsprotected CMSItemCloneablePredicategetCmsItemCloneablePredicate()protected CMSItemDeepCloningServicegetCmsItemDeepCloningService()protected CMSModelCloningContextFactorygetCmsModelCloningContextFactory()protected CMSPageServicegetCmsPageService()voidsetCmsItemCloneablePredicate(CMSItemCloneablePredicate cmsItemCloneablePredicate)voidsetCmsItemDeepCloningService(CMSItemDeepCloningService cmsItemDeepCloningService)voidsetCmsModelCloningContextFactory(CMSModelCloningContextFactory cmsModelCloningContextFactory)voidsetCmsPageService(CMSPageService cmsPageService)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.cms2.cloning.service.CMSItemCloningService
shouldCloneComponents
-
-
-
-
Method Detail
-
cloneContentSlotComponents
public void cloneContentSlotComponents(ContentSlotModel sourceContentSlotModel, ContentSlotModel targetContentSlotModel, CatalogVersionModel targetCatalogVersionModel)
Description copied from interface:CMSItemCloningServiceDeeps clones all cloneable cms components for a given content slot excluding non cloneable components- Specified by:
cloneContentSlotComponentsin interfaceCMSItemCloningService- Parameters:
sourceContentSlotModel- - the source content slot containing the cms componentstargetContentSlotModel- - the target content slot containing the cloned cms componentstargetCatalogVersionModel- - the catalog version
-
cloneComponent
public java.util.Optional<AbstractCMSComponentModel> cloneComponent(AbstractCMSComponentModel componentModel)
Description copied from interface:CMSItemCloningServiceDeep clones the provided component in the same catalog version. The cloned component will have the same information except for the pk, uid and name. The pk will be null because it is a new component. The uid and name will be generated to avoid collisions with the original component.- Specified by:
cloneComponentin interfaceCMSItemCloningService- Parameters:
componentModel- - The original component to clone.- Returns:
- The optional cloned component.
-
cloneComponentInCatalogVersion
protected java.util.Optional<AbstractCMSComponentModel> cloneComponentInCatalogVersion(AbstractCMSComponentModel componentModel, CatalogVersionModel targetCatalogVersionModel)
Deep clones the provided component in the provided catalog version. The cloned component will have the same information except for the pk, uid and name. The pk will be null because it is a new component. The uid and name will be generated to avoid collisions with the original component.- Parameters:
componentModel- - The original component to clone.targetCatalogVersionModel- - The catalog version where to clone the provided component.- Returns:
- The optional cloned component.
-
getCmsModelCloningContextFactory
protected CMSModelCloningContextFactory getCmsModelCloningContextFactory()
-
setCmsModelCloningContextFactory
public void setCmsModelCloningContextFactory(CMSModelCloningContextFactory cmsModelCloningContextFactory)
-
getCmsItemCloneablePredicate
protected CMSItemCloneablePredicate getCmsItemCloneablePredicate()
-
setCmsItemCloneablePredicate
public void setCmsItemCloneablePredicate(CMSItemCloneablePredicate cmsItemCloneablePredicate)
-
getCmsItemDeepCloningService
protected CMSItemDeepCloningService getCmsItemDeepCloningService()
-
setCmsItemDeepCloningService
public void setCmsItemDeepCloningService(CMSItemDeepCloningService cmsItemDeepCloningService)
-
getCmsPageService
protected CMSPageService getCmsPageService()
-
setCmsPageService
public void setCmsPageService(CMSPageService cmsPageService)
-
-