Class PatchResourceHandler


  • public class PatchResourceHandler
    extends AbstractPatch
    author Pascal Knueppel
    created at: 30.10.2019 - 08:49

    this class will handle the in which the patch-add operation does not define a target and the value is represented by the resource itself:

        The result of the add operation depends upon what the target location
        indicated by "path" references:
    
        o  If omitted, the target location is assumed to be the resource
           itself.  The "value" parameter contains a set of attributes to be
           added to the resource.
     
    • Constructor Detail

      • PatchResourceHandler

        public PatchResourceHandler​(ResourceType resourceType,
                                    PatchOp op)
    • Method Detail

      • addResourceValues

        public boolean addResourceValues​(com.fasterxml.jackson.databind.node.ObjectNode resource,
                                         com.fasterxml.jackson.databind.JsonNode readJsonDocument,
                                         String extensionUri)
        adds the values of the patch operation into the given resource node
        Parameters:
        resource - the resource node into which the values should be added
        readJsonDocument - the patch operation resource from which the values should be added into the resource node
        extensionUri - this extensionUri is used for resolving extensions in the resource if name conflicts do exist we need the fully qualified name for verifying the attributes.