Interface JsonApiPatches


public interface JsonApiPatches
Level-1 presence-aware PATCH operations.

Typed PatchPresence<T> DTO binding (readPatch / bindPatch) is the conventional path for ordinary callers: omitted members, explicit JSON null / null linkage, and supplied values stay distinct in the bound DTO. PatchCommand ( readCommand / bindCommand) remains the explicit lower-level, generic, and infrastructure projection of the same validated update document. Neither path depends on global resource-type registration and neither reads included.

Both paths describe requested changes only. They do not authorize a request, load domain state, resolve conflicts, or apply mutations; applications own those decisions.

  • Method Details

    • readPatch

      <T> T readPatch(String json, Class<T> dtoType)
      Decodes, validates as an update request, and binds the document directly into the caller's PATCH DTO.
    • readPatch

      <T> T readPatch(InputStream json, Class<T> dtoType)
      Stream variant of readPatch(String, Class). The stream is not closed.
    • readPatch

      Object readPatch(String json, Type dtoType)
      Decodes, validates as an update request, and binds the document into a PATCH DTO described by a full generic type. The caller ensures dtoType denotes the returned value.
    • readPatch

      Object readPatch(InputStream json, Type dtoType)
      Stream variant of readPatch(String, Type). The stream is not closed. The caller ensures dtoType denotes the returned value.
    • readCommand

      <T> PatchCommand<T> readCommand(String json, Class<T> resourceType)
      Decodes, validates as an update request, and binds only the supplied changes into a PatchCommand.
    • readCommand

      <T> PatchCommand<T> readCommand(InputStream json, Class<T> resourceType)
      Stream variant of readCommand(String, Class). The stream is not closed.
    • readCommand

      PatchCommand<?> readCommand(String json, Type resourceType)
      Decodes, validates as an update request, and binds only the supplied changes into a PatchCommand described by a full generic type.

      The wildcard is the honest declaration: a plain Type cannot recover the type argument, so callers assign or narrow the command themselves.

    • readCommand

      PatchCommand<?> readCommand(InputStream json, Type resourceType)
      Stream variant of readCommand(String, Type). The stream is not closed.

      The wildcard is the honest declaration: a plain Type cannot recover the type argument, so callers assign or narrow the command themselves.

    • bindPatch

      <T> T bindPatch(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> dtoType)
      Binds an already-validated update document into the caller's PATCH DTO without re-parsing or re-validating.
    • bindPatch

      Object bindPatch(com.kazforge.jsonapi.core.model.JsonApiDocument document, Type dtoType)
      Binds an already-validated update document into a PATCH DTO described by a full generic type without re-parsing or re-validating. The caller ensures dtoType denotes the returned value.
    • bindCommand

      <T> PatchCommand<T> bindCommand(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> resourceType)
      Binds an already-validated update document into a PatchCommand without re-parsing or re-validating.
    • bindCommand

      PatchCommand<?> bindCommand(com.kazforge.jsonapi.core.model.JsonApiDocument document, Type resourceType)
      Binds an already-validated update document into a PatchCommand described by a full generic type without re-parsing or re-validating.

      The wildcard is the honest declaration: a plain Type cannot recover the type argument, so callers assign or narrow the command themselves.