Class ConfigurationOptions


  • public class ConfigurationOptions
    extends java.lang.Object
    Class for storing all command line parameters. The parameters are set by the Main.main(java.lang.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 Detail

      • ConfigurationOptions

        public ConfigurationOptions()
    • Method Detail

      • getCharSet

        public static java.lang.String getCharSet()
      • setCharSet

        public static void setCharSet​(java.lang.String cs)
      • getCssHandler

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

        public static java.lang.String getProjectName()
        Method getProjectName.
        Returns:
        String name of the project
      • getCheckedOutDirectory

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

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

        public static java.lang.String getOutputDir()
        Returns the outputDir.
        Returns:
        String output Directory
      • getNotes

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

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

        public static void setCssFile​(java.lang.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
      • setLogFileName

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

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

        public static void setNotesFile​(java.lang.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
      • setViewCvsURL

        public static void setViewCvsURL​(java.lang.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
      • setCvswebURL

        public static void setCvswebURL​(java.lang.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
      • setChoraURL

        public static void setChoraURL​(java.lang.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
      • setJCVSWebURL

        public static void setJCVSWebURL​(java.lang.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
      • setViewVcURL

        public static void setViewVcURL​(java.lang.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
      • setViewTracURL

        public static void setViewTracURL​(java.lang.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
      • setProjectName

        public static void setProjectName​(java.lang.String projectName)
        Sets a project title to be used in the reports
        Parameters:
        projectName - The project title to be used in the reports
      • getLoggingProperties

        public static java.lang.String 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

        public static void setIncludePattern​(java.lang.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 ;
        See Also:
        FilePatternMatcher
      • setExcludePattern

        public static void setExcludePattern​(java.lang.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 ;
        See Also:
        FilePatternMatcher
      • getExcludePattern

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

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

        public static java.util.regex.Pattern getSymbolicNamesPattern()
      • setBugzillaUrl

        public static void setBugzillaUrl​(java.lang.String bugzillaUrl)
      • setMantisUrl

        public static void setMantisUrl​(java.lang.String mantisUrl)
      • getWebBugtracker

        public static BugTracker getWebBugtracker()
      • getOutputFormat

        public static java.lang.String getOutputFormat()
      • getMarkupSyntax

        public static MarkupSyntax getMarkupSyntax()
      • setDefaultCssFile

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

        public static void addNonDeveloperLogin​(java.lang.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
      • getNonDeveloperLogins

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

        public static void setConfigFile​(java.lang.String propertiesFilename)
                                  throws ConfigurationException
        Set the config file that may contain user details.
        Parameters:
        propertiesFilename -
        Throws:
        ConfigurationException
      • getConfigProperties

        public static java.util.Properties getConfigProperties()
        The config properties.
        Returns:
      • getConfigStringProperty

        public static java.lang.String getConfigStringProperty​(java.lang.String propName,
                                                               java.lang.String defaultValue)
        Return a String prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigStringListProperty

        public static java.util.List getConfigStringListProperty​(java.lang.String propName,
                                                                 java.lang.String defaultValue)
        Return a list of String prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
        List (could be empty)
      • getConfigStringProperty

        public static java.lang.String getConfigStringProperty​(java.lang.String propName,
                                                               java.lang.String fallBackPropName,
                                                               java.lang.String defaultValue)
      • getConfigIntegerProperty

        public static java.lang.Integer getConfigIntegerProperty​(java.lang.String propName,
                                                                 java.lang.Integer defaultValue)
        Return a Integer prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigIntegerProperty

        public static java.lang.Float getConfigIntegerProperty​(java.lang.String propName,
                                                               java.lang.Float defaultValue)
        Return a Float prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigColorProperty

        public static java.awt.Color getConfigColorProperty​(java.lang.String propName,
                                                            java.awt.Color defaultValue)
        Return a String prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigIntegerProperty

        public static java.lang.Integer getConfigIntegerProperty​(java.lang.String propName,
                                                                 java.lang.String fallBackPropName,
                                                                 java.lang.Integer defaultValue)
        Return a Integer prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigFloatProperty

        public static java.lang.Float getConfigFloatProperty​(java.lang.String propName,
                                                             java.lang.String fallBackPropName,
                                                             java.lang.Float defaultValue)
        Return a Float prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigBooleanProperty

        public static java.lang.Boolean getConfigBooleanProperty​(java.lang.String propName,
                                                                 java.lang.String fallBackPropName,
                                                                 java.lang.Boolean defaultValue)
        Return a Boolean prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • getConfigColorProperty

        public static java.awt.Color getConfigColorProperty​(java.lang.String propName,
                                                            java.lang.String fallBackPropName,
                                                            java.awt.Color defaultValue)
        Return a Color prop.
        Parameters:
        propName -
        defaultValue -
        Returns:
      • setEnableTwitterButton

        public static void setEnableTwitterButton​(boolean value)
        Enable/disable the Twitter "Tweet This" Buttons.
        Parameters:
        value -
      • isEnableTwitterButton

        public static boolean isEnableTwitterButton()
      • getHeaderUrl

        public static java.lang.String getHeaderUrl()
      • setHeaderUrl

        public static void setHeaderUrl​(java.lang.String headerUrl)
      • getFooterUrl

        public static java.lang.String getFooterUrl()
      • setFooterUrl

        public static void setFooterUrl​(java.lang.String footerUrl)