Class BitstreamRemoveOperation
- java.lang.Object
-
- org.dspace.app.rest.repository.patch.operation.PatchOperation<Bitstream>
-
- org.dspace.app.rest.repository.patch.operation.BitstreamRemoveOperation
-
@Component public class BitstreamRemoveOperation extends PatchOperation<Bitstream>
A PATCH operation for removing bitstreams in bulk from the repository. Example:curl -X PATCH http://${dspace.server.url}/api/core/bitstreams -H "Content-Type: application/json" -d '[ {"op": "remove", "path": "/bitstreams/${bitstream1UUID}"}, {"op": "remove", "path": "/bitstreams/${bitstream2UUID}"}, {"op": "remove", "path": "/bitstreams/${bitstream3UUID}"} ]'- Author:
- Jens Vannerum (jens.vannerum@atmire.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringOPERATION_PATH_BITSTREAM_REMOVE-
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 BitstreamRemoveOperation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthorizeBitstreamRemoveAction(Context context, Bitstream bitstream, int operation)Bitstreamperform(Context context, Bitstream resource, Operation operation)Updates the rest model by applying the 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
-
-
-
-
Field Detail
-
OPERATION_PATH_BITSTREAM_REMOVE
public static final String OPERATION_PATH_BITSTREAM_REMOVE
- See Also:
- Constant Field Values
-
-
Method Detail
-
perform
public Bitstream perform(Context context, Bitstream resource, Operation operation) throws SQLException
Description copied from class:PatchOperationUpdates the rest model by applying the patch operation.- Specified by:
performin classPatchOperation<Bitstream>- Parameters:
context- context of patch operationresource- the dso.operation- the patch operation.- Returns:
- the patched dso
- Throws:
SQLException
-
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<Bitstream>- 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
-
authorizeBitstreamRemoveAction
public void authorizeBitstreamRemoveAction(Context context, Bitstream bitstream, int operation) throws SQLException
- Throws:
SQLException
-
-