@Test public void testLoad() { final DirectoryTemplateLoader loader = new DirectoryTemplateLoader(new File(".")); try { TemplateFactory f = loader.newTemplateFactory("kitchensink.html", new TemplateModifier() { public void modifyTemplate(TemplateDocument doc) { FragmentList list = new FragmentList(Expressions.cambridgeExpressionLanguage); list.add(new StaticFragment("This is a test")); try { doc.getElementById("email").addChild(new IncludeNode(loader, "a.html", Expressions.cambridgeExpressionLanguage, "#s")); } catch (TemplateLoadingException e) { e.printStackTrace(); } catch (BehaviorInstantiationException e) { e.printStackTrace(); } } }, Expressions.cambridgeExpressionLanguage); Template t = f.createTemplate(); t.printTo(new OutputStreamWriter(System.out)); } catch (TemplateLoadingException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } catch (TemplateEvaluationException e) { e.printStackTrace(); } }
public TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage) throws TemplateLoadingException { return newTemplateFactory(template, encoding, expressionLanguage); }
DirectoryTemplateLoader extends FileTemplateLoader { public TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage) throws TemplateLoadingException { return newTemplateFactory(template, encoding, expressionLanguage); } }
DirectoryTemplateLoader extends FileTemplateLoader { public TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage) throws TemplateLoadingException { return newTemplateFactory(template, encoding, expressionLanguage); } DirectoryTemplateLoader(File templateDirectory);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding, int changeDetectionInterval); }
DirectoryTemplateLoader extends FileTemplateLoader { public TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage) throws TemplateLoadingException { return newTemplateFactory(template, encoding, expressionLanguage); } DirectoryTemplateLoader(File templateDirectory);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding, int changeDetectionInterval); TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, String encoding, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, TemplateModifier modifier, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, String encoding, TemplateModifier modifier, ExpressionLanguage expressionLanguage); @Override TemplateDocument parseTemplate(String templateName, ExpressionLanguage expressionLanguage); @Override TemplateDocument parseTemplate(String templateName, String encoding, ExpressionLanguage expressionLanguage); HashSet<File> getFiles(HashSet<String> fileNames); }
DirectoryTemplateLoader extends FileTemplateLoader { public TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage) throws TemplateLoadingException { return newTemplateFactory(template, encoding, expressionLanguage); } DirectoryTemplateLoader(File templateDirectory);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding);  DirectoryTemplateLoader(File templateDirectory, String defaultEncoding, int changeDetectionInterval); TemplateFactory newTemplateFactory(String template, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, String encoding, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, TemplateModifier modifier, ExpressionLanguage expressionLanguage); TemplateFactory newTemplateFactory(String template, String encoding, TemplateModifier modifier, ExpressionLanguage expressionLanguage); @Override TemplateDocument parseTemplate(String templateName, ExpressionLanguage expressionLanguage); @Override TemplateDocument parseTemplate(String templateName, String encoding, ExpressionLanguage expressionLanguage); HashSet<File> getFiles(HashSet<String> fileNames);  }