public class TermsValidator extends DefaultValidator
Modifier and Type | Field and Description |
---|---|
protected AmetysObjectResolver |
_resolver
Ametys resolver
|
protected ThesaurusDAO |
_thesaurusDAO
Thesaurus DAO
|
_invalidText, _isMandatory, _pluginName, _regexp, _smanager
Constructor and Description |
---|
TermsValidator() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_hasOnlyCandidates(Object[] values) |
protected boolean |
_hasOnlyContentCandidates(Content[] contents)
Indicates if the array of contents contains only candidates
|
protected void |
_validateSingleContent(Content content,
Errors errors)
Validate a single content (true if not a candidate)
|
void |
service(ServiceManager manager) |
protected void |
validateArrayValues(Object[] values,
Errors errors)
Validates a array of values.
|
protected void |
validateSingleValue(Object value,
Errors errors)
Validates a single value.
|
configure, getConfiguration, setPluginInfo, validate
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected AmetysObjectResolver _resolver
protected ThesaurusDAO _thesaurusDAO
public TermsValidator()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class DefaultValidator
ServiceException
protected void validateSingleValue(Object value, Errors errors)
DefaultValidator
validateSingleValue
in class DefaultValidator
value
- the value to validate (can be null
).errors
- the structure to populate if the validation failed.protected void _validateSingleContent(Content content, Errors errors)
content
- the contenterrors
- the list of errors (see Errors
)protected void validateArrayValues(Object[] values, Errors errors)
DefaultValidator
validateArrayValues
in class DefaultValidator
values
- the values to validateerrors
- the structure to populate if the validation failed.private boolean _hasOnlyCandidates(Object[] values)
protected boolean _hasOnlyContentCandidates(Content[] contents)
contents
- the list of content