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, using the file outputs of the reporters for the given formats. The FTL templates for the index and single views are injectable the generateReportsView(File, List, Properties) but defaults are provided. To override, specify the path the new template under keys "index", "decorated" and "nonDecorated".

The view generator provides the following resources:

 resources.setProperty("maps", "ftl/jbehave-story-maps.ftl");
 resources.setProperty("index", "ftl/jbehave-reports-index-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.ViewGenerationFailedForTemplate
           
 
Constructor Summary
FreemarkerViewGenerator()
           
 
Method Summary
static Properties defaultViewProperties()
           
 void generateReportsView(File outputDirectory, List<String> formats, Properties viewProperties)
           
 void generateStoryMapsView(File outputDirectory, List<StoryMap> storyMaps, 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()
Method Detail

defaultViewProperties

public static Properties defaultViewProperties()

generateStoryMapsView

public void generateStoryMapsView(File outputDirectory,
                                  List<StoryMap> storyMaps,
                                  Properties viewProperties)
Specified by:
generateStoryMapsView 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-2010. All Rights Reserved.