@Test public void testValidate() { validator = new StringPatternValidator(ValidationScope.MAPPING, "Must match [^A-Za-z0-9_.]", "[^A-Za-z0-9_.]"); validator.validate("This. &* should result in an error", validations, "testValidate"); assertTrue(validationHelper.hasErrors()); validations.clear(); assertFalse(validationHelper.hasErrors()); validator.validate("This_isafineexample.whatever1223", validations, "testValidate-2"); assertFalse(validationHelper.hasErrors()); }
@Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); }
StringPatternValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } }
StringPatternValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern);  StringPatternValidator(ValidationScope scope, String violationMessage, String pattern, boolean useMatch); }
StringPatternValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern);  StringPatternValidator(ValidationScope scope, String violationMessage, String pattern, boolean useMatch); @Override boolean supports(Class<?> clazz); @Override void validate(Object target, List<Validation> validations, String id); @Override void validate(Object target, List<Validation> validations, String id, ValidationStatus status); }
StringPatternValidator implements AtlasValidator { @Override public void validate(Object target, List<Validation> validations, String id) { validate(target, validations, id, ValidationStatus.ERROR); } StringPatternValidator(ValidationScope scope, String violationMessage, String pattern);  StringPatternValidator(ValidationScope scope, String violationMessage, String pattern, boolean useMatch); @Override boolean supports(Class<?> clazz); @Override void validate(Object target, List<Validation> validations, String id); @Override void validate(Object target, List<Validation> validations, String id, ValidationStatus status);  }