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 ObjectThis 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 Constructor Description CommunityAdminGroupRestController()
-
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 classorg.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
-
-
-
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.AuthorizeExceptionThis 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 wrongorg.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, IOExceptionThis 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 wrongorg.dspace.authorize.AuthorizeException- If something goes wrongIOException- If something goes wrong
-
-