Package com.evolveum.midpoint.prism
Class DeepCloneOperation
- java.lang.Object
-
- com.evolveum.midpoint.prism.DeepCloneOperation
-
public class DeepCloneOperation extends Object
Represents the "deep clone" and "ultra deep clone" operations on items and complex type definitions. TODO description
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ComplexTypeDefinition
execute(@NotNull ComplexTypeDefinition original, @NotNull Supplier<ComplexTypeDefinition> cloneSupplier, @NotNull Consumer<ComplexTypeDefinition> cloneProcessor)
Executes the deep clone operation.void
executePostCloneAction(ItemDefinition<?> itemClone)
static @NotNull DeepCloneOperation
notUltraDeep()
Deep but not ultra-deep clone operation.static DeepCloneOperation
operation(boolean ultraDeep, Consumer<ItemDefinition<?>> postCloneAction)
Deep OR ultra-deep clone operation, with given post clone action.static DeepCloneOperation
ultraDeep()
Ultra-deep clone operation.
-
-
-
Method Detail
-
notUltraDeep
@NotNull public static @NotNull DeepCloneOperation notUltraDeep()
Deep but not ultra-deep clone operation. We will reuse already cloned definitions.
-
ultraDeep
public static DeepCloneOperation ultraDeep()
Ultra-deep clone operation.
-
operation
public static DeepCloneOperation operation(boolean ultraDeep, Consumer<ItemDefinition<?>> postCloneAction)
Deep OR ultra-deep clone operation, with given post clone action.
-
execute
public ComplexTypeDefinition execute(@NotNull @NotNull ComplexTypeDefinition original, @NotNull @NotNull Supplier<ComplexTypeDefinition> cloneSupplier, @NotNull @NotNull Consumer<ComplexTypeDefinition> cloneProcessor)
Executes the deep clone operation.- Parameters:
original
- Definition that is to be clonedcloneSupplier
- Creates a clone (copy) of the definitioncloneProcessor
- Does the custom processing on the clone, e.g. traversing through individual items This method manages the whole process, e.g. by checking if the definition was already cloned, etc. Note that it is clone processor responsibility to invokeexecutePostCloneAction(ItemDefinition)
on individual item definitions.
-
executePostCloneAction
public void executePostCloneAction(ItemDefinition<?> itemClone)
-
-