org.argoprint.persistence
Class TemplateEngineFactory

java.lang.Object
  extended by org.argoprint.persistence.TemplateEngineFactory

public class TemplateEngineFactory
extends java.lang.Object

This class is responsible for instantiating instances of templating engines. All templating engines must be registered via the standard Java SPI mechanism

Author:
mfortner
See Also:
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Service%20Provider

Constructor Summary
TemplateEngineFactory()
           
 
Method Summary
static TemplateEngine getInstance(java.lang.String ext)
          This method gets an instance of the template engine supported by this template engine.
static java.util.List<TemplateEngine> getTemplateEngines()
          This method gets a list of all installed templating engines.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateEngineFactory

public TemplateEngineFactory()
Method Detail

getTemplateEngines

public static java.util.List<TemplateEngine> getTemplateEngines()
This method gets a list of all installed templating engines.

Returns:

getInstance

public static TemplateEngine getInstance(java.lang.String ext)
This method gets an instance of the template engine supported by this template engine.

Parameters:
ext - The file extension for a template.
Returns:
An instance of the templating engine, or null if not found.
Throws:
java.lang.IllegalArgumentException - if the extension parameter is null