1 package org.apache.turbine.services.velocity; 2 3 18 19 import java.io.OutputStream ; 20 import java.io.Writer ; 21 22 import org.apache.turbine.services.Service; 23 import org.apache.turbine.util.RunData; 24 import org.apache.turbine.util.TurbineException; 25 26 import org.apache.velocity.context.Context; 27 28 37 public interface VelocityService 38 extends Service 39 { 40 41 String SERVICE_NAME = "VelocityService"; 42 43 44 String CONTEXT = "VELOCITY_CONTEXT"; 45 46 47 String VELOCITY_EXTENSION = "vm"; 48 49 50 String RUNDATA_KEY = "data"; 51 52 53 String CATCH_ERRORS_KEY = "catch.errors"; 54 55 56 boolean CATCH_ERRORS_DEFAULT = true; 57 58 67 String handleRequest(Context context, String template) 68 throws Exception ; 69 70 81 void handleRequest(Context context, String filename, OutputStream out) 82 throws TurbineException; 83 84 95 void handleRequest(Context context, String filename, Writer writer) 96 throws TurbineException; 97 98 103 Context getContext(); 104 105 110 Context getNewContext(); 111 112 120 Context getContext(RunData data); 121 122 128 void requestFinished(Context context); 129 } 130 | Popular Tags |