Class AbstractPatch

java.lang.Object
de.captaingoldfish.scim.sdk.server.patch.AbstractPatch
Direct Known Subclasses:
PatchResourceHandler, PatchTargetHandler

public abstract class AbstractPatch extends Object
author Pascal Knueppel
created at: 30.10.2019 - 09:10

abstract class that provides basic methods for patching
  • Field Details

    • resourceType

      protected final ResourceType resourceType
      this resource type is used to get the attribute definitions of the values from the patch operations
  • Constructor Details

    • AbstractPatch

      public AbstractPatch(ResourceType resourceType)
  • Method Details

    • getSchemaAttribute

      protected SchemaAttribute getSchemaAttribute(String key)
      tries to resolve that attribute path and gets the schema of the attribute
      Parameters:
      key - the attribute name of which the definition should be extracted
      Returns:
      the schema attribute or an exception if the definition does not exist for the resourceType
    • getAttributeFromObject

      protected com.fasterxml.jackson.databind.JsonNode getAttributeFromObject(com.fasterxml.jackson.databind.JsonNode parentNode, String attributeName)
      gets or creates a new attribute from or into the given parent node based on the given attribute name
      Parameters:
      parentNode - the parent node that might already hold the specified node or will get a node in the type of the attributes definition
      attributeName - the attribute name
      Returns:
      the child object from the parentNode