Package energy.eddie.aiida.web
Class PermissionController
java.lang.Object
energy.eddie.aiida.web.PermissionController
@CrossOrigin(origins="http://localhost:5173")
@RestController
@RequestMapping("/permissions")
public class PermissionController
extends Object
-
Constructor Summary
ConstructorsConstructorDescriptionPermissionController(PermissionService permissionService, ConnectionStatusService connectionStatusService, ConnectionStatusEventStream connectionStatusEventStream, EventStream eventStream, AuthService authService) -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<PermissionDto> acceptInboundPermission(UUID permissionId, @Valid AcceptInboundPermissionDto acceptDto) org.springframework.http.ResponseEntity<PermissionDto> acceptOutboundPermission(UUID permissionId, @Valid AcceptOutboundPermissionDto acceptDto) org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<ConnectionStatusEventDto>> org.springframework.http.ResponseEntity<List<PendingPermissionDto>> fetchPermissionDetails(@Valid AiidaPermissionRequestsDto permissionRequests) org.springframework.http.ResponseEntity<List<PermissionDto>> org.springframework.http.ResponseEntity<List<PermissionDto>> org.springframework.http.ResponseEntity<Void> rejectPermission(UUID permissionId, @Valid RejectPermissionDto rejectDto) org.springframework.http.ResponseEntity<PermissionDto> updatePermission(@Valid PatchPermissionDto patchDto, UUID permissionId)
-
Constructor Details
-
PermissionController
@Autowired public PermissionController(PermissionService permissionService, ConnectionStatusService connectionStatusService, ConnectionStatusEventStream connectionStatusEventStream, EventStream eventStream, AuthService authService)
-
-
Method Details
-
getAllPermissions
@GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<List<PermissionDto>> getAllPermissions() throws InvalidUserException- Throws:
InvalidUserException
-
connectionStatusStream
@GetMapping(path="/connection-status-stream", produces="text/event-stream") public org.springframework.http.ResponseEntity<reactor.core.publisher.Flux<ConnectionStatusEventDto>> connectionStatusStream() throws InvalidUserException- Throws:
InvalidUserException
-
getAcceptedInboundPermissions
@GetMapping(path="/inbound/active", produces="application/json") public org.springframework.http.ResponseEntity<List<PermissionDto>> getAcceptedInboundPermissions() throws InvalidUserException- Throws:
InvalidUserException
-
fetchPermissionDetails
@PostMapping(value="/details", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<List<PendingPermissionDto>> fetchPermissionDetails(@Valid @RequestBody @Valid AiidaPermissionRequestsDto permissionRequests) throws PermissionAlreadyExistsException, DetailFetchingFailedException, InvalidUserException, ActiveFcaPermissionAlreadyExistsException, PermissionStartInThePastException, PermissionDataNeedTypeNotSupportedException, LimitDefaultsNotAllowedException -
acceptOutboundPermission
@PostMapping(value="/{permissionId}/accept/outbound", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<PermissionDto> acceptOutboundPermission(@PathVariable UUID permissionId, @Valid @RequestBody @Valid AcceptOutboundPermissionDto acceptDto) throws PermissionAlreadyExistsException, DetailFetchingFailedException, InvalidUserException, ActiveFcaPermissionAlreadyExistsException, PermissionStartInThePastException, PermissionDataNeedTypeNotSupportedException, LimitDefaultsNotAllowedException, InvalidOutboundPermissionException, DataSourceNotFoundException, IncompatibleDataSourceException, SecretStoringException - Throws:
PermissionAlreadyExistsExceptionDetailFetchingFailedExceptionInvalidUserExceptionActiveFcaPermissionAlreadyExistsExceptionPermissionStartInThePastExceptionPermissionDataNeedTypeNotSupportedExceptionLimitDefaultsNotAllowedExceptionInvalidOutboundPermissionExceptionDataSourceNotFoundExceptionIncompatibleDataSourceExceptionSecretStoringException
-
acceptInboundPermission
@PostMapping(value="/{permissionId}/accept/inbound", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<PermissionDto> acceptInboundPermission(@PathVariable UUID permissionId, @Valid @RequestBody @Valid AcceptInboundPermissionDto acceptDto) throws PermissionAlreadyExistsException, DetailFetchingFailedException, InvalidUserException, ActiveFcaPermissionAlreadyExistsException, PermissionStartInThePastException, PermissionDataNeedTypeNotSupportedException, LimitDefaultsNotAllowedException, InvalidInboundPermissionException, AssetNotAllowedException, SecretStoringException - Throws:
PermissionAlreadyExistsExceptionDetailFetchingFailedExceptionInvalidUserExceptionActiveFcaPermissionAlreadyExistsExceptionPermissionStartInThePastExceptionPermissionDataNeedTypeNotSupportedExceptionLimitDefaultsNotAllowedExceptionInvalidInboundPermissionExceptionAssetNotAllowedExceptionSecretStoringException
-
rejectPermission
@PostMapping(value="/{permissionId}/reject", consumes="application/json") public org.springframework.http.ResponseEntity<Void> rejectPermission(@PathVariable UUID permissionId, @Valid @RequestBody @Valid RejectPermissionDto rejectDto) throws PermissionAlreadyExistsException - Throws:
PermissionAlreadyExistsException
-
updatePermission
@PatchMapping(value="/{permissionId}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<PermissionDto> updatePermission(@Valid @RequestBody @Valid PatchPermissionDto patchDto, @PathVariable UUID permissionId) throws PermissionStateTransitionException, PermissionNotFoundException, UnauthorizedException, InvalidUserException, MissingInboundMessageFormatException, MissingDisplayNameException, InvalidInboundPermissionException, InboundDataSourceInUseException
-