SpringStoryReporterBuilder.java

  1. package org.jbehave.core.configuration.spring;

  2. import java.net.URL;
  3. import java.util.List;
  4. import java.util.Properties;

  5. import org.jbehave.core.configuration.Keywords;
  6. import org.jbehave.core.reporters.FilePrintStreamFactory.FilePathResolver;
  7. import org.jbehave.core.reporters.StoryReporterBuilder;

  8. /**
  9.  * Extends {@link StoryReporterBuilder} to provide getter/setter methods for all
  10.  * builder properties, so it can be used by Spring's property mechanism.
  11.  */
  12. public class SpringStoryReporterBuilder extends StoryReporterBuilder {

  13.     public List<org.jbehave.core.reporters.Format> getFormats() {
  14.         return formats();
  15.     }

  16.     public void setFormats(List<org.jbehave.core.reporters.Format> formats) {
  17.         withFormats(formats.toArray(new org.jbehave.core.reporters.Format[formats.size()]));
  18.     }

  19.     public String getOutputDirectory() {
  20.         return outputDirectory().getPath();
  21.     }

  22.     public String getRelativeDirectory() {
  23.         return relativeDirectory();
  24.     }

  25.     public void setRelativeDirectory(String relativeDirectory) {
  26.         withRelativeDirectory(relativeDirectory);
  27.     }

  28.     public URL getCodeLocation() {
  29.         return codeLocation();
  30.     }

  31.     public void setCodeLocation(URL codeLocation) {
  32.         withCodeLocation(codeLocation);
  33.     }

  34.     public Keywords getKeywords() {
  35.         return keywords();
  36.     }
  37.    
  38.     public void setKeywords(Keywords keywords) {
  39.         withKeywords(keywords);
  40.     }
  41.    
  42.     public FilePathResolver getPathResolver() {
  43.         return pathResolver();
  44.     }

  45.     public void setPathResolver(FilePathResolver pathResolver) {
  46.         withPathResolver(pathResolver);
  47.     }

  48.     public boolean isReportFailureTrace() {
  49.         return reportFailureTrace();
  50.     }

  51.     public void setReportFailureTrace(boolean reportFailureTrace) {
  52.         withFailureTrace(reportFailureTrace);
  53.     }


  54.     public boolean isReportFailureTraceCompression() {
  55.         return compressFailureTrace();
  56.     }

  57.     public void setReportFailureTraceCompression(boolean reportFailureTraceCompression) {
  58.         withFailureTraceCompression(reportFailureTraceCompression);
  59.     }

  60.     public Properties getViewResources() {
  61.         return viewResources();
  62.     }

  63.     public void setViewResources(Properties viewResources) {
  64.         withViewResources(viewResources);
  65.     }

  66.     public boolean isMultiThreading() {
  67.         return multiThreading();
  68.     }

  69.     public void setMultiThreading(boolean multiThreading) {
  70.         withMultiThreading(multiThreading);
  71.     }

  72. }