class RuleFactory {

    public List<Rule> parseRules(Buffer buffer) throws ValidationException {
        String replacedConfig;
        try {
            replacedConfig = StringUtils.replaceWildcardConfigs(buffer.toString("UTF-8"), properties);
        } catch (Exception e) {
            throw new ValidationException(e);
        }
        ValidationResult validationResult = Validator.validateStatic(Buffer.buffer(replacedConfig), routingRulesSchema, log);
        if (validationResult.isSuccess()) {
            return createRules(new JsonObject(replacedConfig));
        } else {
            throw new ValidationException(validationResult);
        }
    }

    public  RuleFactory(Map<String, Object> properties, String routingRulesSchema);

}