Class ResourcePolicyNameAddOperation<R>
java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<R>
org.dspace.app.rest.repository.patch.operation.resourcePolicy.ResourcePolicyNameAddOperation<R>
Implementation for ResourcePolicy name ADD patch.
Example:
curl -X PATCH http://${dspace.server.url}/api/authz/resourcepolicies/<:id-resourcepolicy> -H "
Content-Type: application/json" -d '[{ "op": "add", "path": "
/name", "value": "New Name"]'
- Author:
- Maria Verdonck (Atmire) on 14/02/2020, Andrea Bollini (andrea.bollini at 4science.it)
-
Field Summary
Fields inherited from class org.dspace.app.rest.repository.patch.operation.PatchOperation
OPERATION_ADD, OPERATION_COPY, OPERATION_MOVE, OPERATION_REMOVE, OPERATION_REPLACE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(ResourcePolicy resourcePolicy, Operation operation) Performs the actual add name of resourcePolicy operationUpdates the rest model by applying the patch operation.booleanDetermines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)Methods inherited from class org.dspace.app.rest.repository.patch.operation.PatchOperation
checkOperationValue, getBooleanOperationValue
-
Constructor Details
-
ResourcePolicyNameAddOperation
public ResourcePolicyNameAddOperation()
-
-
Method Details
-
perform
Description copied from class:PatchOperationUpdates the rest model by applying the patch operation.- Specified by:
performin classPatchOperation<R>- Parameters:
context- context of patch operationresource- the dso.operation- the patch operation.- Returns:
- the patched dso
-
add
Performs the actual add name of resourcePolicy operation- Parameters:
resourcePolicy- resourcePolicy being patchedoperation- patch operation
-
supports
Description copied from class:PatchOperationDetermines whether or not this Patch Operation can do this patch (Object of operation and path gets checked)- Specified by:
supportsin classPatchOperation<R>- Parameters:
objectToMatch- Object whose class must be instance of type object for which this PatchOperation was createdoperation- 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
-