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
-
Method Details
-
clone
T clone(T cmsItemModel, Optional<T> template, Optional<Map<String, Object>> context) throws CMSItemNotFoundException, IllegalArgumentExceptionClones 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 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 foundIllegalArgumentException- when the a non-empty optional template or context parameter is expected but not given or the
-