Class PatchOperation
java.lang.Object
org.springframework.data.rest.webmvc.json.patch.PatchOperation
Abstract base class representing and providing support methods for patch operations.
- Author:
- Craig Walls, Mathias Düsterhöft, Oliver Gierke
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionPatchOperation
(String op, org.springframework.data.rest.webmvc.json.patch.SpelPath.UntypedSpelPath path) Constructs the operation.protected
PatchOperation
(String op, org.springframework.data.rest.webmvc.json.patch.SpelPath.UntypedSpelPath path, Object value) -
Method Summary
Modifier and TypeMethodDescriptionprotected final Object
protected Object
evaluateValueFromTarget
(Object targetObject, Class<?> entityType, BindContext context) Performs late-value evaluation on the operation value if the value is aLateObjectEvaluator
.
-
Field Details
-
op
-
path
protected final org.springframework.data.rest.webmvc.json.patch.SpelPath.UntypedSpelPath path -
value
-
-
Constructor Details
-
PatchOperation
public PatchOperation(String op, org.springframework.data.rest.webmvc.json.patch.SpelPath.UntypedSpelPath path) Constructs the operation.- Parameters:
op
- the operation name. (e.g., 'move')path
- the path to perform the operation on. (e.g., '/1/description')
-
PatchOperation
-
-
Method Details
-
evaluateValueFromTarget
protected Object evaluateValueFromTarget(Object targetObject, Class<?> entityType, BindContext context) Performs late-value evaluation on the operation value if the value is aLateObjectEvaluator
.- Parameters:
targetObject
- the target object, used as assistance in determining the evaluated object's type.entityType
- the entityType- Returns:
- the result of late-value evaluation if the value is a
LateObjectEvaluator
; the value itself otherwise.
-
evaluate
-