Package org.appng.appngizer.controller
Class RoleController
- java.lang.Object
-
- org.appng.appngizer.controller.ControllerBase
-
- org.appng.appngizer.controller.RoleController
-
@RestController public class RoleController extends ControllerBase
-
-
Field Summary
-
Fields inherited from class org.appng.appngizer.controller.ControllerBase
configurer, context, coreService, databaseService, session, templateService
-
-
Constructor Summary
Constructors Constructor Description RoleController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addPermissionsAndSave(String app, Role role, RoleImpl appRole)
org.springframework.http.ResponseEntity<Role>
createRole(String app, Role role)
org.springframework.http.ResponseEntity<Void>
deleteRole(String app, String name)
org.springframework.http.ResponseEntity<Role>
getRole(String app, String name)
org.springframework.http.ResponseEntity<Roles>
listRoles(String app)
org.springframework.http.ResponseEntity<Role>
updateRole(String app, String name, Role role)
-
Methods inherited from class org.appng.appngizer.controller.ControllerBase
getDatabaseStatus, getSharedSecret, onBusinessException, onConstraintViolationException
-
-
-
-
Method Detail
-
listRoles
@GetMapping("/application/{app}/role") public org.springframework.http.ResponseEntity<Roles> listRoles(@PathVariable("app") String app)
-
getRole
@GetMapping("/application/{app}/role/{name:.+}") public org.springframework.http.ResponseEntity<Role> getRole(@PathVariable("app") String app, @PathVariable("name") String name)
-
createRole
@PostMapping("/application/{app}/role") public org.springframework.http.ResponseEntity<Role> createRole(@PathVariable("app") String app, @RequestBody Role role)
-
updateRole
@PutMapping("/application/{app}/role/{name:.+}") public org.springframework.http.ResponseEntity<Role> updateRole(@PathVariable("app") String app, @PathVariable("name") String name, @RequestBody Role role)
-
addPermissionsAndSave
protected void addPermissionsAndSave(String app, Role role, RoleImpl appRole)
-
deleteRole
@DeleteMapping("/application/{app}/role/{name:.+}") public org.springframework.http.ResponseEntity<Void> deleteRole(@PathVariable("app") String app, @PathVariable("name") String name) throws BusinessException
- Throws:
BusinessException
-
-