Package groovy.text

Examples of groovy.text.GStringTemplateEngine


    private TemplateEngine templateEngine;

    public GSPScriptEngine(ScriptEngineFactory scriptEngineFactory, ClassLoader classLoader) {
        super(scriptEngineFactory);
        this.templateEngine = new GStringTemplateEngine(classLoader);
    }
View Full Code Here


        this.envVars = new HashMap(envVars);
        this.envVars.remove("PATH");
    }

    public Map getConfig() {
        GStringTemplateEngine engine = new GStringTemplateEngine();
        String yaml = null;

        try {
            yaml = engine.createTemplate(config).make(new MissingPropForwardingMap(envVars)).toString();
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return (Map) new Yaml().load(yaml);
    }
View Full Code Here

        this.packageTemplatePaths = Arrays.asList(packageTemplates);
        this.classTemplatePaths = Arrays.asList(classTemplates);
        this.docTemplates = new HashMap<String, Template>();
        this.packageTemplates = new HashMap<String, Template>();
        this.classTemplates = new HashMap<String, Template>();
        engine = new GStringTemplateEngine();

    }
View Full Code Here

    this.packageTemplatePaths = Arrays.asList(packageTemplates);
    this.classTemplatePaths = Arrays.asList(classTemplates);
    this.docTemplates = new HashMap();
    this.packageTemplates = new HashMap();
    this.classTemplates = new HashMap();
    engine = new GStringTemplateEngine();
   
  }
View Full Code Here

        this.packageTemplatePaths = Arrays.asList(packageTemplates);
        this.classTemplatePaths = Arrays.asList(classTemplates);
        this.docTemplates = new HashMap<String, Template>();
        this.packageTemplates = new HashMap<String, Template>();
        this.classTemplates = new HashMap<String, Template>();
        engine = new GStringTemplateEngine();

    }
View Full Code Here

    return template(name, Collections.<String, Object> emptyMap());
  }

  public static String template(String name, Map<String, ?> model) throws IOException,
      CompilationFailedException, ClassNotFoundException {
    return template(new GStringTemplateEngine(), name, model);
  }
View Full Code Here

TOP

Related Classes of groovy.text.GStringTemplateEngine

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.