Package com.chutneytesting.campaign.api
Class CampaignController
- java.lang.Object
-
- com.chutneytesting.campaign.api.CampaignController
-
@RestController @RequestMapping("/api/ui/campaign/v1") @CrossOrigin(origins="*") public class CampaignController extends Object
-
-
Constructor Summary
Constructors Constructor Description CampaignController(TestCaseRepositoryAggregator repositoryAggregator, CampaignRepository campaignRepository, CampaignExecutionEngine campaignExecutionEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteCampaign(Long campaignId)List<CampaignDto>getAllCampaigns()CampaignDtogetCampaignById(Long campaignId)List<CampaignDto>getCampaignsByScenarioId(String scenarioId)List<TestCaseIndexDto>getCampaignScenarios(Long campaignId)List<CampaignExecutionReportDto>getLastExecutions(Long limit)CampaignDtosaveCampaign(CampaignDto campaign)CampaignDtoupdateCampaign(CampaignDto campaign)
-
-
-
Constructor Detail
-
CampaignController
public CampaignController(TestCaseRepositoryAggregator repositoryAggregator, CampaignRepository campaignRepository, CampaignExecutionEngine campaignExecutionEngine)
-
-
Method Detail
-
saveCampaign
@PreAuthorize("hasAuthority(\'CAMPAIGN_WRITE\')") @PostMapping(path="", consumes="application/json", produces="application/json") public CampaignDto saveCampaign(@RequestBody CampaignDto campaign)
-
updateCampaign
@PreAuthorize("hasAuthority(\'CAMPAIGN_WRITE\')") @PutMapping(path="", consumes="application/json", produces="application/json") public CampaignDto updateCampaign(@RequestBody CampaignDto campaign)
-
deleteCampaign
@PreAuthorize("hasAuthority(\'CAMPAIGN_WRITE\')") @DeleteMapping(path="/{campaignId}", produces="application/json") public boolean deleteCampaign(@PathVariable("campaignId") Long campaignId)
-
getCampaignById
@PreAuthorize("hasAuthority(\'CAMPAIGN_READ\')") @GetMapping(path="/{campaignId}", produces="application/json") public CampaignDto getCampaignById(@PathVariable("campaignId") Long campaignId)
-
getCampaignScenarios
@PreAuthorize("hasAuthority(\'CAMPAIGN_READ\')") @GetMapping(path="/{campaignId}/scenarios", produces="application/json") public List<TestCaseIndexDto> getCampaignScenarios(@PathVariable("campaignId") Long campaignId)
-
getAllCampaigns
@PreAuthorize("hasAuthority(\'CAMPAIGN_READ\')") @GetMapping(path="", produces="application/json") public List<CampaignDto> getAllCampaigns()
-
getLastExecutions
@PreAuthorize("hasAuthority(\'CAMPAIGN_READ\')") @GetMapping(path="/lastexecutions/{limit}", produces="application/json") public List<CampaignExecutionReportDto> getLastExecutions(@PathVariable("limit") Long limit)
-
getCampaignsByScenarioId
@PreAuthorize("hasAuthority(\'SCENARIO_READ\')") @GetMapping(path="/scenario/{scenarioId}", produces="application/json") public List<CampaignDto> getCampaignsByScenarioId(@PathVariable("scenarioId") String scenarioId)
-
-