Class ConfigurationOptions
java.lang.Object
net.sf.statcvs.output.ConfigurationOptions
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.40 2009/08/21 23:06:51 benoitx Exp $
- Author:
- jentzsch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddNonDeveloperLogin(String loginName) Excludes a login name from charts and reports that compare several developers.static Stringstatic StringMethod getCheckedOutDirectory.static BooleangetConfigBooleanProperty(String propName, String fallBackPropName, Boolean defaultValue) Return a Boolean prop.static ColorgetConfigColorProperty(String propName, Color defaultValue) Return a String prop.static ColorgetConfigColorProperty(String propName, String fallBackPropName, Color defaultValue) Return a Color prop.static FloatgetConfigFloatProperty(String propName, String fallBackPropName, Float defaultValue) Return a Float prop.static FloatgetConfigIntegerProperty(String propName, Float defaultValue) Return a Float prop.static IntegergetConfigIntegerProperty(String propName, Integer defaultValue) Return a Integer prop.static IntegergetConfigIntegerProperty(String propName, String fallBackPropName, Integer defaultValue) Return a Integer prop.static PropertiesThe config properties.static ListgetConfigStringListProperty(String propName, String defaultValue) Return a list of String prop.static StringgetConfigStringProperty(String propName, String defaultValue) Return a String prop.static StringgetConfigStringProperty(String propName, String fallBackPropName, String defaultValue) static CssHandlerreturns theCssHandlerstatic FilePatternMatcherstatic Stringstatic Stringstatic FilePatternMatcherstatic StringMethod getLogfilename.static StringGets the name of the logging properties filestatic MarkupSyntaxstatic CollectionGets login names that should be excluded from charts and reports that compare several developers.static StringgetNotes()Returns the report notes (from "-notes filename" switch) or null if not specifiedstatic StringReturns the outputDir.static Stringstatic StringMethod getProjectName.static Patternstatic BugTrackerstatic WebRepositoryIntegrationReturns aWebRepositoryIntegrationobject if the user has specified a URL to one.static booleanstatic voidsetBugzillaUrl(String bugzillaUrl) static voidsetCharSet(String cs) static voidsetCheckedOutDirectory(String checkedOutDirectory) Sets the checkedOutDirectory.static voidsetChoraURL(String url) Sets the URL to a Chora web-based CVS browser.static voidsetConfigFile(String propertiesFilename) Set the config file that may contain user details.static voidsetCssFile(String cssFile) Sets the cssFile.static voidsetCvswebURL(String url) Sets the URL to a cvsweb web-based CVS browser.static voidSets the logging level to debugstatic voidsetDefaultCssFile(String cssName) Allow change between css that are shipped with the tool.static voidsetEnableTwitterButton(boolean value) Enable/disable the Twitter "Tweet This" Buttons.static voidsetExcludePattern(String patternList) Sets a file exclude pattern list.static voidsetFooterUrl(String footerUrl) static voidsetHeaderUrl(String headerUrl) static voidsetIncludePattern(String patternList) Sets a file include pattern list.static voidsetJCVSWebURL(String url) Sets the URL to a JCVSWeb web-based CVS browser.static voidsetLogFileName(String logFileName) Sets the logFileName.static voidsetMantisUrl(String mantisUrl) static voidsetNotesFile(String notesFile) Sets the name of the notes file.static voidsetOutputDir(String outputDir) Sets the outputDir.static voidsetOutputFormat(String outputFormat) static voidsetProjectName(String projectName) Sets a project title to be used in the reportsstatic voidsetSymbolicNamesPattern(String symbolicNamesPattern) static voidSets the logging level to verbosestatic voidsetViewCvsURL(String url) Sets the URL to a ViewCVS web-based CVS browser.static voidsetViewTracURL(String url) Sets the URL to a Trac web-based SVN browser and issue tracking.static voidsetViewVcURL(String url) Sets the URL to a ViewVC web-based CVS/SVN browser.static void
-
Constructor Details
-
ConfigurationOptions
public ConfigurationOptions()
-
-
Method Details
-
getCharSet
-
setCharSet
-
getCssHandler
-
getProjectName
-
getCheckedOutDirectory
Method getCheckedOutDirectory.- Returns:
- String name of the checked out directory
-
getLogFileName
Method getLogfilename.- Returns:
- String name of the logfile to be parsed
-
getOutputDir
-
getNotes
Returns the report notes (from "-notes filename" switch) or null if not specified- Returns:
- the report notes
-
getWebRepository
Returns aWebRepositoryIntegrationobject if the user has specified a URL to one. null otherwise.- Returns:
- the web repository
-
setCheckedOutDirectory
Sets the checkedOutDirectory.- Parameters:
checkedOutDirectory- The checkedOutDirectory to set- Throws:
ConfigurationException- if directory does not exist
-
setCssFile
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
-
setLogFileName
Sets the logFileName.- Parameters:
logFileName- The logFileName to set- Throws:
ConfigurationException- if the file does not exist
-
setOutputDir
Sets the outputDir.- Parameters:
outputDir- The outputDir to set- Throws:
ConfigurationException- if the output directory cannot be created
-
setNotesFile
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
-
setViewCvsURL
-
setCvswebURL
-
setChoraURL
-
setJCVSWebURL
-
setViewVcURL
-
setViewTracURL
-
setProjectName
Sets a project title to be used in the reports- Parameters:
projectName- The project title to be used in the reports
-
getLoggingProperties
Gets the name of the logging properties file- Returns:
- the name of the logging properties file
-
setVerboseLogging
public static void setVerboseLogging()Sets the logging level to verbose -
setDebugLogging
public static void setDebugLogging()Sets the logging level to debug -
setIncludePattern
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 ;- See Also:
-
setExcludePattern
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 ;- See Also:
-
getExcludePattern
- Returns:
- Returns the excludePattern.
-
getIncludePattern
- Returns:
- Returns the includePattern.
-
setSymbolicNamesPattern
public static void setSymbolicNamesPattern(String symbolicNamesPattern) throws ConfigurationException - Throws:
ConfigurationException
-
getSymbolicNamesPattern
-
setBugzillaUrl
-
setMantisUrl
-
getWebBugtracker
-
setOutputFormat
- Throws:
ConfigurationException
-
getOutputFormat
-
getMarkupSyntax
-
setWebRepositoryIntegration
-
setDefaultCssFile
Allow change between css that are shipped with the tool.- Parameters:
cssName- statcvs.css or objectlab-statcvs-xdoc.css
-
addNonDeveloperLogin
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
-
getNonDeveloperLogins
Gets login names that should be excluded from charts and reports that compare several developers. -
setConfigFile
Set the config file that may contain user details.- Parameters:
propertiesFilename-- Throws:
ConfigurationException
-
getConfigProperties
-
getConfigStringProperty
-
getConfigStringListProperty
-
getConfigStringProperty
-
getConfigIntegerProperty
-
getConfigIntegerProperty
-
getConfigColorProperty
-
getConfigIntegerProperty
-
getConfigFloatProperty
-
getConfigBooleanProperty
-
getConfigColorProperty
-
setEnableTwitterButton
public static void setEnableTwitterButton(boolean value) Enable/disable the Twitter "Tweet This" Buttons.- Parameters:
value-
-
isEnableTwitterButton
public static boolean isEnableTwitterButton() -
getHeaderUrl
-
setHeaderUrl
-