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
public abstract class AbstractRepeaterWithUniqueContentValidator extends AbstractContentValidator
Global validator for content. Check that every instance of the repeatergetRepeaterName()
have a different value ingetContentDataName()
.
-
-
Constructor Summary
Constructors Constructor Description AbstractRepeaterWithUniqueContentValidator()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract String
getContentDataName()
Get the content data name.protected abstract String
getErrorKey()
Get the error I18N key (parameterizable with "contentTitle" and "dataValueTitle").protected abstract String
getRepeaterName()
Get the repeater name.void
validate(Content content, Map<String,Object> values, View view, Errors errors)
Validates a content being editedvoid
validate(Content content, Errors errors)
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 Detail
-
AbstractRepeaterWithUniqueContentValidator
public AbstractRepeaterWithUniqueContentValidator()
-
-
Method Detail
-
validate
public void validate(Content content, Errors errors)
Description copied from interface:ContentValidator
Validates a content.- Parameters:
content
- the content to validateerrors
- the structure to populate if the validation failed.
-
validate
public void validate(Content content, Map<String,Object> values, View view, Errors errors)
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
protected abstract String getRepeaterName()
Get the repeater name.- Returns:
- The repeater name.
-
getContentDataName
protected abstract String getContentDataName()
Get the content data name.- Returns:
- The content data name.
-
getErrorKey
protected abstract String getErrorKey()
Get the error I18N key (parameterizable with "contentTitle" and "dataValueTitle").- Returns:
- The error 18N key.
-
-