Package org.jbehave.core.reporters
Class FreemarkerViewGenerator
- java.lang.Object
-
- org.jbehave.core.reporters.TemplateableViewGenerator
-
- org.jbehave.core.reporters.FreemarkerViewGenerator
-
- All Implemented Interfaces:
ViewGenerator
public class FreemarkerViewGenerator extends TemplateableViewGenerator
Freemarker-basedViewGenerator
, which uses the configured FTL templates for the views. The default view properties are overridable via the methodProperties
parameter. To override, specify the path to the new template under the appropriate key:The view generator provides the following default properties:
"views": "ftl/jbehave-views.ftl" "maps": "ftl/jbehave-maps.ftl" "reports": "ftl/jbehave-reports.ftl" "decorated": "ftl/jbehave-report-decorated.ftl" "nonDecorated": "ftl/jbehave-report-non-decorated.ftl" "decorateNonHtml": "true" "defaultFormats": "stats" "viewDirectory": "view"
The view generator can also specify the
StoryNameResolver
(defaulting toUnderscoredToCapitalized
) and the class or ClassLoader which Freemarker uses to load the templates from (defaulting toFreemarkerProcessor
).- Author:
- Mauro Talevi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jbehave.core.reporters.TemplateableViewGenerator
TemplateableViewGenerator.Report, TemplateableViewGenerator.ReportCreationFailed, TemplateableViewGenerator.Reports, TemplateableViewGenerator.TimeFormatter, TemplateableViewGenerator.ViewGenerationFailedForTemplate
-
-
Constructor Summary
Constructors Constructor Description FreemarkerViewGenerator()
FreemarkerViewGenerator(Class<?> templateLoadingFrom)
FreemarkerViewGenerator(ClassLoader templateLoadingFrom)
FreemarkerViewGenerator(StoryNameResolver nameResolver, Class<?> templateLoadingFrom)
FreemarkerViewGenerator(StoryNameResolver nameResolver, Class<?> templateLoadingFrom, Charset charset)
FreemarkerViewGenerator(StoryNameResolver nameResolver, ClassLoader templateLoadingFrom)
FreemarkerViewGenerator(StoryNameResolver nameResolver, ClassLoader templateLoadingFrom, Charset charset)
-
Method Summary
Modifier and Type Method Description Properties
defaultViewProperties()
-
Methods inherited from class org.jbehave.core.reporters.TemplateableViewGenerator
generateMapsView, generateReportsView, getReportsCount
-
-
-
-
Constructor Detail
-
FreemarkerViewGenerator
public FreemarkerViewGenerator()
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(Class<?> templateLoadingFrom)
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(ClassLoader templateLoadingFrom)
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(StoryNameResolver nameResolver, Class<?> templateLoadingFrom)
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(StoryNameResolver nameResolver, ClassLoader templateLoadingFrom)
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(StoryNameResolver nameResolver, Class<?> templateLoadingFrom, Charset charset)
-
FreemarkerViewGenerator
public FreemarkerViewGenerator(StoryNameResolver nameResolver, ClassLoader templateLoadingFrom, Charset charset)
-
-
Method Detail
-
defaultViewProperties
public Properties defaultViewProperties()
- Specified by:
defaultViewProperties
in interfaceViewGenerator
- Overrides:
defaultViewProperties
in classTemplateableViewGenerator
-
-