Package com.evolveum.midpoint.prism
Class DeepCloneOperation
java.lang.Object
com.evolveum.midpoint.prism.DeepCloneOperation
Represents the "deep clone" and "ultra deep clone" operations on items and complex type definitions.
TODO description
-
Method Summary
Modifier and TypeMethodDescriptionexecute
(@NotNull ComplexTypeDefinition original, @NotNull Supplier<ComplexTypeDefinition> cloneSupplier, @NotNull Consumer<ComplexTypeDefinition> cloneProcessor) Executes the deep clone operation.void
executePostCloneAction
(ItemDefinition<?> itemClone) static @NotNull DeepCloneOperation
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
Ultra-deep clone operation.
-
Method Details
-
notUltraDeep
Deep but not ultra-deep clone operation. We will reuse already cloned definitions. -
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
-