1 package org.apache.fulcrum.template; 2 3 56 57 import java.io.OutputStream ; 58 import java.io.Writer ; 59 import java.util.Hashtable ; 60 import org.apache.fulcrum.ServiceException; 61 62 70 public interface TemplateEngineService 71 { 72 public static final String TEMPLATE_EXTENSIONS = "template.extension"; 73 public static final String DEFAULT_TEMPLATE_EXTENSION = "template.default.extension"; 74 public static final String DEFAULT_LAYOUT_TEMPLATE = "default.page.template"; 75 public static final String DEFAULT_PAGE_TEMPLATE = "default.layout.template"; 76 77 81 public Hashtable getTemplateEngineServiceConfiguration(); 82 83 90 public void registerConfiguration(String defaultExt); 91 92 97 public String [] getAssociatedFileExtensions(); 98 99 111 public boolean templateExists(String template); 112 113 116 public abstract String handleRequest(TemplateContext context, 117 String template) 118 throws ServiceException; 119 120 123 public abstract void handleRequest(TemplateContext context, 124 String template, 125 OutputStream outputStream) 126 throws ServiceException; 127 128 131 void handleRequest(TemplateContext context, String template, Writer writer) 132 throws ServiceException; 133 } 134 | Popular Tags |