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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    ResponseEntity<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 value
    ResponseEntity<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 value
    ResponseEntity<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 value
    ResponseEntity<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 class
    ResponseEntity<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 workflowRole
    ResponseEntity<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 workflowRole
    ResponseEntity<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 value
    ResponseEntity<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 value
    ResponseEntity<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 value
    ResponseEntity<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 /submittersGroup
    ResponseEntity<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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 adminGroup
      response - The current response
      request - The current request
      Returns:
      The created AdminGroup
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - 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 AdminGroup
      response - The current response
      request - The current request
      Returns:
      An empty response if the deletion was successful
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong
      IOException - 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 submitterGroup
      response - The current response
      request - The current request
      Returns:
      The created SubmitterGroup
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - 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 SubmittersGroup
      response - The current response
      request - The current request
      Returns:
      An empty response if the deletion was successful
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong
      IOException - 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 ItemReadGroup
      response - The current response
      request - The current request
      Returns:
      The created ItemReadGroup
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - 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 ItemReadGroup
      response - The current response
      request - The current request
      Returns:
      An empty response if the deletion was successful
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong
      IOException - 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 BitstreamReadGroup
      response - The current response
      request - The current request
      Returns:
      The created BitstreamReadGroup
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - 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 bitstreamReadGroup
      response - The current response
      request - The current request
      Returns:
      An empty response if the deletion was successful
      Throws:
      SQLException - If something goes wrong
      AuthorizeException - If something goes wrong
      IOException - 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 retrieve
      response - The current response
      request - The current request
      workflowRole - 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 retrieve
      response - The current response
      request - The current request
      workflowRole - 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 retrieve
      response - The current response
      request - The current request
      workflowRole - The given workflowRole
      Returns:
      Throws:
      Exception - If something goes wrong