public class CandidatesValidator extends DefaultValidator
Modifier and Type | Field and Description |
---|---|
protected HierarchicalReferenceTablesHelper |
_hierarchicalReferenceTablesHelper
The helper component for hierarchical reference tables
|
protected AmetysObjectResolver |
_resolver
Ametys resolver
|
_invalidText, _isMandatory, _pluginName, _regexp, _smanager
Constructor and Description |
---|
CandidatesValidator() |
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 HierarchicalReferenceTablesHelper _hierarchicalReferenceTablesHelper
public CandidatesValidator()
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