Class ListValueValidator
- java.lang.Object
-
- fr.paris.lutece.plugins.forms.validation.AbstractValidator
-
- fr.paris.lutece.plugins.forms.validation.ListValueValidator
-
- All Implemented Interfaces:
ICustomImportableControl,IValidator
public class ListValueValidator extends AbstractValidator implements ICustomImportableControl
Validator to verify the exact value of a response
-
-
Constructor Summary
Constructors Constructor Description ListValueValidator(java.lang.String strValidatorName, java.lang.String strValidatorDisplayName, java.util.List<java.lang.String> listAvailableEntryType)Constructor of the PatternValidator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetDisplayHtml(Control control)java.lang.StringgetJavascriptControlValue(Control control)java.lang.StringgetJavascriptValidation()Only the content of the function should be returned.java.util.List<java.lang.String>getListAvailableEntryType()java.lang.StringgetNewValidatorValue(Control oldControl, java.util.Map<java.lang.Integer,java.lang.Integer> mapIdFields)from the imported control find the new control valuejava.lang.StringgetValidatorBeanName()java.lang.StringgetValidatorDisplayName()booleanvalidate(FormQuestionResponse questionResponse, Control control)-
Methods inherited from class fr.paris.lutece.plugins.forms.validation.AbstractValidator
validate
-
-
-
-
Constructor Detail
-
ListValueValidator
public ListValueValidator(java.lang.String strValidatorName, java.lang.String strValidatorDisplayName, java.util.List<java.lang.String> listAvailableEntryType)Constructor of the PatternValidator- Parameters:
strValidatorName- The validator bean namestrValidatorDisplayName- The validator display namelistAvailableEntryType- The list of available entrytype
-
-
Method Detail
-
getValidatorBeanName
public java.lang.String getValidatorBeanName()
- Specified by:
getValidatorBeanNamein interfaceIValidator- Overrides:
getValidatorBeanNamein classAbstractValidator- Returns:
- the validator bean name
-
getValidatorDisplayName
public java.lang.String getValidatorDisplayName()
- Specified by:
getValidatorDisplayNamein interfaceIValidator- Overrides:
getValidatorDisplayNamein classAbstractValidator- Returns:
- the validator display name
-
getDisplayHtml
public java.lang.String getDisplayHtml(Control control)
- Specified by:
getDisplayHtmlin interfaceIValidator- Overrides:
getDisplayHtmlin classAbstractValidator- Parameters:
control- The control to build model- Returns:
- the HTML to display
-
getListAvailableEntryType
public java.util.List<java.lang.String> getListAvailableEntryType()
- Specified by:
getListAvailableEntryTypein interfaceIValidator- Overrides:
getListAvailableEntryTypein classAbstractValidator- Returns:
- the list of available entrytype for this validator
-
validate
public boolean validate(FormQuestionResponse questionResponse, Control control)
- Specified by:
validatein interfaceIValidator- Parameters:
questionResponse- The response to controlcontrol- The control to verify- Returns:
- boolean that indicate the validation result
-
getJavascriptValidation
public java.lang.String getJavascriptValidation()
Description copied from interface:IValidatorOnly the content of the function should be returned. The parameter names are in FormsConstants, JS_PARAMETER_INPUT_VALUE and JS_PARAMETER_CONTROL_VALUE- Specified by:
getJavascriptValidationin interfaceIValidator- Overrides:
getJavascriptValidationin classAbstractValidator- Returns:
- the javascript validation code for Conditional display control
-
getJavascriptControlValue
public java.lang.String getJavascriptControlValue(Control control)
- Specified by:
getJavascriptControlValuein interfaceIValidator- Overrides:
getJavascriptControlValuein classAbstractValidator- Parameters:
control- The control- Returns:
- the control value needed for javascript
-
getNewValidatorValue
public java.lang.String getNewValidatorValue(Control oldControl, java.util.Map<java.lang.Integer,java.lang.Integer> mapIdFields)
Description copied from interface:ICustomImportableControlfrom the imported control find the new control value- Specified by:
getNewValidatorValuein interfaceICustomImportableControl- Parameters:
oldControl- import controlmapIdFields- map of the old field id to find the new field id- Returns:
- the new control value
-
-