public class ItemCloneCreator extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ItemCloneCreator.CannotCloneException
Clone error class.
|
protected static class |
ItemCloneCreator.CannotTranslateException |
static class |
ItemCloneCreator.CopyAttribute
A wrapper for each item attribute to be stored while creating a copy.
|
static class |
ItemCloneCreator.CopyContext
Context for collecting all items copied during
copy(ComposedType, Item, CopyContext). |
static class |
ItemCloneCreator.CopyItem
Wrapper for a single (partOf) item to be copied.
|
| Constructor and Description |
|---|
ItemCloneCreator() |
public static void copyUntypedProperties(ExtensibleItem original, ExtensibleItem copy)
public Item copy(Item original) throws ItemCloneCreator.CannotCloneException, JaloBusinessException
original - the item to copyJaloBusinessExceptionItemCloneCreator.CannotCloneExceptionpublic Item copy(Item original, ItemCloneCreator.CopyContext ctx) throws ItemCloneCreator.CannotCloneException, JaloBusinessException
original - the item to copyctx - the copy contextJaloBusinessExceptionItemCloneCreator.CannotCloneExceptionpublic Item copy(ComposedType targetType, Item original, ItemCloneCreator.CopyContext ctx) throws ItemCloneCreator.CannotCloneException, JaloBusinessException
targetType - the type of copy to create (optional)original - the item to copyctx - the copy contextJaloBusinessExceptionItemCloneCreator.CannotCloneExceptionpublic List<? extends Item> copyAll(List<? extends Item> originals, ItemCloneCreator.CopyContext ctx) throws ItemCloneCreator.CannotCloneException, JaloBusinessException
originals - the items to copyctx - the copy contextItemCloneCreator.CannotCloneException - in case not all items could be copied completely, e.g. due to cyclic dependenciesJaloBusinessExceptionprotected void copyUntypedProperties(ItemCloneCreator.CopyItem item, ItemCloneCreator.CopyContext ctx)
protected void readAttributes(ItemCloneCreator.CopyItem item, ItemCloneCreator.CopyContext ctx)
protected ItemCloneCreator.CopyItem prepareCopy(ComposedType targetType, Item original, ItemCloneCreator.CopyContext ctx)
protected void findPartOfItems(Object originalValue, ItemCloneCreator.CopyContext ctx)
protected boolean process(ItemCloneCreator.CopyItem item, ItemCloneCreator.CopyContext ctx) throws JaloBusinessException
JaloBusinessExceptionprotected void consume(Collection<ItemCloneCreator.CopyAttribute> readyAttributes)
protected Map<String,Object> toValueMap(Collection<ItemCloneCreator.CopyAttribute> readyAttributes)
protected Collection<ItemCloneCreator.CopyAttribute> translatePendingAttributes(ItemCloneCreator.CopyItem item, ItemCloneCreator.CopyContext ctx)
protected Object translateAttributeValue(ItemCloneCreator.CopyAttribute attr, Object originalValue, ItemCloneCreator.CopyContext ctx) throws ItemCloneCreator.CannotTranslateException
Copyright © 2017 SAP SE. All Rights Reserved.