public interface Patchable<T>
Modifier and Type | Method and Description |
---|---|
T |
patch(PatchContext patchContext,
String patch)
Update field(s) of a resource using type specified in
PatchContext (defaults to strategic merge if not specified). |
T |
patch(PatchContext patchContext,
T item)
Update field(s) of a resource using type specified in
PatchContext (defaults to strategic merge if not specified). |
default T |
patch(String patch)
Update field(s) of a resource using strategic merge patch.
|
default T |
patch(T item)
Update field(s) of a resource using a JSON patch.
|
default T patch(T item)
patch(PatchContext, Object)
with PatchType.JSON
specified.
WARNING: This may overwrite concurrent changes (between when you obtained your item and the current state) in an unexpected way.
Consider using edit instead.item
- to be patched with patched valuesT patch(PatchContext patchContext, T item)
PatchContext
(defaults to strategic merge if not specified).
PatchType.JSON
- will create a JSON patch against the current item.
WARNING: This may overwrite concurrent changes (between when you obtained your item and the current state) in an unexpected way.
Consider using edit instead. The resourceVersion and other fields of the item may be modified by this call.
PatchType.JSON_MERGE
- will send the serialization of the item as a JSON MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
PatchType.STRATEGIC_MERGE
- will send the serialization of the item as a STRATEGIC MERGE patch.
Set the resourceVersion to null to prevent optimistic locking.
item
- to be patched with patched valuespatchContext
- PatchContext
for patch requestdefault T patch(String patch)
patch
- The patch to be applied to the resource JSON file.T patch(PatchContext patchContext, String patch)
PatchContext
(defaults to strategic merge if not specified).patchContext
- PatchContext
for patch requestpatch
- The patch to be applied to the resource JSON file.Copyright © 2015–2020 Red Hat. All rights reserved.