Package org.dspace.app.rest
Class CommunityAdminGroupRestController
java.lang.Object
org.dspace.app.rest.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
-
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 community This is called by using RequestMethod.DELETE on the default url for this classResponseEntity<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 community This is called by using RequestMethod.POST on the default url for this class
-
Constructor Details
-
CommunityAdminGroupRestController
public CommunityAdminGroupRestController()
-
-
Method Details
-
postAdminGroup
@RequestMapping(method=POST) @PreAuthorize("hasPermission(#uuid, \'COMMUNITY\', \'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 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 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) @PreAuthorize("hasPermission(#uuid, \'COMMUNITY\', \'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 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 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
-