public interface NonDeletingOperation<T> extends CreateOrReplaceable<T>, EditReplacePatchable<T>, Replaceable<T>, ItemReplacable<T>, ItemWritableOperation<T>, ServerSideApplicable<T>
| Modifier and Type | Method and Description |
|---|---|
T |
createOr(Function<NonDeletingOperation<T>,T> conflictAction)
Alternative to
CreateOrReplaceable.createOrReplace(). |
T |
editStatus(UnaryOperator<T> function)
Edit the status subresource
|
T |
patchStatus()
Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.
|
EditReplacePatchable<T> |
subresource(String subresource)
Provides edit, patch, and replace methods for the given subresource
|
NonDeletingOperation<T> |
unlock()
Removes the resource version from the current item.
|
create, createOrReplacereplaceStatus, updateStatusaccept, edit, edit, edit, patch, patch, patch, patch, patch, patchcreate, createOrReplace, delete, patchStatus, updateStatuswithGracePeriodwithPropagationPolicydelete, withTimeout, withTimeoutInMillisreplace, replaceStatusfieldManager, forceConflicts, serverSideApplyT createOr(Function<NonDeletingOperation<T>,T> conflictAction)
CreateOrReplaceable.createOrReplace().
Will attempt a create, and if that fails will perform the conflictAction.
Most commonly the conflictAction will be NonDeletingOperation::update or NonDeletingOperation::patch, but you are free to provide whatever Function suits your needs.
conflictAction - to be performed it the create fails with a conflictNonDeletingOperation<T> unlock()
T editStatus(UnaryOperator<T> function)
function - to produce a modified statusT patchStatus()
This method has the same patching behavior as EditReplacePatchable.patch(PatchContext), with
PatchType.JSON_MERGE but against the status subresource.
Set the resourceVersion to null to prevent optimistic locking.
EditReplacePatchable<T> subresource(String subresource)
Copyright © 2015–2024 Red Hat. All rights reserved.