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 Details

  • Constructor Details

    • DataNeedsManagementController

      public DataNeedsManagementController(DataNeedsDbService service, @Value("${eddie.management.server.urlprefix}") String basePath)
  • Method Details

    • createNewDataNeed

      @PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<DataNeed> createNewDataNeed(@Validated @RequestBody DataNeed newDataNeed)
    • getAllDataNeeds

      @GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<List<DataNeed>> 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