Class DetectorController
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.controllers.dashboard.template.DetectorController
-
@Controller public class DetectorController extends java.lang.ObjectThe controller that deals with the template detector pages
-
-
Constructor Summary
Constructors Constructor Description DetectorController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringparametersPost(@Valid ParameterForm parameterForm, org.springframework.validation.BindingResult result, DetectorWrapper detectorWrapper, org.springframework.ui.Model model)Handles POST request to the detector parameter pagejava.lang.StringparmetersGet(DetectorWrapper detectorWrapper, org.springframework.ui.Model model)Handles GET requests to the detector parameter page
-
-
-
Method Detail
-
parmetersGet
@GetMapping("/dashboard/templates/manage/detectors/{pathid}/parameters") public java.lang.String parmetersGet(@ModelAttribute("detector") DetectorWrapper detectorWrapper, org.springframework.ui.Model model) throws DetectorNotFoundHandles GET requests to the detector parameter page- Parameters:
detectorWrapper- the detector being managedmodel- holder for model attributes- Returns:
- the path of the parameter template
- Throws:
DetectorNotFound- if the detector was not found
-
parametersPost
@PostMapping("/dashboard/templates/manage/detectors/{pathid}/parameters") public java.lang.String parametersPost(@Valid @ModelAttribute @Valid ParameterForm parameterForm, org.springframework.validation.BindingResult result, @ModelAttribute("detector") DetectorWrapper detectorWrapper, org.springframework.ui.Model model) throws DetectorNotFound, NotTemplateOwnerHandles POST request to the detector parameter page- Parameters:
parameterForm- the form that should be submitted in the requestresult- the results of the validation on the form abovedetectorWrapper- the detector being managedmodel- holder for model attributes- Returns:
- the path to the parameter template
- Throws:
DetectorNotFound- if the detector was not foundNotTemplateOwner
-
-