net.sf.statcvs.output

Class ConfigurationOptions


public class ConfigurationOptions
extends Object

Class for storing all command line parameters. The parameters are set by the Main.main(String[]) method. Interested classes can read all parameter values from here. TODO: Should be moved to more appropriate package and made non-public
Version:
$Id: ConfigurationOptions.java,v 1.33 2008/04/17 15:02:01 benoitx Exp $
Author:
jentzsch

Method Summary

static void
addNonDeveloperLogin(String loginName)
Excludes a login name from charts and reports that compare several developers.
static String
getCheckedOutDirectory()
Method getCheckedOutDirectory.
static Properties
getConfigProperties()
The config properties.
static CssHandler
getCssHandler()
returns the CssHandler
static FilePatternMatcher
getExcludePattern()
static FilePatternMatcher
getIncludePattern()
static String
getLogFileName()
Method getLogfilename.
static String
getLoggingProperties()
Gets the name of the logging properties file
static MarkupSyntax
getMarkupSyntax()
static Collection
getNonDeveloperLogins()
Gets login names that should be excluded from charts and reports that compare several developers.
static String
getNotes()
Returns the report notes (from "-notes filename" switch) or null if not specified
static String
getOutputDir()
Returns the outputDir.
static String
getOutputFormat()
static String
getProjectName()
Method getProjectName.
static Pattern
getSymbolicNamesPattern()
static BugTracker
getWebBugtracker()
static WebRepositoryIntegration
getWebRepository()
Returns a WebRepositoryIntegration object if the user has specified a URL to one.
static void
setBugzillaUrl(String bugzillaUrl)
static void
setCheckedOutDirectory(String checkedOutDirectory)
Sets the checkedOutDirectory.
static void
setChoraURL(String url)
Sets the URL to a Chora web-based CVS browser.
static void
setConfigFile(String propertiesFilename)
Set the config file that may contain user details.
static void
setCssFile(String cssFile)
Sets the cssFile.
static void
setCvswebURL(String url)
Sets the URL to a cvsweb web-based CVS browser.
static void
setDebugLogging()
Sets the logging level to debug
static void
setDefaultCssFile(String cssName)
Allow change between css that are shipped with the tool.
static void
setExcludePattern(String patternList)
Sets a file exclude pattern list.
static void
setIncludePattern(String patternList)
Sets a file include pattern list.
static void
setJCVSWebURL(String url)
Sets the URL to a JCVSWeb web-based CVS browser.
static void
setLogFileName(String logFileName)
Sets the logFileName.
static void
setMantisUrl(String mantisUrl)
static void
setNotesFile(String notesFile)
Sets the name of the notes file.
static void
setOutputDir(String outputDir)
Sets the outputDir.
static void
setOutputFormat(String outputFormat)
static void
setProjectName(String projectName)
Sets a project title to be used in the reports
static void
setSymbolicNamesPattern(String symbolicNamesPattern)
static void
setVerboseLogging()
Sets the logging level to verbose
static void
setViewCvsURL(String url)
Sets the URL to a ViewCVS web-based CVS browser.
static void
setViewTracURL(String url)
Sets the URL to a Trac web-based SVN browser and issue tracking.
static void
setViewVcURL(String url)
Sets the URL to a ViewVC web-based CVS/SVN browser.
static void
setWebRepositoryIntegration(WebRepositoryIntegration webRepo)

Method Details

addNonDeveloperLogin

public static void addNonDeveloperLogin(String loginName)
Excludes a login name from charts and reports that compare several developers. Useful to reduce the noise from admin accounts.
Parameters:
loginName - A login name

getCheckedOutDirectory

public static String getCheckedOutDirectory()
Method getCheckedOutDirectory.
Returns:
String name of the checked out directory

getConfigProperties

public static Properties getConfigProperties()
The config properties.
Returns:

getCssHandler

public static CssHandler getCssHandler()
returns the CssHandler
Returns:
the CssHandler

getExcludePattern

public static FilePatternMatcher getExcludePattern()
Returns:
Returns the excludePattern.

getIncludePattern

public static FilePatternMatcher getIncludePattern()
Returns:
Returns the includePattern.

getLogFileName

public static String getLogFileName()
Method getLogfilename.
Returns:
String name of the logfile to be parsed

getLoggingProperties

public static String getLoggingProperties()
Gets the name of the logging properties file
Returns:
the name of the logging properties file

getMarkupSyntax

public static MarkupSyntax getMarkupSyntax()

getNonDeveloperLogins

public static Collection getNonDeveloperLogins()
Gets login names that should be excluded from charts and reports that compare several developers.

getNotes

public static String getNotes()
Returns the report notes (from "-notes filename" switch) or null if not specified
Returns:
the report notes

getOutputDir

public static String getOutputDir()
Returns the outputDir.
Returns:
String output Directory

getOutputFormat

public static String getOutputFormat()

getProjectName

public static String getProjectName()
Method getProjectName.
Returns:
String name of the project

