Class ItemOwningCollectionUpdateRestController

java.lang.Object
org.dspace.app.rest.ItemOwningCollectionUpdateRestController

@RestController @RequestMapping("/api/core/items/{uuid:[0-9a-fxA-FX]{8}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{4}-[0-9a-fxA-FX]{12}}/owningCollection") public class ItemOwningCollectionUpdateRestController extends Object
This controller will handle all the incoming calls on the api/core/items/{uuid}/owningCollection endpoint where the uuid corresponds to the item of which you want to edit the owning collection.
  • Constructor Details

    • ItemOwningCollectionUpdateRestController

      public ItemOwningCollectionUpdateRestController()
  • Method Details

    • move

      @RequestMapping(method=PUT, consumes="text/uri-list") @PreAuthorize("hasPermission(#uuid, \'ITEM\',\'WRITE\')") @PostAuthorize("returnObject != null") public CollectionRest move(@PathVariable UUID uuid, @RequestParam(name="inheritPolicies",defaultValue="false") Boolean inheritCollectionPolicies, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, IOException, AuthorizeException
      This method will update the owning collection of the item that correspond to the provided item uuid, effectively moving the item to the new collection.
      Parameters:
      uuid - The UUID of the item that will be moved
      inheritCollectionPolicies - Boolean flag whether to inherit the target collection policies when moving the item
      response - The response object
      request - The request object
      Returns:
      The wrapped resource containing the new owning collection or null when the item was not moved
      Throws:
      SQLException - If something goes wrong
      IOException - If something goes wrong
      AuthorizeException - If the user is not authorized to perform the move action