Class AbstractNamedValidator

java.lang.Object
com.e1c.langtool.v8.dt.validation.AbstractNamedValidator
All Implemented Interfaces:
FeatureValueValidator
Direct Known Subclasses:
CamelCaseContentValidator, CamelCaseFeatureValidator

public abstract class AbstractNamedValidator extends Object implements FeatureValueValidator
  • Field Details

  • Constructor Details

    • AbstractNamedValidator

      public AbstractNamedValidator()
  • Method Details

    • isValidName

      protected static boolean isValidName(String value)
    • isValidFeatureSettings

      protected abstract boolean isValidFeatureSettings(FeatureSettings featureSettings)
    • isValid

      public org.eclipse.core.runtime.IStatus isValid(String value, FeatureValueValidator.ValidationContext context)
      Description copied from interface: FeatureValueValidator
      Returns a string indicating whether the given value is valid; null means valid, and non-null means invalid, with the result being the error message to display to the end user.

      It is the responsibility of the implementor to fully format the message before returning it.

      Specified by:
      isValid in interface FeatureValueValidator
      Parameters:
      value - the translated value to be validated
      Returns:
      the error message, or null indicating that the value is valid
    • preprocessValue

      public String preprocessValue(String value, FeatureValueValidator.ValidationContext context)
      Description copied from interface: FeatureValueValidator
      Preprocess the value before validation and set to translation storage.
      Specified by:
      preprocessValue in interface FeatureValueValidator
      Parameters:
      value - the value to be processing
      context - the context
      Returns:
      the processed string value