Class DefaultCMSItemCloningService

    • Constructor Detail

      • DefaultCMSItemCloningService

        public DefaultCMSItemCloningService()
    • Method Detail

      • 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 java.util.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 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.
      • setCmsModelCloningContextFactory

        public void setCmsModelCloningContextFactory​(CMSModelCloningContextFactory cmsModelCloningContextFactory)
      • setCmsItemCloneablePredicate

        public void setCmsItemCloneablePredicate​(CMSItemCloneablePredicate cmsItemCloneablePredicate)
      • setCmsItemDeepCloningService

        public void setCmsItemDeepCloningService​(CMSItemDeepCloningService cmsItemDeepCloningService)
      • setCmsPageService

        public void setCmsPageService​(CMSPageService cmsPageService)