getSymbolicNamesPattern

public static Pattern getSymbolicNamesPattern()

getWebBugtracker

public static BugTracker getWebBugtracker()

getWebRepository

public static WebRepositoryIntegration getWebRepository()
Returns a WebRepositoryIntegration object if the user has specified a URL to one. null otherwise.
Returns:
the web repository

setBugzillaUrl

public static void setBugzillaUrl(String bugzillaUrl)

setCheckedOutDirectory

public static void setCheckedOutDirectory(String checkedOutDirectory)
            throws ConfigurationException
Sets the checkedOutDirectory.
Parameters:
checkedOutDirectory - The checkedOutDirectory to set
Throws:
ConfigurationException - if directory does not exist

setChoraURL

public static void setChoraURL(String url)
Sets the URL to a Chora web-based CVS browser. This must be the URL at which the checked-out module's root can be viewed in Chora.
Parameters:
url - URL to a cvsweb repository

setConfigFile

public static void setConfigFile(String propertiesFilename)
            throws ConfigurationException
Set the config file that may contain user details.
Parameters:
propertiesFilename -

setCssFile

public static void setCssFile(String cssFile)
            throws ConfigurationException
Sets the cssFile. Currently, the css file can be any local file or a HTTP URL. If it is a local file, a copy will be included in the output directory. If this method is never called, a default CSS file will be generated in the output directory.
Parameters:
cssFile - The cssFile to set
Throws:
ConfigurationException - if the specified CSS file can not be accessed from local file system or from URL source, or if the specified CSS file is local and does not exist

setCvswebURL

public static void setCvswebURL(String url)
Sets the URL to a cvsweb web-based CVS browser. This must be the URL at which the checked-out module's root can be viewed in cvsweb.
Parameters:
url - URL to a cvsweb repository

setDebugLogging

public static void setDebugLogging()
Sets the logging level to debug

setDefaultCssFile

public static void setDefaultCssFile(String cssName)
Allow change between css that are shipped with the tool.
Parameters:
cssName - statcvs.css or objectlab-statcvs-xdoc.css

setExcludePattern

public static void setExcludePattern(String patternList)
Sets a file exclude pattern list. Files matching any of the patterns will be excluded from the analysis.
Parameters:
patternList - a list of Ant-style wildcard patterns, seperated by : or ;

setIncludePattern

public static void setIncludePattern(String patternList)
Sets a file include pattern list. Only files matching one of the patterns will be included in the analysis.
Parameters:
patternList - a list of Ant-style wildcard patterns, seperated by : or ;

setJCVSWebURL

public static void setJCVSWebURL(String url)
Sets the URL to a JCVSWeb web-based CVS browser. This must be the URL at which the checked-out module's root can be viewed in JCVSWeb.
Parameters:
url - URL to a JCVSWeb repository

setLogFileName

public static void setLogFileName(String logFileName)
            throws ConfigurationException
Sets the logFileName.
Parameters:
logFileName - The logFileName to set
Throws:
ConfigurationException - if the file does not exist

setMantisUrl

public static void setMantisUrl(String mantisUrl)

setNotesFile

public static void setNotesFile(String notesFile)
            throws ConfigurationException
Sets the name of the notes file. The notes file will be included on the index page of the output. It must contain a valid block-level HTML fragment (for example "<p>Some notes</p>")
Parameters:
notesFile - a local filename
Throws:
ConfigurationException - if the file is not found or can't be read

setOutputDir

public static void setOutputDir(String outputDir)
            throws ConfigurationException
Sets the outputDir.
Parameters:
outputDir - The outputDir to set
Throws:
ConfigurationException - if the output directory cannot be created

setOutputFormat

public static void setOutputFormat(String outputFormat)
            throws ConfigurationException

setProjectName

public static void setProjectName(String projectName)
Sets a project title to be used in the reports
Parameters:
projectName - The project title to be used in the reports

setSymbolicNamesPattern

public static void setSymbolicNamesPattern(String symbolicNamesPattern)
            throws ConfigurationException

setVerboseLogging

public static void setVerboseLogging()
Sets the logging level to verbose

setViewCvsURL

public static void setViewCvsURL(String url)
Sets the URL to a ViewCVS web-based CVS browser. This must be the URL at which the checked-out module's root can be viewed in ViewCVS.
Parameters:
url - URL to a ViewCVS repository

setViewTracURL

public static void setViewTracURL(String url)
Sets the URL to a Trac web-based SVN browser and issue tracking. This must be the URL at which the checked-out module's root can be viewed in Trac
Parameters:
url - URL to a Trac website

setViewVcURL

public static void setViewVcURL(String url)
Sets the URL to a ViewVC web-based CVS/SVN browser. This must be the URL at which the checked-out module's root can be viewed in ViewVC.
Parameters:
url - URL to a ViewVC repository

setWebRepositoryIntegration

public static void setWebRepositoryIntegration(WebRepositoryIntegration webRepo)