org.jbehave.core.reporters
Class FreemarkerViewGenerator

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

public class FreemarkerViewGenerator
extends java.lang.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 generateView(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("index", "ftl/jbehave-reports-index.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
 int countFailedScenarios()
           
 int countScenarios()
           
 int countStories()
           
static java.util.Properties defaultViewProperties()
           
 void generateView(java.io.File outputDirectory, java.util.List<java.lang.String> formats, java.util.Properties viewProperties)
           
 
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 java.util.Properties defaultViewProperties()

generateView

public void generateView(java.io.File outputDirectory,
                         java.util.List<java.lang.String> formats,
                         java.util.Properties viewProperties)
Specified by:
generateView in interface ViewGenerator

countStories

public int countStories()
Specified by:
countStories in interface ViewGenerator

countScenarios

public int countScenarios()
Specified by:
countScenarios in interface ViewGenerator

countFailedScenarios

public int countFailedScenarios()
Specified by:
countFailedScenarios in interface ViewGenerator


Copyright © 2003-2010. All Rights Reserved.