Package energy.eddie.aiida.web
Class DataSourceController
java.lang.Object
energy.eddie.aiida.web.DataSourceController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DataSourceSecretsDto> addDataSource(DataSourceDto dataSource) org.springframework.http.ResponseEntity<Void> deleteDataSource(UUID dataSourceId) org.springframework.http.ResponseEntity<List<DataSource>> org.springframework.http.ResponseEntity<List<DataSource>> org.springframework.http.ResponseEntity<Map<String, AiidaAsset[]>> org.springframework.http.ResponseEntity<DataSource> getDataSourceById(UUID dataSourceId) org.springframework.http.ResponseEntity<Map<String, DataSourceIcon[]>> getIcons()org.springframework.http.ResponseEntity<DataSourceSecretsDto> regenerateSecrets(UUID dataSourceId) org.springframework.http.ResponseEntity<DataSource> updateDataSource(UUID dataSourceId, DataSourceDto dataSource) org.springframework.http.ResponseEntity<Void> updateEnabledState(UUID dataSourceId, Boolean enabled)
-
Constructor Details
-
DataSourceController
-
-
Method Details
-
getOutboundDataSourceTypes
-
getAssets
@GetMapping("/assets") public org.springframework.http.ResponseEntity<Map<String,AiidaAsset[]>> getAssets() -
getIcons
@GetMapping("/icons") public org.springframework.http.ResponseEntity<Map<String,DataSourceIcon[]>> getIcons() -
getAllOutboundDataSources
@GetMapping(path="/outbound", produces="application/json") public org.springframework.http.ResponseEntity<List<DataSource>> getAllOutboundDataSources() throws InvalidUserException- Throws:
InvalidUserException
-
getAllInboundDataSources
@GetMapping(path="/inbound", produces="application/json") public org.springframework.http.ResponseEntity<List<DataSource>> getAllInboundDataSources() throws InvalidUserException- Throws:
InvalidUserException
-
addDataSource
@PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DataSourceSecretsDto> addDataSource(@RequestBody DataSourceDto dataSource) throws InvalidUserException, ModbusConnectionException, SinapsiAlflaEmptyConfigException -
deleteDataSource
-
updateDataSource
@PatchMapping(value="{id}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DataSource> updateDataSource(@PathVariable("id") UUID dataSourceId, @RequestBody DataSourceDto dataSource) throws ModbusConnectionException, DataSourceNotFoundException -
getDataSourceById
@GetMapping("/{id}") public org.springframework.http.ResponseEntity<DataSource> getDataSourceById(@PathVariable("id") UUID dataSourceId) throws DataSourceNotFoundException - Throws:
DataSourceNotFoundException
-
updateEnabledState
@PatchMapping(value="{id}/enabled", consumes="application/json") public org.springframework.http.ResponseEntity<Void> updateEnabledState(@PathVariable("id") UUID dataSourceId, @RequestBody Boolean enabled) throws DataSourceNotFoundException - Throws:
DataSourceNotFoundException
-
regenerateSecrets
@PostMapping("{id}/regenerate-secrets") public org.springframework.http.ResponseEntity<DataSourceSecretsDto> regenerateSecrets(@PathVariable("id") UUID dataSourceId) throws DataSourceNotFoundException, DataSourceSecretGenerationNotSupportedException
-