Class CampaignController


  • @RestController
    @RequestMapping("/api/ui/campaign/v1")
    @CrossOrigin(origins="*")
    public class CampaignController
    extends Object
    • 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)