| org.tigris.scarab.services.email.VelocityEmailService
VelocityEmailService | public class VelocityEmailService extends BaseTemplateEngineService implements EmailService(Code) | | This is a Service that can process Velocity templates from within a
Turbine Screen. Here's an example of how you might use it from a
screen:
Context context = new VelocityContext();
context.put("message", "Hello from Turbine!");
String results = TurbineVelocity.handleRequest(context,"HelloWorld.vm");
Character sets map codes to glyphs, while encodings map between
chars/bytes and codes.
bytes -> [encoding] -> charset -> [rendering] -> glyphs
This copy of TurbineVelocityService has been slightly modified
from its original form to support toggling of Scarab's cross-site
scripting filter.
author: Dave Bryson author: Rafal Krzewski author: Jason van Zyl author: Sean Legassick author: Daniel Rall author: Jon S. Stevens author: Martin Poeschl author: James Taylor version: $Id: VelocityEmailService.java 9104 2004-05-10 21:04:51Z dabbous $ |
Method Summary | |
public String | handleRequest(TemplateContext context, String template) | public String | handleRequest(Context context, String filename) | public String | handleRequest(Context context, String filename, String charset, String encoding) | public void | handleRequest(TemplateContext context, String template, OutputStream outputStream) | public void | handleRequest(Context context, String filename, OutputStream output) | public void | handleRequest(Context context, String filename, OutputStream output, String charset, String encoding) | public void | handleRequest(TemplateContext context, String template, Writer writer) | public void | handleRequest(Context context, String filename, Writer writer) | public void | handleRequest(Context context, String filename, Writer writer, String encoding) | public void | init() Performs early initialization of this Turbine service. | public boolean | templateExists(String template) Find out if a given template exists. |
handleRequest | public String handleRequest(TemplateContext context, String template) throws ServiceException(Code) | | See Also: org.apache.fulcrum.velocity.VelocityService |
handleRequest | public String handleRequest(Context context, String filename) throws ServiceException(Code) | | See Also: org.apache.fulcrum.velocity.VelocityService |
handleRequest | public String handleRequest(Context context, String filename, String charset, String encoding) throws ServiceException(Code) | | See Also: org.apache.fulcrum.velocity.VelocityService |
handleRequest | public void handleRequest(TemplateContext context, String template, OutputStream outputStream) throws ServiceException(Code) | | See Also: org.apache.fulcrum.template.TemplateEngineService |
handleRequest | public void handleRequest(Context context, String filename, OutputStream output) throws ServiceException(Code) | | See Also: org.apache.fulcrum.velocity.VelocityService |
handleRequest | public void handleRequest(Context context, String filename, OutputStream output, String charset, String encoding) throws ServiceException(Code) | | See Also: org.apache.fulcrum.velocity.VelocityService |
handleRequest | public void handleRequest(TemplateContext context, String template, Writer writer) throws ServiceException(Code) | | See Also: BaseTemplateEngineService.handleRequest(TemplateContextStringWriter) |
init | public void init() throws InitializationException(Code) | | Performs early initialization of this Turbine service.
|
templateExists | public boolean templateExists(String template)(Code) | | Find out if a given template exists. Velocity
will do its own searching to determine whether
a template exists or not.
Parameters: String - template to search for boolean |
|
|