Class AbstractRepeaterWithUniqueContentValidator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.contenttype.validation.AbstractContentValidator
org.ametys.plugins.odfpilotage.validator.AbstractRepeaterWithUniqueContentValidator
- All Implemented Interfaces:
ContentValidator
,LogEnabled
- Direct Known Subclasses:
NormeValidator
,PotentielEnseignantValidator
Global validator for content.
Check that every instance of the repeater
getRepeaterName()
have a different value in getContentDataName()
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract String
Get the content data name.protected abstract String
Get the error I18N key (parameterizable with "contentTitle" and "dataValueTitle").protected abstract String
Get the repeater name.void
Validates a content being editedvoid
Validates a content.Methods inherited from class org.ametys.cms.contenttype.validation.AbstractContentValidator
getContentType, setContentType
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
AbstractRepeaterWithUniqueContentValidator
-
-
Method Details
-
validate
Description copied from interface:ContentValidator
Validates a content.- Parameters:
content
- the content to validateerrors
- the structure to populate if the validation failed.
-
validate
Description copied from interface:ContentValidator
Validates a content being edited- Parameters:
content
- the content to validatevalues
- the values being setview
- the viewerrors
- the structure to populate if the validation failed.
-
getRepeaterName
Get the repeater name.- Returns:
- The repeater name.
-
getContentDataName
Get the content data name.- Returns:
- The content data name.
-
getErrorKey
Get the error I18N key (parameterizable with "contentTitle" and "dataValueTitle").- Returns:
- The error 18N key.
-