Class AbstractDbValidator

java.lang.Object
org.alfresco.util.schemacomp.validator.AbstractDbValidator
All Implemented Interfaces:
DbValidator
Direct Known Subclasses:
NullValidator, SchemaVersionValidator

public abstract class AbstractDbValidator extends Object implements DbValidator
Base class providing DbValidator support.
Author:
Matt Ward
  • Constructor Details

    • AbstractDbValidator

      public AbstractDbValidator()
  • Method Details

    • setProperty

      public void setProperty(String name, String value)
      Description copied from interface: DbValidator
      Set a property used by this validator. Validator properties provided in the schema reference XML files will be set on the validator using this method.
      Specified by:
      setProperty in interface DbValidator
      Parameters:
      name - String
      value - String
    • getProperty

      public String getProperty(String name)
      Description copied from interface: DbValidator
      Get the current value of a validator property, as set using DbValidator.setProperty(String, String).
      Specified by:
      getProperty in interface DbValidator
      Parameters:
      name - String
      Returns:
      String
    • getPropertyNames

      public Set<String> getPropertyNames()
      Description copied from interface: DbValidator
      Get the complete set of validator properties in use.
      Specified by:
      getPropertyNames in interface DbValidator
    • validates

      public boolean validates(String fieldName)
      Description copied from interface: DbValidator
      Ask whether the database object's validator is responsible for validating the specified field name. This only applies to simple properties - not DbObject instances which should provide their own validators.
      Specified by:
      validates in interface DbValidator
      Parameters:
      fieldName - String
      Returns:
      boolean
    • validatesFullObject

      public boolean validatesFullObject()
      Description copied from interface: DbValidator
      Asks whether the database object's validator is responsible for validating the entire DbObject. If true, then differences are not reported (e.g. table missing from database) as it is the validator's role to worry about presence. If validation and differences are required then report false - even if the validator works at the full object (rather than property) level.
      Specified by:
      validatesFullObject in interface DbValidator
      Returns:
      true if missing or unexpected database objects should not be reported by differencing logic.
    • setFieldsToValidate

      protected void setFieldsToValidate(Set<String> fieldsToValidate)
    • addFieldToValidate

      protected void addFieldToValidate(String fieldName)