Interface CMSCloningStrategy<T extends CMSItemModel>

All Known Implementing Classes:
ComponentCloningStrategy, ContentSlotCloningStrategy, PageCloningStrategy

public interface CMSCloningStrategy<T extends CMSItemModel>
Strategy to decide how to clone a given CMS item model.
  • Method Summary

    Modifier and Type
    Method
    Description
    clone(T cmsItemModel, Optional<T> template, Optional<Map<String,Object>> context)
    Clones the CMS item given by the source universal identifier.
  • Method Details

    • clone

      T clone(T cmsItemModel, Optional<T> template, Optional<Map<String,Object>> context) throws CMSItemNotFoundException, IllegalArgumentException
      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.
      Parameters:
      cmsItemModel - the cms item model to be copied
      template - (optional) the template of the cloned item that may be augmented
      context - (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
      IllegalArgumentException - when the a non-empty optional template or context parameter is expected but not given or the