Package de.xima.fc.workflow.taglib.enums
Enum EPatchOperation
- java.lang.Object
-
- java.lang.Enum<EPatchOperation>
-
- de.xima.fc.workflow.taglib.enums.EPatchOperation
-
- All Implemented Interfaces:
Serializable
,Comparable<EPatchOperation>
public enum EPatchOperation extends Enum<EPatchOperation>
Enumeration of JSON patch operation.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
apply(com.alibaba.fastjson.JSON json, Object[] path, Object value)
Applies this JSON patch operation.protected static com.alibaba.fastjson.JSON
getAtPath(com.alibaba.fastjson.JSON json, Object[] path)
static EPatchOperation
valueOf(String name)
Returns the enum constant of this type with the specified name.static EPatchOperation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
add
public static final EPatchOperation add
Adds an item at the specified position of an array or object.
-
remove
public static final EPatchOperation remove
Removes an item at the specified position of an array or object.
-
replace
public static final EPatchOperation replace
Replaces an item at the specified position of an array or object with the given value.
-
-
Method Detail
-
values
public static EPatchOperation[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (EPatchOperation c : EPatchOperation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static EPatchOperation valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
apply
public abstract void apply(com.alibaba.fastjson.JSON json, Object[] path, Object value)
Applies this JSON patch operation.- Parameters:
json
- Root JSON object to which to apply the operation.path
- Path at which to apply the operation.value
- Forreplace
, the new value to set at the given path.
-
getAtPath
protected static com.alibaba.fastjson.JSON getAtPath(com.alibaba.fastjson.JSON json, Object[] path)
-
-