public class FreemarkerViewProcessor extends Object implements ViewProcessor<String>
Modifier and Type | Field and Description |
---|---|
static String |
FREEMARKER_TEMPLATES_BASE_PATH
Freemarker templates base path.
|
Constructor and Description |
---|
FreemarkerViewProcessor(ResourceConfig resourceConfig) |
public static final String FREEMARKER_TEMPLATES_BASE_PATH
public FreemarkerViewProcessor(@Context ResourceConfig resourceConfig)
public String resolve(String path)
ViewProcessor
resolve
in interface ViewProcessor<String>
path
- the template namepublic void writeTo(String resolvedPath, Viewable viewable, OutputStream out) throws IOException
ViewProcessor
writeTo
in interface ViewProcessor<String>
resolvedPath
- the template reference. This is obtained by calling the
ViewProcessor.resolve(java.lang.String)
method with a template name.viewable
- the viewable that contains the model to be passed to the
template.out
- the output stream to write the result of processing the
template.IOException
- if there was an error processing the
template.Copyright © 2013 Oracle Corporation. All rights reserved.