Class CommunityAdminGroupRestController


  • @RestController
    @RequestMapping("/api/core/communities/{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}}/adminGroup")
    public class CommunityAdminGroupRestController
    extends Object
    This RestController will take care of all the calls for a specific community's admingroup This is handled by calling "/api/core/communities/{uuid}/adminGroup" with the correct RequestMethod
    • 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 community This is called by using RequestMethod.DELETE on the default url for this class
      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 community This is called by using RequestMethod.POST on the default url for this class
    • Constructor Detail

      • CommunityAdminGroupRestController

        public CommunityAdminGroupRestController()
    • Method Detail

      • postAdminGroup

        @RequestMapping(method=POST)
        @PreAuthorize("hasPermission(#uuid, \'COMMUNITY\', \'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 community This is called by using RequestMethod.POST on the default url for this class
        Parameters:
        uuid - The UUID of the community 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)
        @PreAuthorize("hasPermission(#uuid, \'COMMUNITY\', \'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 community This is called by using RequestMethod.DELETE on the default url for this class
        Parameters:
        uuid - The UUID of the community 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