Class DataSetController
- java.lang.Object
-
- com.chutneytesting.component.dataset.api.DataSetController
-
@RestController @RequestMapping("/api/v1/datasets") @CrossOrigin(origins="*") public class DataSetController extends Object
-
-
Constructor Summary
Constructors Constructor Description DataSetController(DataSetRepository dataSetRepository, DataSetHistoryRepository dataSetHistoryRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<DataSetDto>allVersionNumbers(String dataSetId)voiddeleteById(String dataSetId)List<DataSetDto>findAll()DataSetDtofindById(String dataSetId)IntegerlastVersionNumber(String dataSetId)DataSetDtosave(DataSetDto dataSetDto)DataSetDtoupdate(DataSetDto dataSetDto)DataSetDtoversion(String dataSetId, Integer version)
-
-
-
Field Detail
-
BASE_URL
public static final String BASE_URL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DataSetController
public DataSetController(DataSetRepository dataSetRepository, DataSetHistoryRepository dataSetHistoryRepository)
-
-
Method Detail
-
findAll
@PreAuthorize("hasAuthority(\'DATASET_READ\') or hasAuthority(\'SCENARIO_WRITE\') or hasAuthority(\'CAMPAIGN_WRITE\')") @GetMapping(path="", produces="application/json") public List<DataSetDto> findAll()
-
save
@PreAuthorize("hasAuthority(\'DATASET_WRITE\')") @PostMapping(path="", produces="application/json") public DataSetDto save(@RequestBody DataSetDto dataSetDto)
-
update
@PreAuthorize("hasAuthority(\'DATASET_WRITE\')") @PutMapping(path="", produces="application/json") public DataSetDto update(@RequestBody DataSetDto dataSetDto)
-
deleteById
@PreAuthorize("hasAuthority(\'DATASET_WRITE\')") @DeleteMapping(path="/{dataSetId}") public void deleteById(@PathVariable String dataSetId)
-
findById
@PreAuthorize("hasAuthority(\'DATASET_READ\')") @GetMapping(path="/{dataSetId}", produces="application/json") public DataSetDto findById(@PathVariable String dataSetId)
-
lastVersionNumber
@PreAuthorize("hasAuthority(\'DATASET_READ\')") @GetMapping(path="/{dataSetId}/versions/last", produces="application/json") public Integer lastVersionNumber(@PathVariable String dataSetId)
-
allVersionNumbers
@PreAuthorize("hasAuthority(\'DATASET_READ\')") @GetMapping(path="/{dataSetId}/versions", produces="application/json") public List<DataSetDto> allVersionNumbers(@PathVariable String dataSetId)
-
version
@PreAuthorize("hasAuthority(\'DATASET_READ\')") @GetMapping(path={"/{dataSetId}/{version}","/{dataSetId}/versions/{version}"}, produces="application/json") public DataSetDto version(@PathVariable String dataSetId, @PathVariable Integer version)
-
-