Class JsonApiPatchCommandReader
PatchCommand.
readValue(java.lang.String, java.lang.Class<T>) decodes and aggregate-validates through a factory-composed DocumentReadContext (PrimaryDataKind.RESOURCE with DocumentUsage.UPDATE_REQUEST), then binds only supplied mapped attributes and relationships.
fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument, java.lang.Class<T>) binds without re-validation. Codec and aggregate failures stay JsonApiDocumentReadException; bind failures stay JsonApiMappingException with resource-relative pointers and are
never prefixed with /data. Built-in linkage conversion preserves
ResourceIdentifier.meta through a binder mapper that can round-trip core Meta.
Close/ownership rules match JsonApiDocumentReader: convenience overloads close parsers
they create; caller-owned streams and parsers stay open. Construct via JsonApiJackson3.patchCommandReader(JsonMapper) or its overloads. Safe for concurrent use once
created.
-
Method Summary
Modifier and TypeMethodDescription<T> com.kazforge.jsonapi.patch.PatchCommand<T> fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> resourceType) Binds an already-validated document without re-parsing or re-validating.com.kazforge.jsonapi.patch.PatchCommand<?> fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, tools.jackson.databind.JavaType resourceType) Binds an already-validated document without re-parsing or re-validating.<T> com.kazforge.jsonapi.patch.PatchCommand<T> Decodes, validates, and binds the UTF-8 JSON:API update document in the given bytes.com.kazforge.jsonapi.patch.PatchCommand<?> readValue(byte[] utf8Json, tools.jackson.databind.JavaType resourceType) Byte-array overload ofreadValue(String, JavaType).<T> com.kazforge.jsonapi.patch.PatchCommand<T> readValue(InputStream utf8Stream, Class<T> resourceType) Decodes, validates, and binds one JSON:API update document from a caller-owned UTF-8 stream.com.kazforge.jsonapi.patch.PatchCommand<?> readValue(InputStream utf8Stream, tools.jackson.databind.JavaType resourceType) Stream overload ofreadValue(String, JavaType).<T> com.kazforge.jsonapi.patch.PatchCommand<T> Decodes, validates, and binds the JSON:API update document in the given string.com.kazforge.jsonapi.patch.PatchCommand<?> Decodes, validates, and binds using aJavaType;PatchCommand.resourceType()is the type's raw class.<T> com.kazforge.jsonapi.patch.PatchCommand<T> Decodes, validates, and binds one JSON:API update document from a caller-owned parser.com.kazforge.jsonapi.patch.PatchCommand<?> readValue(tools.jackson.core.JsonParser parser, tools.jackson.databind.JavaType resourceType) Parser overload ofreadValue(String, JavaType).
-
Method Details
-
readValue
Decodes, validates, and binds the JSON:API update document in the given string. -
readValue
public <T> com.kazforge.jsonapi.patch.PatchCommand<T> readValue(byte[] utf8Json, Class<T> resourceType) Decodes, validates, and binds the UTF-8 JSON:API update document in the given bytes. -
readValue
public <T> com.kazforge.jsonapi.patch.PatchCommand<T> readValue(InputStream utf8Stream, Class<T> resourceType) Decodes, validates, and binds one JSON:API update document from a caller-owned UTF-8 stream. The stream is not closed. -
readValue
public <T> com.kazforge.jsonapi.patch.PatchCommand<T> readValue(tools.jackson.core.JsonParser parser, Class<T> resourceType) Decodes, validates, and binds one JSON:API update document from a caller-owned parser. The parser is not closed. -
readValue
public com.kazforge.jsonapi.patch.PatchCommand<?> readValue(String json, tools.jackson.databind.JavaType resourceType) Decodes, validates, and binds using aJavaType;PatchCommand.resourceType()is the type's raw class. -
readValue
public com.kazforge.jsonapi.patch.PatchCommand<?> readValue(byte[] utf8Json, tools.jackson.databind.JavaType resourceType) Byte-array overload ofreadValue(String, JavaType). -
readValue
public com.kazforge.jsonapi.patch.PatchCommand<?> readValue(InputStream utf8Stream, tools.jackson.databind.JavaType resourceType) Stream overload ofreadValue(String, JavaType). -
readValue
public com.kazforge.jsonapi.patch.PatchCommand<?> readValue(tools.jackson.core.JsonParser parser, tools.jackson.databind.JavaType resourceType) Parser overload ofreadValue(String, JavaType). -
fromDocument
public <T> com.kazforge.jsonapi.patch.PatchCommand<T> fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, Class<T> resourceType) Binds an already-validated document without re-parsing or re-validating. Requires non-nullDocumentData.SingleResourceprimary data; other primary-data states throwIllegalArgumentException. -
fromDocument
public com.kazforge.jsonapi.patch.PatchCommand<?> fromDocument(com.kazforge.jsonapi.core.model.JsonApiDocument document, tools.jackson.databind.JavaType resourceType) Binds an already-validated document without re-parsing or re-validating. Requires non-nullDocumentData.SingleResourceprimary data; other primary-data states throwIllegalArgumentException.PatchCommand.resourceType()is the type's raw class.
-