public class CMSItemModelCloneCreator extends ItemModelCloneCreator
The only exception are part-of attribute values which consists of other models - these are cloned themselves and then used as attribute value in the new model instance.
By providing a CMSCopyContext the caller may even add some
preset values or define which types are being used when creating copied of part-of models.
Note: CMSModelCloningContext extends the ModelCloningContext to use a CMSCopyContext instead
of the original ItemModelCloneCreator.CopyContext.
ItemModelCloneCreator.CannotCloneException, ItemModelCloneCreator.CannotTranslateException, ItemModelCloneCreator.CopyAttribute, ItemModelCloneCreator.CopyContext, ItemModelCloneCreator.CopyItem| Constructor and Description |
|---|
CMSItemModelCloneCreator() |
CMSItemModelCloneCreator(ModelService modelService,
I18NService i18nService,
TypeService typeService)
Creates and initialize ItemModelCloneCreator
|
| Modifier and Type | Method and Description |
|---|---|
ItemModel |
copy(ComposedTypeModel targetType,
ItemModel original,
ModelCloningContext ctx)
Creates a copy of the given item.
|
ItemModel |
copy(ItemModel original)
Creates a copy of the given item.
|
ItemModel |
copy(ItemModel original,
CMSCopyContext ctx)
Creates a copy of the given item.
|
ItemModel |
copy(ItemModel original,
ModelCloningContext cloningContext)
Creates a copy of the given item.
|
consume, copy, copy, copy, copyAll, copyAll, copyAttributes, findPartOfItems, isEmpty, prepareCopy, prepareCopy, process, readAttributes, setAllAttributes, translateAttributeValue, translatePendingAttributespublic CMSItemModelCloneCreator()
public CMSItemModelCloneCreator(ModelService modelService, I18NService i18nService, TypeService typeService)
public ItemModel copy(ItemModel original) throws ItemModelCloneCreator.CannotCloneException
copy in class ItemModelCloneCreatororiginal - the item to copyItemModelCloneCreator.CannotCloneExceptionpublic ItemModel copy(ItemModel original, ModelCloningContext cloningContext) throws ItemModelCloneCreator.CannotCloneException
copy in class ItemModelCloneCreatororiginal - the item to copycloningContext - the cloning context to manage cloning processItemModelCloneCreator.CannotCloneExceptionpublic ItemModel copy(ItemModel original, CMSCopyContext ctx) throws ItemModelCloneCreator.CannotCloneException
original - the item to copyctx - the copy contextItemModelCloneCreator.CannotCloneExceptionpublic ItemModel copy(ComposedTypeModel targetType, ItemModel original, ModelCloningContext ctx) throws ItemModelCloneCreator.CannotCloneException
copy in class ItemModelCloneCreatortargetType - the type of copy to create (optional)original - the item to copyctx - the copy contextItemModelCloneCreator.CannotCloneExceptionCopyright © 2018 SAP SE. All Rights Reserved.