Class CampaignController

java.lang.Object
fr.enedis.chutney.campaign.api.CampaignController

@RestController @RequestMapping("/api/ui/campaign/v1") public class CampaignController extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • 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)
    • getCampaignExecutionReportById

      @PreAuthorize("hasAuthority(\'CAMPAIGN_READ\')") @GetMapping(path="/execution/{campaignExecutionId}", produces="application/json") public CampaignExecutionFullReportDto getCampaignExecutionReportById(@PathVariable("campaignExecutionId") Long campaignExecutionId)
    • 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)