Class DataSetController
java.lang.Object
com.chutneytesting.component.dataset.api.DataSetController
@RestController
@RequestMapping("/api/v1/datasets")
@CrossOrigin(origins="*")
public class DataSetController
extends Object
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataSetController(DataSetRepository dataSetRepository, DataSetHistoryRepository dataSetHistoryRepository) -
Method Summary
Modifier and TypeMethodDescriptionallVersionNumbers(String dataSetId) voiddeleteById(String dataSetId) findAll()lastVersionNumber(String dataSetId) save(DataSetDto dataSetDto) update(DataSetDto dataSetDto)
-
Field Details
-
BASE_URL
- See Also:
-
-
Constructor Details
-
DataSetController
public DataSetController(DataSetRepository dataSetRepository, DataSetHistoryRepository dataSetHistoryRepository)
-
-
Method Details
-
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
-
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)
-