Class 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"]'
    • Constructor Detail

      • BundleMoveOperation

        public BundleMoveOperation()
    • 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:
        perform in class PatchOperation<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: 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<org.dspace.content.Bundle>
        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