Interface NonDeletingOperation<T>

    • Method Detail

      • createOr

        T createOr​(Function<NonDeletingOperation<T>,​T> conflictAction)
        Alternative to 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.

        Parameters:
        conflictAction - to be performed it the create fails with a conflict
        Returns:
      • unlock

        NonDeletingOperation<T> unlock()
        Removes the resource version from the current item. If the operation context was created by name, and without an item, this will fetch the item from the api server first.
        Returns:
        NonDeletingOperation that may act on the unlocked item
      • editStatus

        T editStatus​(UnaryOperator<T> function)
        Edit the status subresource
        Parameters:
        function - to produce a modified status
        Returns:
        updated object
      • patchStatus

        T patchStatus()
        Does a PATCH request to the /status subresource ignoring changes to anything except the status stanza.

        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.

        Returns:
        updated object
      • subresource

        EditReplacePatchable<T> subresource​(String subresource)
        Provides edit, patch, and replace methods for the given subresource