net.sf.statcvs.output

Class ReportConfig


public class ReportConfig
extends Object

A configuration object that controls several aspects of report creation, such as the output directory and chart sizes. A single instance is passed around to all objects involved in report creation.
Version:
$Id: ReportConfig.java,v 1.7 2008/04/02 11:22:15 benoitx Exp $
Author:
Richard Cyganiak (richard@cyganiak.de)

Field Summary

static MarkupSyntax
HTML
static MarkupSyntax
XDOC
static MarkupSyntax
XML

Constructor Summary

ReportConfig(Repository repository, String projectName, String rootDirectory, MarkupSyntax syntax, CssHandler cssHandler)

Method Summary

void
copyFileIntoReport(URL source, String destinationFilename)
Copies a file from a URL into the report.
ChartImage
createChartImage(String fileName, String title, JFreeChart chart, Dimension size)
Writes a chart image file.
Page
createPage(String fileName, String shortTitle, String fullTitle)
Creates an empty report page.
CssHandler
getCssHandler()
Dimension
getLargeChartSize()
MarkupSyntax
getMarkup()
String
getProjectName()
Repository
getRepository()
String
getRootDirectory()
Dimension
getSmallChartSize()
BugTracker
getWebBugtracker()
WebRepositoryIntegration
getWebRepository()
boolean
isDeveloper(Author author)
void
setLargeChartSize(Dimension newSize)
void
setNonDeveloperLogins(Collection names)
void
setSmallChartSize(Dimension newSize)
void
setWebBugtracker(BugTracker webBugtracker)
void
setWebRepository(WebRepositoryIntegration webRepository)

Field Details

HTML

public static final MarkupSyntax HTML

XDOC

public static final MarkupSyntax XDOC

XML

public static final MarkupSyntax XML

Constructor Details

ReportConfig

public ReportConfig(Repository repository,
                    String projectName,
                    String rootDirectory,
                    MarkupSyntax syntax,
                    CssHandler cssHandler)

Method Details

copyFileIntoReport

public void copyFileIntoReport(URL source,
                               String destinationFilename)
Copies a file from a URL into the report.
Parameters:
source - The source file
destinationFilename - The destionation, relative to the report root, without initial slash.

createChartImage

public ChartImage createChartImage(String fileName,
                                   String title,
                                   JFreeChart chart,
                                   Dimension size)
Writes a chart image file.
Parameters:
fileName - The file's name, relative to the root.
title - The chart's title
chart - The JFreeChart representation
size - Width and heigth in pixels
Returns:
An object representing the file

createPage

public Page createPage(String fileName,
                       String shortTitle,
                       String fullTitle)
Creates an empty report page.
Parameters:
fileName - The page's file name, relative to the root, without file extension
shortTitle - A short title for use in navigation links
fullTitle - The full title for the headline
Returns:
An empty page according to the specifications

getCssHandler

public CssHandler getCssHandler()

getLargeChartSize

public Dimension getLargeChartSize()

getMarkup

public MarkupSyntax getMarkup()

getProjectName

public String getProjectName()

getRepository

public Repository getRepository()

getRootDirectory

public String getRootDirectory()

getSmallChartSize

public Dimension getSmallChartSize()

getWebBugtracker

public BugTracker getWebBugtracker()

getWebRepository

public WebRepositoryIntegration getWebRepository()

isDeveloper

public boolean isDeveloper(Author author)

setLargeChartSize

public void setLargeChartSize(Dimension newSize)

setNonDeveloperLogins

public void setNonDeveloperLogins(Collection names)

setSmallChartSize

public void setSmallChartSize(Dimension newSize)

setWebBugtracker

public void setWebBugtracker(BugTracker webBugtracker)

setWebRepository

public void setWebRepository(WebRepositoryIntegration webRepository)