Class DetectorController


  • @Controller
    public class DetectorController
    extends java.lang.Object
    The controller that deals with the template detector pages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String parametersPost​(@Valid ParameterForm parameterForm, org.springframework.validation.BindingResult result, DetectorWrapper detectorWrapper, org.springframework.ui.Model model)
      Handles POST request to the detector parameter page
      java.lang.String parmetersGet​(DetectorWrapper detectorWrapper, org.springframework.ui.Model model)
      Handles GET requests to the detector parameter page
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DetectorController

        public DetectorController()
    • 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 DetectorNotFound
        Handles GET requests to the detector parameter page
        Parameters:
        detectorWrapper - the detector being managed
        model - 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,
                                               NotTemplateOwner
        Handles POST request to the detector parameter page
        Parameters:
        parameterForm - the form that should be submitted in the request
        result - the results of the validation on the form above
        detectorWrapper - the detector being managed
        model - holder for model attributes
        Returns:
        the path to the parameter template
        Throws:
        DetectorNotFound - if the detector was not found
        NotTemplateOwner