Class ParameterForm
- java.lang.Object
-
- uk.ac.warwick.dcs.sherlock.module.web.data.models.forms.ParameterForm
-
public class ParameterForm extends java.lang.Object
The form for changing parameters on a template detector
-
-
Constructor Summary
Constructors Constructor Description ParameterForm()
ParameterForm(DetectorWrapper detectorWrapper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Float>
getParameters()
java.util.Map<java.lang.String,java.lang.Float>
getPostprocessing()
void
setParameters(java.util.Map<java.lang.String,java.lang.Float> parameters)
void
setPostprocessing(java.util.Map<java.lang.String,java.lang.Float> parameters)
org.springframework.validation.BindingResult
validate(org.springframework.validation.BindingResult result, java.util.List<AdjustableParameterObj> parameterObjList, boolean post)
Loops through all of the parameters in the form to check the following: - That the parameter exists for the detector - That the min bound, max bound and step restrictions are respected If any conditions are not met, add errors to the binding result objectorg.springframework.validation.BindingResult
validate(org.springframework.validation.BindingResult result, java.util.List<AdjustableParameterObj> parameterObjList, java.util.List<AdjustableParameterObj> postprocessingObjList)
-
-
-
Constructor Detail
-
ParameterForm
public ParameterForm()
-
ParameterForm
public ParameterForm(DetectorWrapper detectorWrapper) throws DetectorNotFound
- Throws:
DetectorNotFound
-
-
Method Detail
-
getParameters
public java.util.Map<java.lang.String,java.lang.Float> getParameters()
-
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.Float> parameters)
-
getPostprocessing
public java.util.Map<java.lang.String,java.lang.Float> getPostprocessing()
-
setPostprocessing
public void setPostprocessing(java.util.Map<java.lang.String,java.lang.Float> parameters)
-
validate
public org.springframework.validation.BindingResult validate(org.springframework.validation.BindingResult result, java.util.List<AdjustableParameterObj> parameterObjList, java.util.List<AdjustableParameterObj> postprocessingObjList)
-
validate
public org.springframework.validation.BindingResult validate(org.springframework.validation.BindingResult result, java.util.List<AdjustableParameterObj> parameterObjList, boolean post)
Loops through all of the parameters in the form to check the following: - That the parameter exists for the detector - That the min bound, max bound and step restrictions are respected If any conditions are not met, add errors to the binding result object- Parameters:
result
- the result holder for a DataBinderpost
-parameterObjList
- the list of parameters to validate the form against- Returns:
- the updated results holder
-
-