Class PatchGenerator

java.lang.Object
org.apache.directory.scim.tools.diff.PatchGenerator

public class PatchGenerator extends Object
Generates a diff (i.e. a list of PatchOperations) between two SCIM resources. This class could be used by SCIM clients when they only want to send PATCH requests over the wire (and communicate only the delta between the original and the modified resource). This class can also be used when testing SCIM servers as an easy way to generate a list of PatchOperations.
  • Constructor Details

    • PatchGenerator

      public PatchGenerator(SchemaRegistry schemaRegistry)
  • Method Details

    • diff

      public <T extends ScimResource> List<PatchOperation> diff(T left, T right)
      Returns a list of PatchOperations that contain the differences between two ScimResources.
      Type Parameters:
      T - The type of the scim resource.
      Parameters:
      left - an unmodified scim resource, as represented in a datastore.
      right - the modified version of the original scim resource.
      Returns:
      a list of PatchOperations that contain the differences between two ScimResources.