Package org.dspace.app.rest
Class CollectionGroupRestController
- java.lang.Object
-
- org.dspace.app.rest.CollectionGroupRestController
-
@RestController @RequestMapping("/api/core/collections/{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}}") public class CollectionGroupRestController extends ObjectThis RestController will take care of all the calls for a specific collection's special group This is handled by calling "/api/core/collections/{uuid}/{group}" with the correct RequestMethod This works for specific WorkflowGroups as well given that their role is supplied by calling "/api/core/collections/{uuid}/workflowGroups/{workflowRole}"
-
-
Constructor Summary
Constructors Constructor Description CollectionGroupRestController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteAdminGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method takes care of the deletion of an AdminGroup for the given collection This is called by using RequestMethod.DELETE on the /adminGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteBitstreamReadGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method takes care of the deletion of an BitstreamReadGroup for the given collection This is called by using RequestMethod.DELETE on the /bitstreamReadGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteItemReadGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method takes care of the deletion of an ItemReadGroup for the given collection This is called by using RequestMethod.DELETE on the /itemReadGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteSubmittersGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method takes care of the deletion of a SubmitterGroup for the given collection This is called by using RequestMethod.DELETE on the default url for this classorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteWorkflowGroupForRole(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, String workflowRole)This method will delete the workflowGroup for a given Collection and workflowRoleorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>getWorkflowGroupForRole(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, String workflowRole)This method will retrieve the workflowGroup for a given Collection and workflowRoleorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postAdminGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method creates and returns an AdminGroup object for the given collection This is called by using RequestMethod.POST on the /adminGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postBitstreamReadGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method creates and returns a BitstreamReadGroup object for the given collection This is called by using RequestMethod.POST on the /bitstreamReadGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postItemReadGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method creates and returns a ItemReadGroup object for the given collection This is called by using RequestMethod.POST on the /itemReadGroup valueorg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postSubmittersGroup(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)This method creates and returns a SubmitterGroup object for the given collection This is called by using RequestMethod.POST on the /submittersGrouporg.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postWorkflowGroupForRole(UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, String workflowRole)This method will create the workflowGroup for a given Collection and workflowRole
-
-
-
Method Detail
-
postAdminGroup
@RequestMapping(method=POST, value="/adminGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postAdminGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeExceptionThis method creates and returns an AdminGroup object for the given collection This is called by using RequestMethod.POST on the /adminGroup value- Parameters:
uuid- The UUID of the collection for which we'll create an adminGroupresponse- The current responserequest- The current request- Returns:
- The created AdminGroup
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
deleteAdminGroup
@RequestMapping(method=DELETE, value="/adminGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteAdminGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOExceptionThis method takes care of the deletion of an AdminGroup for the given collection This is called by using RequestMethod.DELETE on the /adminGroup value- Parameters:
uuid- The UUID of the collection for which we'll delete the AdminGroupresponse- The current responserequest- The current request- Returns:
- An empty response if the deletion was successful
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrongIOException- If something goes wrong
-
postSubmittersGroup
@RequestMapping(method=POST, value="/submittersGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postSubmittersGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeExceptionThis method creates and returns a SubmitterGroup object for the given collection This is called by using RequestMethod.POST on the /submittersGroup- Parameters:
uuid- The UUID of the collection for which we'll create a submitterGroupresponse- The current responserequest- The current request- Returns:
- The created SubmitterGroup
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
deleteSubmittersGroup
@RequestMapping(method=DELETE, value="/submittersGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteSubmittersGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOExceptionThis method takes care of the deletion of a SubmitterGroup for the given collection This is called by using RequestMethod.DELETE on the default url for this class- Parameters:
uuid- The UUID of the collection for which we'll delete the SubmittersGroupresponse- The current responserequest- The current request- Returns:
- An empty response if the deletion was successful
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrongIOException- If something goes wrong
-
postItemReadGroup
@RequestMapping(method=POST, value="/itemReadGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postItemReadGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeExceptionThis method creates and returns a ItemReadGroup object for the given collection This is called by using RequestMethod.POST on the /itemReadGroup value- Parameters:
uuid- The UUID of the collection for which we'll create a ItemReadGroupresponse- The current responserequest- The current request- Returns:
- The created ItemReadGroup
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
deleteItemReadGroup
@RequestMapping(method=DELETE, value="/itemReadGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteItemReadGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOExceptionThis method takes care of the deletion of an ItemReadGroup for the given collection This is called by using RequestMethod.DELETE on the /itemReadGroup value- Parameters:
uuid- The UUID of the collection for which we'll delete the ItemReadGroupresponse- The current responserequest- The current request- Returns:
- An empty response if the deletion was successful
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrongIOException- If something goes wrong
-
postBitstreamReadGroup
@RequestMapping(method=POST, value="/bitstreamReadGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postBitstreamReadGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeExceptionThis method creates and returns a BitstreamReadGroup object for the given collection This is called by using RequestMethod.POST on the /bitstreamReadGroup value- Parameters:
uuid- The UUID of the collection for which we'll create a BitstreamReadGroupresponse- The current responserequest- The current request- Returns:
- The created BitstreamReadGroup
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrong
-
deleteBitstreamReadGroup
@RequestMapping(method=DELETE, value="/bitstreamReadGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteBitstreamReadGroup(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOExceptionThis method takes care of the deletion of an BitstreamReadGroup for the given collection This is called by using RequestMethod.DELETE on the /bitstreamReadGroup value- Parameters:
uuid- The UUID of the collection for which we'll delete the bitstreamReadGroupresponse- The current responserequest- The current request- Returns:
- An empty response if the deletion was successful
- Throws:
SQLException- If something goes wrongAuthorizeException- If something goes wrongIOException- If something goes wrong
-
getWorkflowGroupForRole
@RequestMapping(method=GET, value="/workflowGroups/{workflowRole}") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'READ\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> getWorkflowGroupForRole(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws ExceptionThis method will retrieve the workflowGroup for a given Collection and workflowRole- Parameters:
uuid- The UUID of the collection to retrieveresponse- The current responserequest- The current requestworkflowRole- The given workflowRole- Returns:
- The workflowGroup for the given collection and workflowrole
- Throws:
Exception- If something goes wrong
-
postWorkflowGroupForRole
@RequestMapping(method=POST, value="/workflowGroups/{workflowRole}") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'READ\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postWorkflowGroupForRole(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws ExceptionThis method will create the workflowGroup for a given Collection and workflowRole- Parameters:
uuid- The UUID of the collection to retrieveresponse- The current responserequest- The current requestworkflowRole- The given workflowRole- Returns:
- The workflowGroup for the given collection and workflowrole
- Throws:
Exception- If something goes wrong
-
deleteWorkflowGroupForRole
@RequestMapping(method=DELETE, value="/workflowGroups/{workflowRole}") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'READ\')") public org.springframework.http.ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteWorkflowGroupForRole(@PathVariable UUID uuid, javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws ExceptionThis method will delete the workflowGroup for a given Collection and workflowRole- Parameters:
uuid- The UUID of the collection to retrieveresponse- The current responserequest- The current requestworkflowRole- The given workflowRole- Returns:
- Throws:
Exception- If something goes wrong
-
-