Class ResourcePolicyEndDateAddOperation<R>

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

@Component public class ResourcePolicyEndDateAddOperation<R> extends PatchOperation<R>
Implementation for ResourcePolicy startDate ADD patch. Example: curl -X PATCH http://${dspace.server.url}/api/authz/resourcepolicies/<:id-resourcepolicy> -H " Content-Type: application/json" -d '[{ "op": "add", "path": " /endDate", "value": "YYYY-MM-DD"]'
Author:
Maria Verdonck (Atmire) on 14/02/2020, Andrea Bollini (andrea.bollini at 4science.it)
  • Constructor Details

    • ResourcePolicyEndDateAddOperation

      public ResourcePolicyEndDateAddOperation()
  • Method Details

    • perform

      public R perform(Context context, R resource, Operation operation)
      Description copied from class: PatchOperation
      Updates the rest model by applying the patch operation.
      Specified by:
      perform in class PatchOperation<R>
      Parameters:
      context - context of patch operation
      resource - 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>
      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