Package org.dspace.app.rest
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 ObjectThis 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 Summary
Constructors Constructor Description ItemOwningCollectionUpdateRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CollectionRestmove(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)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.
-
-
-
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, AuthorizeExceptionThis 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 movedresponse- The response objectrequest- 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 wrongIOException- If something goes wrongAuthorizeException- If the user is not authorized to perform the move action
-
-