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 Details

    • 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 cloned
      cloneSupplier - Creates a clone (copy) of the definition
      cloneProcessor - 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 invoke executePostCloneAction(ItemDefinition) on individual item definitions.
    • executePostCloneAction

      public void executePostCloneAction(ItemDefinition<?> itemClone)