View Javadoc

1   package br.com.ibnetwork.guara.view;
2   
3   import java.io.Writer;
4   
5   /***
6    * @author <a href="mailto:leandro@ibnetwork.com.br">leandro</a>
7    */
8   public interface TemplateEngine
9   {
10      String ROLE = TemplateEngine.class.getName();
11      
12      void merge(String templateName, Context context, Writer writer)
13      	throws TemplateEngineException;
14     
15      boolean templateExists(String templateName)
16      	throws TemplateEngineException;
17  
18      //TODO: reclycle Context objects
19      Context createContext()
20      	throws TemplateEngineException;
21      
22      String getTemplateExtension();
23      
24      String getEncoding();
25      
26      String getOnErrorTemplate();
27      
28      String toTemplateName(String templateName);
29      
30      String toFileName(String templateName);
31  }