Class 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}"
    • 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 value
      org.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 value
      org.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 value
      org.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 class
      org.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 workflowRole
      org.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 workflowRole
      org.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 value
      org.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 value
      org.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 value
      org.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 /submittersGroup
      org.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
    • Constructor Detail

      • CollectionGroupRestController

        public CollectionGroupRestController()
    • 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,
                                                                                                                          org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - 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,
                                                                                                                            org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - If something goes wrong
        IOException - 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,
                                                                                                                               org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - 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,
                                                                                                                                 org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - If something goes wrong
        IOException - 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,
                                                                                                                             org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - 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,
                                                                                                                               org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - If something goes wrong
        IOException - 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,
                                                                                                                                  org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - 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,
                                                                                                                                    org.dspace.authorize.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
        org.dspace.authorize.AuthorizeException - If something goes wrong
        IOException - 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 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 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 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 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 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