Class 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/code/items/{uuid}/owningCollection endpoint where the uuid corresponds to the item of which you want to edit the owning collection.
    • Constructor Detail

      • ItemOwningCollectionUpdateRestController

        public ItemOwningCollectionUpdateRestController()
    • Method Detail

      • move

        @RequestMapping(method=PUT,
                        consumes="text/uri-list")
        @PreAuthorize("hasPermission(#uuid, \'ITEM\',\'WRITE\')")
        @PostAuthorize("returnObject != null")
        public CollectionRest move​(@PathVariable
                                   UUID uuid,
                                   javax.servlet.http.HttpServletResponse response,
                                   javax.servlet.http.HttpServletRequest request)
                            throws SQLException,
                                   IOException,
                                   org.dspace.authorize.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
        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
        org.dspace.authorize.AuthorizeException - If the user is not authorized to perform the move action