org.jbehave.core.reporters
Class FreemarkerViewGenerator

java.lang.Object
  extended by org.jbehave.core.reporters.FreemarkerViewGenerator
All Implemented Interfaces:
ViewGenerator

public class FreemarkerViewGenerator
extends Object
implements ViewGenerator

Freemarker-based ViewGenerator, which uses the configured FTL templates for the views. The default view properties are overridable via the method Properties parameter. To override, specify the path to the new template under the appropriate key:

The view generator provides the following resources:

 resources.setProperty("views", "ftl/jbehave-views.ftl");
 resources.setProperty("maps", "ftl/jbehave-maps.ftl");
 resources.setProperty("navigator", "ftl/jbehave-navigator.ftl");
 resources.setProperty("reports", "ftl/jbehave-reports-with-totals.ftl");
 resources.setProperty("decorated", "ftl/jbehave-report-decorated.ftl");
 resources.setProperty("nonDecorated", "ftl/jbehave-report-non-decorated.ftl");
 resources.setProperty("decorateNonHtml", "true");
 resources.setProperty("defaultFormats", "stats");
 resources.setProperty("viewDirectory", "view");
 

Author:
Mauro Talevi

Nested Class Summary
static class FreemarkerViewGenerator.Report
           
static class FreemarkerViewGenerator.ReportCreationFailed
           
static class FreemarkerViewGenerator.ReportsTable
           
static class FreemarkerViewGenerator.ViewGenerationFailedForTemplate
           
 
Constructor Summary
FreemarkerViewGenerator()
           
FreemarkerViewGenerator(StoryNameResolver nameResolver)
           
 
Method Summary
static Properties defaultViewProperties()
           
 void generateMapsView(File outputDirectory, StoryMaps storyMaps, Properties viewProperties)
           
 void generateReportsView(File outputDirectory, List<String> formats, Properties viewProperties)
           
 ReportsCount getReportsCount()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreemarkerViewGenerator

public FreemarkerViewGenerator()

FreemarkerViewGenerator

public FreemarkerViewGenerator(StoryNameResolver nameResolver)
Method Detail

defaultViewProperties

public static Properties defaultViewProperties()

generateMapsView

public void generateMapsView(File outputDirectory,
                             StoryMaps storyMaps,
                             Properties viewProperties)
Specified by:
generateMapsView in interface ViewGenerator

generateReportsView

public void generateReportsView(File outputDirectory,
                                List<String> formats,
                                Properties viewProperties)
Specified by:
generateReportsView in interface ViewGenerator

getReportsCount

public ReportsCount getReportsCount()
Specified by:
getReportsCount in interface ViewGenerator


Copyright © 2003-2011. All Rights Reserved.