Class 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 Details

  • Method Details

    • validate

      public void validate(Content content, Errors errors)
      Description copied from interface: ContentValidator
      Validates a content.
      Parameters:
      content - the content to validate
      errors - 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 validate
      values - the values being set
      view - the view
      errors - 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.