Enum Class MergePolicy

java.lang.Object
java.lang.Enum<MergePolicy>
org.ametys.plugins.contentio.archive.MergePolicy
All Implemented Interfaces:
Serializable, Comparable<MergePolicy>, java.lang.constant.Constable

public enum MergePolicy extends Enum<MergePolicy>
The policy to apply when trying to import an object with same identifier as an existing object.
This is the view of the different policies of merge available to the application, for the business logic, see Merger (and its implementations in Mergers).
  • Enum Constant Details

    • DELETE_BEFORE

      public static final MergePolicy DELETE_BEFORE
      Delete all existing objects before the import process
    • IGNORE

      public static final MergePolicy IGNORE
      Ignore the objects that already exist
    • REPLACE

      public static final MergePolicy REPLACE
      Replace the objects that already exist
    • FAIL

      public static final MergePolicy FAIL
      Fail when an object try to be imported but already exist
  • Method Details

    • values

      public static MergePolicy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static MergePolicy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMerger

      public abstract Merger getMerger()
      Gets the Merger
      Returns:
      the Merger
    • getId

      public String getId()
      Gets the id
      Returns:
      the id