Enum Class ChangeType

java.lang.Object
java.lang.Enum<ChangeType>
com.linecorp.centraldogma.common.ChangeType
All Implemented Interfaces:
Serializable, Comparable<ChangeType>, java.lang.constant.Constable

public enum ChangeType extends Enum<ChangeType>
The type of a Change.
  • Enum Constant Details

    • UPSERT_JSON

      public static final ChangeType UPSERT_JSON
      Adds a new JSON file or replaces an existing file. Change.content() will return the JsonNode that represents the content of the file.
    • UPSERT_TEXT

      public static final ChangeType UPSERT_TEXT
      Adds a new text file or replaces an existing file. Change.content() will return the String that represents the content of the file.
    • REMOVE

      public static final ChangeType REMOVE
      Removes an existing file. The Change.content() of this type is always null.
    • RENAME

      public static final ChangeType RENAME
      Renames an existing file. The Change.content() of this type is the new path of the renamed file.
    • APPLY_JSON_PATCH

      public static final ChangeType APPLY_JSON_PATCH
      Applies a JSON patch to a JSON file. The Change.content() of this type is a JSON patch object, as defined in RFC 6902.
    • APPLY_TEXT_PATCH

      public static final ChangeType APPLY_TEXT_PATCH
      Applies a textual patch to a text file. The Change.content() of this type is a unified format string.
  • Method Details

    • values

      public static ChangeType[] 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 ChangeType 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
    • contentType

      public Class<?> contentType()
      Returns the type of the content returned by Change.content().
    • parse

      public static ChangeType parse(String value)
      Returns a ChangeType from the specified value case-insensitively.