Class BundleMoveOperation
java.lang.Object
org.dspace.app.rest.repository.patch.operation.PatchOperation<Bundle>
org.dspace.app.rest.repository.patch.operation.BundleMoveOperation
This is the implementation for Bundle move patches.
This operation moves bitstreams within a bundle from one index to another.
Example:
curl -X PATCH http://${dspace.server.url}/api/bundles/<:id-bundle> -H "
Content-Type: application/json" -d '[{ "op": "move", "path": "
/_links/bitstreams/1/href", "from": "/_links/bitstreams/0/href"]'
-
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 TypeMethodDescriptionExecutes the move 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
-
BundleMoveOperation
public BundleMoveOperation()
-
-
Method Details
-
perform
Executes the move patch operation.- Specified by:
performin classPatchOperation<Bundle>- Parameters:
bundle- the bundle in which we want to move files around.operation- the move patch operation.context- context of patch operation- Returns:
- the updated rest model.
- Throws:
DSpaceBadRequestException
-
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<Bundle>- 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
-