Class BundleMoveOperation
- java.lang.Object
-
- org.dspace.app.rest.repository.patch.operation.PatchOperation<org.dspace.content.Bundle>
-
- org.dspace.app.rest.repository.patch.operation.BundleMoveOperation
-
@Component public class BundleMoveOperation extends PatchOperation<org.dspace.content.Bundle>
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 Constructor Description BundleMoveOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.dspace.content.Bundleperform(org.dspace.core.Context context, org.dspace.content.Bundle bundle, Operation operation)Executes the move patch operation.booleansupports(Object objectToMatch, Operation operation)Determines 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
-
-
-
-
Method Detail
-
perform
public org.dspace.content.Bundle perform(org.dspace.core.Context context, org.dspace.content.Bundle bundle, Operation operation)Executes the move patch operation.- Specified by:
performin classPatchOperation<org.dspace.content.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
public boolean supports(Object objectToMatch, Operation operation)
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<org.dspace.content.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
-
-