|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.ogf.graap.wsag.server.actions.impl.FileTemplate
public class FileTemplate
Default implementation to load files from the classpath an process these files as Velocity templates. Additional parameters can be specified, which can be used in the Velocity macros defined in the file.
Field Summary | |
---|---|
static String |
VELOCITY_PROPERTIES_FILE
Velocity properties filename. |
static String |
VELOCITY_PROPERTIES_FILE_DEFAULT
Default velocity properties filename. |
Constructor Summary | |
---|---|
FileTemplate(String filename)
Creates a new file template for the given file name. |
Method Summary | |
---|---|
void |
addParameter(String key,
Object value)
Adds a new parameter to the Velocity context. |
void |
processTemplate(OutputStream out)
Processes the file template as Velocity template. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VELOCITY_PROPERTIES_FILE
public static final String VELOCITY_PROPERTIES_FILE_DEFAULT
Constructor Detail |
---|
public FileTemplate(String filename)
filename
- the file nameMethod Detail |
---|
public void addParameter(String key, Object value)
key
- the parameter namevalue
- the parameter valuepublic void processTemplate(OutputStream out)
out
- the OutputStream
where the result is written to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |