|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.codehaus.enunciate.modules.BasicDeploymentModule
org.codehaus.enunciate.modules.FreemarkerDeploymentModule
public abstract class FreemarkerDeploymentModule
Basic module that processes a freemarker template when generating, handling the TemplateException that occurs.
| Field Summary |
|---|
| Fields inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
enunciate |
| Constructor Summary | |
|---|---|
FreemarkerDeploymentModule()
|
|
| Method Summary | |
|---|---|
void |
close()
Default implementation is a no-op. |
abstract void |
doFreemarkerGenerate()
Generate using Freemarker. |
protected void |
doGenerate()
Processes the template. |
protected freemarker.template.Configuration |
getConfiguration()
Get the freemarker configuration. |
EnunciateFreemarkerModel |
getModel()
Gets the model for processing. |
protected EnunciateFreemarkerModel |
getModelInternal()
|
protected freemarker.template.ObjectWrapper |
getObjectWrapper()
The object wrapper to use for the model. |
protected freemarker.template.TemplateExceptionHandler |
getTemplateExceptionHandler()
Get the template exception handler. |
protected freemarker.cache.URLTemplateLoader |
getTemplateLoader()
Get the template loader for the freemarker configuration. |
void |
initModel(EnunciateFreemarkerModel model)
Initialize the model. |
void |
processTemplate(freemarker.template.Template template,
java.lang.Object model)
Processes the specified template with the given model. |
void |
processTemplate(freemarker.template.Template template,
java.lang.Object model,
java.io.PrintStream out)
Processes the specified template to the specified output stream. |
void |
processTemplate(java.net.URL templateURL,
java.lang.Object model)
Processes the specified template with the given model. |
void |
processTemplate(java.net.URL templateURL,
java.lang.Object model,
java.io.PrintStream out)
Processes the specified template with the given model. |
| Methods inherited from class org.codehaus.enunciate.modules.BasicDeploymentModule |
|---|
debug, doBuild, doCompile, doPackage, getAliases, getBuildDir, getCompileDir, getConfigurationRules, getEnunciate, getGenerateDir, getName, getOrder, getPackageDir, getValidator, info, init, isDisabled, setBuildDir, setCompileDir, setDisabled, setGenerateDir, setPackageDir, step, warn |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FreemarkerDeploymentModule()
| Method Detail |
|---|
protected final void doGenerate()
throws EnunciateException,
java.io.IOException
EnunciateAnnotationProcessor).
doGenerate in class BasicDeploymentModuleEnunciateException
java.io.IOException
public abstract void doFreemarkerGenerate()
throws EnunciateException,
java.io.IOException,
freemarker.template.TemplateException
doGenerate() but can throw a TemplateException.
EnunciateException
java.io.IOException
freemarker.template.TemplateException
public void processTemplate(java.net.URL templateURL,
java.lang.Object model)
throws java.io.IOException,
freemarker.template.TemplateException
templateURL - The template URL.model - The root model.
java.io.IOException
freemarker.template.TemplateException
public void processTemplate(java.net.URL templateURL,
java.lang.Object model,
java.io.PrintStream out)
throws java.io.IOException,
freemarker.template.TemplateException
templateURL - The template URL.model - The root model.out - The output stream to process to.
java.io.IOException
freemarker.template.TemplateException
public void processTemplate(freemarker.template.Template template,
java.lang.Object model)
throws freemarker.template.TemplateException,
java.io.IOException
template - The template.model - The root model.
freemarker.template.TemplateException
java.io.IOException
public void processTemplate(freemarker.template.Template template,
java.lang.Object model,
java.io.PrintStream out)
throws freemarker.template.TemplateException,
java.io.IOException
template - The template to process.model - The model.out - The output stream.
freemarker.template.TemplateException
java.io.IOExceptionpublic EnunciateFreemarkerModel getModel()
protected EnunciateFreemarkerModel getModelInternal()
protected freemarker.template.ObjectWrapper getObjectWrapper()
protected freemarker.template.Configuration getConfiguration()
protected freemarker.template.TemplateExceptionHandler getTemplateExceptionHandler()
System.err
rather than the writer because often Freemarker is printing to temp files.
protected freemarker.cache.URLTemplateLoader getTemplateLoader()
public void close()
throws EnunciateException
BasicDeploymentModule
close in interface DeploymentModuleclose in class BasicDeploymentModuleEnunciateExceptionpublic void initModel(EnunciateFreemarkerModel model)
EnunciateModelAware
initModel in interface EnunciateModelAwaremodel - The model to initialize.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||