Search in sources :

Example 1 with SchemaVersionValidator

use of org.alfresco.util.schemacomp.validator.SchemaVersionValidator in project alfresco-repository by Alfresco.

the class Schema method addDefaultValidators.

/**
 * Add a set of validators that should be present by default on Schema objects.
 */
private void addDefaultValidators() {
    // We expect the user's database to have a different schema name to the reference schema.
    NameValidator nameValidator = new NameValidator();
    nameValidator.setPattern(Pattern.compile(".*"));
    getValidators().add(nameValidator);
    // The schema version shouldn't have to match exactly.
    SchemaVersionValidator versionValidator = new SchemaVersionValidator();
    getValidators().add(versionValidator);
}
Also used : NameValidator(org.alfresco.util.schemacomp.validator.NameValidator) SchemaVersionValidator(org.alfresco.util.schemacomp.validator.SchemaVersionValidator)

Aggregations

NameValidator (org.alfresco.util.schemacomp.validator.NameValidator)1 SchemaVersionValidator (org.alfresco.util.schemacomp.validator.SchemaVersionValidator)1