| Modifier and Type | Method and Description |
|---|---|
static String |
generate(DocData data)
Use this method to generate the documentation using passed in document data
|
static String |
generate(DocData data,
String template)
Use this method to generate the documentation using passed in document data, allows the user to specify the
template that is used
|
static String |
loadTemplate(String path)
Loads a template based on the given path
|
static String |
processTextTemplate(String templateName,
String textTemplate,
Map<String,Object> data)
Handles the replacement of the variable strings within textual templates and also allows the setting of variables
for the control of logical branching within the text template as well
Uses and expects freemarker (http://freemarker.org/) style templates (that is using ${name} as the marker for a replacement) NOTE: These should be compatible with Velocity (http://velocity.apache.org/) templates if you use the formal notation (formal: ${variable}, shorthand: $variable) |
static void |
reset() |
public static void reset()
public static String processTextTemplate(String templateName, String textTemplate, Map<String,Object> data)
templateName - this is the key to cache the template undertextTemplate - a freemarker/velocity style text template, cannot be null or empty stringdata - a set of replacement values which are in the map like so:public static String generate(DocData data)
data - any populated DocData objectIllegalArgumentException - if the input data is invalid in some wayDocDatapublic static String generate(DocData data, String template)
data - any populated DocData objecttemplate - any freemarker template which works with the DocData data structureIllegalArgumentException - if the input data is invalid in some wayDocDataCopyright © 2009–2021 Opencast Project. All rights reserved.