Examples of TemplateConfiguration


Examples of groovy.text.markup.TemplateConfiguration

  }

  public class TestTemplateEngine extends MarkupTemplateEngine {

    public TestTemplateEngine() {
      super(new TemplateConfiguration());
    }
View Full Code Here

Examples of groovy.text.markup.TemplateConfiguration

    TemplateEngine engine = this.configurer.getTemplateEngine();
    assertNotNull(engine);
    assertEquals(MarkupTemplateEngine.class, engine.getClass());

    MarkupTemplateEngine markupEngine = (MarkupTemplateEngine) engine;
    TemplateConfiguration configuration = markupEngine.getTemplateConfiguration();
    assertNotNull(configuration);
    assertEquals(GroovyMarkupConfigurer.class, configuration.getClass());
  }
View Full Code Here

Examples of groovy.text.markup.TemplateConfiguration

    TemplateEngine engine = this.configurer.getTemplateEngine();
    assertNotNull(engine);
    assertEquals(MarkupTemplateEngine.class, engine.getClass());

    MarkupTemplateEngine markupEngine = (MarkupTemplateEngine) engine;
    TemplateConfiguration configuration = markupEngine.getTemplateConfiguration();
    assertNotNull(configuration);
    assertFalse(configuration.isCacheTemplates());
  }
View Full Code Here

Examples of groovy.text.markup.TemplateConfiguration

  }

  private class TestTemplateEngine extends MarkupTemplateEngine {

    public TestTemplateEngine() {
      super(new TemplateConfiguration());
    }
View Full Code Here

Examples of groovy.text.markup.TemplateConfiguration

  @SuppressWarnings("UnusedDeclaration")
  @Provides
  @Singleton
  MarkupTemplateEngine provideTemplateEngine(LaunchConfig launchConfig, Config config) {
    ClassLoader parent = getClass().getClassLoader();
    TemplateConfiguration effectiveConfiguration = new TemplateConfiguration(config);
    effectiveConfiguration.setCacheTemplates(config.isCacheTemplates()); // not copied by constructor
    Path templatesDir = launchConfig.getBaseDir().file(config.getTemplatesDirectory());
    return new MarkupTemplateEngine(parent, effectiveConfiguration, new CachingTemplateResolver(templatesDir));
  }
View Full Code Here

Examples of org.megatome.frame2.template.config.TemplateConfiguration

public class TemplateConfigFactory {

   private static TemplateConfigurationInterface instance;

   public static void loadTemplateFile(ServletContext context, String fileName, String configDir) throws TemplateException{
      TemplateConfiguration config = new TemplateConfiguration();
      config.setConfigDir(configDir);
      InputStream is = context.getResourceAsStream(configDir + fileName);
      config.loadTemplateFile(is);
      config.validateTemplateFiles(context);
      instance = config;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.