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 Object
This 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 -
Method Summary
Modifier and TypeMethodDescriptionResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteAdminGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteBitstreamReadGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteItemReadGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteSubmittersGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 classResponseEntity<org.springframework.hateoas.RepresentationModel<?>>deleteWorkflowGroupForRole(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, String workflowRole) This method will delete the workflowGroup for a given Collection and workflowRoleResponseEntity<org.springframework.hateoas.RepresentationModel<?>>getWorkflowGroupForRole(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, String workflowRole) This method will retrieve the workflowGroup for a given Collection and workflowRoleResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postAdminGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postBitstreamReadGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postItemReadGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 valueResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postSubmittersGroup(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.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 /submittersGroupResponseEntity<org.springframework.hateoas.RepresentationModel<?>>postWorkflowGroupForRole(UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, String workflowRole) This method will create the workflowGroup for a given Collection and workflowRole
-
Constructor Details
-
CollectionGroupRestController
public CollectionGroupRestController()
-
-
Method Details
-
postAdminGroup
@RequestMapping(method=POST, value="/adminGroup") @PreAuthorize("hasPermission(#uuid, \'COLLECTION\', \'WRITE\')") public ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postAdminGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteAdminGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postSubmittersGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteSubmittersGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOException 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 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postItemReadGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteItemReadGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postBitstreamReadGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteBitstreamReadGroup(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request) throws SQLException, AuthorizeException, IOException This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> getWorkflowGroupForRole(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws Exception This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> postWorkflowGroupForRole(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws Exception This 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 ResponseEntity<org.springframework.hateoas.RepresentationModel<?>> deleteWorkflowGroupForRole(@PathVariable UUID uuid, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.http.HttpServletRequest request, @PathVariable String workflowRole) throws Exception This 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
-