Class DataNeedsManagementController
java.lang.Object
energy.eddie.dataneeds.web.management.DataNeedsManagementController
@RestController
@RequestMapping(path="${eddie.management.server.urlprefix}",
produces="application/json")
@ConditionalOnProperty(value="eddie.data-needs-config.data-need-source",
havingValue="DATABASE")
public class DataNeedsManagementController
extends Object
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<DataNeed> createNewDataNeed(DataNeed newDataNeed) org.springframework.http.ResponseEntity<String> deleteDataNeed(String id) org.springframework.http.ResponseEntity<Void> enableOrDisableDataNeed(String id, EnableDisableBody enableDisableBody) org.springframework.http.ResponseEntity<DataNeed> getDataNeed(String id)
-
Field Details
-
BASE_PATH_KEY
- See Also:
-
basePath
-
-
Constructor Details
-
DataNeedsManagementController
public DataNeedsManagementController(DataNeedsDbService service, @Value("${eddie.management.server.urlprefix}") String basePath)
-
-
Method Details
-
createNewDataNeed
-
getAllDataNeeds
-
getDataNeed
@GetMapping(value="/{id}", produces="application/json") public org.springframework.http.ResponseEntity<DataNeed> getDataNeed(@PathVariable String id) throws DataNeedNotFoundException - Throws:
DataNeedNotFoundException
-
deleteDataNeed
@DeleteMapping(value="/{id}", produces="application/json") public org.springframework.http.ResponseEntity<String> deleteDataNeed(@PathVariable String id) throws DataNeedNotFoundException - Throws:
DataNeedNotFoundException
-
enableOrDisableDataNeed
@PatchMapping(value="/{id}", consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<Void> enableOrDisableDataNeed(@PathVariable String id, @RequestBody EnableDisableBody enableDisableBody) throws DataNeedNotFoundException - Throws:
DataNeedNotFoundException
-