Class DefaultCMSItemCloningService

java.lang.Object
de.hybris.platform.cms2.cloning.service.impl.DefaultCMSItemCloningService
All Implemented Interfaces:
CMSItemCloningService

public class DefaultCMSItemCloningService extends Object implements CMSItemCloningService
Default implementation of CMSItemCloningService to deep copy item models.
  • Constructor Details

    • DefaultCMSItemCloningService

      public DefaultCMSItemCloningService()
  • Method Details

    • cloneContentSlotComponents

      public void cloneContentSlotComponents(ContentSlotModel sourceContentSlotModel, ContentSlotModel targetContentSlotModel, CatalogVersionModel targetCatalogVersionModel)
      Description copied from interface: CMSItemCloningService
      Deeps clones all cloneable cms components for a given content slot excluding non cloneable components
      Specified by:
      cloneContentSlotComponents in interface CMSItemCloningService
      Parameters:
      sourceContentSlotModel - - the source content slot containing the cms components
      targetContentSlotModel - - the target content slot containing the cloned cms components
      targetCatalogVersionModel - - the catalog version
    • cloneComponent

      public Optional<AbstractCMSComponentModel> cloneComponent(AbstractCMSComponentModel componentModel)
      Description copied from interface: CMSItemCloningService
      Deep 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:
      cloneComponent in interface CMSItemCloningService
      Parameters:
      componentModel - - The original component to clone.
      Returns:
      The optional cloned component.
    • cloneComponentInCatalogVersion

      protected 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)