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);
}
Aggregations