use of org.ow2.proactive.scheduler.common.job.factories.spi.model.validator.RegexpValidator in project scheduling by ow2-proactive.
the class RegexpParserValidator method createValidator.
@Override
protected Validator<String> createValidator(String model, Converter<String> converter) throws ModelSyntaxException {
String regexpRegexp = "^" + REGEXP_TYPE_REGEXP + LEFT_DELIMITER_REGEXP + "(.+)" + RIGHT_DELIMITER_REGEXP + "$";
String regexpString = parseAndGetOneGroup(model, regexpRegexp);
try {
return new RegexpValidator(regexpString);
} catch (PatternSyntaxException e) {
throw new ModelSyntaxException(e.getMessage(), e);
}
}
Aggregations