Class RegistrationEmailPatchOperation<R extends RegistrationData>

java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<R>
org.dspace.app.rest.repository.patch.operation.RegistrationEmailPatchOperation<R>

@Component public class RegistrationEmailPatchOperation<R extends RegistrationData> extends PatchOperation<R>
Implementation for RegistrationData email patches. Example: curl -X PATCH http://${dspace.server.url}/api/eperson/registration/<:registration-id>?token=<:token> -H " Content-Type: application/json" -d '[{ "op": "replace", "path": "/email", "value": "new@email"]'
Author:
Vincenzo Mecca (vins01-4science - vincenzo.mecca at 4science.com)
  • Constructor Details

    • RegistrationEmailPatchOperation

      public RegistrationEmailPatchOperation()
  • Method Details

    • perform

      public R perform(Context context, R object, Operation operation)
      Description copied from class: PatchOperation
      Updates the rest model by applying the patch operation.
      Specified by:
      perform in class PatchOperation<R extends RegistrationData>
      Parameters:
      context - context of patch operation
      object - the dso.
      operation - the patch operation.
      Returns:
      the patched dso
    • supports

      public boolean supports(Object objectToMatch, Operation operation)
      Description copied from class: PatchOperation
      Determines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)
      Specified by:
      supports in class PatchOperation<R extends RegistrationData>
      Parameters:
      objectToMatch - Object whose class must be instance of type object for which this PatchOperation was created
      operation - Operation of the patch, should match this type of Patch Operation
      Returns:
      True if this PatchOperation class can do the patch for this given dso type and Path