Package com.linecorp.centraldogma.common
Enum Class ChangeType
- All Implemented Interfaces:
Serializable
,Comparable<ChangeType>
,Constable
The type of a
Change
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionApplies a JSON patch to a JSON file.Applies a textual patch to a text file.Removes an existing file.Renames an existing file.Adds a new JSON file or replaces an existing file.Adds a new text file or replaces an existing file. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> Returns the type of the content returned byChange.content()
.static ChangeType
Returns aChangeType
from the specifiedvalue
case-insensitively.static ChangeType
Returns the enum constant of this class with the specified name.static ChangeType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UPSERT_JSON
Adds a new JSON file or replaces an existing file.Change.content()
will return theJsonNode
that represents the content of the file. -
UPSERT_TEXT
Adds a new text file or replaces an existing file.Change.content()
will return theString
that represents the content of the file. -
REMOVE
Removes an existing file. TheChange.content()
of this type is alwaysnull
. -
RENAME
Renames an existing file. TheChange.content()
of this type is the new path of the renamed file. -
APPLY_JSON_PATCH
Applies a JSON patch to a JSON file. TheChange.content()
of this type is a JSON patch object, as defined in RFC 6902. -
APPLY_TEXT_PATCH
Applies a textual patch to a text file. TheChange.content()
of this type is a unified format string.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
contentType
Returns the type of the content returned byChange.content()
. -
parse
Returns aChangeType
from the specifiedvalue
case-insensitively.
-