Class PermissionController
java.lang.Object
energy.eddie.regionconnector.es.datadis.web.PermissionController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> acceptPermission(String permissionId) voidinitBinder(org.springframework.web.bind.WebDataBinder binder) Registers custom deserializers forPermissionRequestForCreationfields.org.springframework.http.ResponseEntity<String> rejectPermission(String permissionId) org.springframework.http.ResponseEntity<CreatedPermissionRequest> requestPermission(@Valid PermissionRequestForCreation requestForCreation) Creates a new permission request.
-
Field Details
-
PATH_PERMISSION_ACCEPTED
- See Also:
-
PATH_PERMISSION_REJECTED
- See Also:
-
-
Constructor Details
-
PermissionController
-
-
Method Details
-
initBinder
@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder) Registers custom deserializers forPermissionRequestForCreationfields. -
requestPermission
@PostMapping(value="/permission-request", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<CreatedPermissionRequest> requestPermission(@Valid @RequestBody @Valid PermissionRequestForCreation requestForCreation) throws DataNeedNotFoundException, UnsupportedDataNeedException, EsValidationException Creates a new permission request. The included JWT token can be passed in the Authorization header, so that theJwtAuthorizationManagerwill allow further state changing requests if they include the token. -
acceptPermission
@PatchMapping("/permission-request/{permissionId}/accepted") public org.springframework.http.ResponseEntity<String> acceptPermission(@PathVariable String permissionId) throws PermissionNotFoundException - Throws:
PermissionNotFoundException
-
rejectPermission
@PatchMapping("/permission-request/{permissionId}/rejected") public org.springframework.http.ResponseEntity<String> rejectPermission(@PathVariable String permissionId) throws PermissionNotFoundException - Throws:
PermissionNotFoundException
-