net.sf.statcvs.output
Class ConfigurationOptions

java.lang.Object
  extended by net.sf.statcvs.output.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.

Version:
$Id: ConfigurationOptions.java,v 1.11 2003/06/04 21:50:36 cyganiak Exp $
Author:
jentzsch

Constructor Summary
ConfigurationOptions()
           
 
Method Summary
static java.lang.String getCheckedOutDirectory()
          Method getCheckedOutDirectory.
static CssHandler getCssHandler()
          returns the CssHandler
static java.lang.String getLogFileName()
          Method getLogfilename.
static java.lang.String getLoggingProperties()
          Gets the name of the logging properties file
static java.lang.String getNotes()
          Returns the report notes (from "-notes filename" switch) or null if not specified
static java.lang.String getOutputDir()
          Returns the outputDir.
static java.lang.String getProjectName()
          Method getProjectName.
static boolean getShowCreditInformation()
          Returns whether the credit information should be shown
static WebRepositoryIntegration getWebRepository()
          Returns a WebRepositoryIntegration object if the user has specified a URL to one.
static boolean matchesPatterns(java.lang.String filename)
          Matches a filename against the include and exclude patterns.
static void setCheckedOutDirectory(java.lang.String checkedOutDirectory)
          Sets the checkedOutDirectory.
static void setChoraURL(java.lang.String url)
          Sets the URL to a Chora web-based CVS browser.
static void setCssFile(java.lang.String cssFile)
          Sets the cssFile.
static void setCvswebURL(java.lang.String url)
          Sets the URL to a cvsweb web-based CVS browser.
static void setDebugLogging()
          Sets the logging level to debug
static void setExcludePattern(java.lang.String patternList)
          Sets a file exclude pattern list.
static void setIncludePattern(java.lang.String patternList)
          Sets a file include pattern list.
static void setLogFileName(java.lang.String logFileName)
          Sets the logFileName.
static void setNotesFile(java.lang.String notesFile)
          Sets the name of the notes file.
static void setOutputDir(java.lang.String outputDir)
          Sets the outputDir.
static void setProjectTitle(java.lang.String projectTitle)
          Sets a project title to be used in the reports
static void setShowCreditInformation(boolean enable)
          Enabe or disable the credit information in the generated charts
static void setVerboseLogging()
          Sets the logging level to verbose
static void setViewCvsURL(java.lang.String url)
          Sets the URL to a ViewCVS web-based CVS browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationOptions

public ConfigurationOptions()
Method Detail

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

getShowCreditInformation

public static boolean getShowCreditInformation()
Returns whether the credit information should be shown

Returns:
boolean showCreditInformation

getWebRepository

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

Returns:
the web repository

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 IndexPage 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

setProjectTitle

public static void setProjectTitle(java.lang.String projectTitle)
Sets a project title to be used in the reports

Parameters:
projectTitle - 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


setShowCreditInformation

public static void setShowCreditInformation(boolean enable)
Enabe or disable the credit information in the generated charts

Parameters:
enable - Enabe or disable the credit information in the generated charts

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

matchesPatterns

public static boolean matchesPatterns(java.lang.String filename)
Matches a filename against the include and exclude patterns. If no include pattern was specified, all files will be included. If no exclude pattern was specified, no files will be excluded.

Parameters:
filename - a filename
Returns:
true if the filename matches one of the include patterns and does not match any of the exclude patterns. If it matches an include and an exclude pattern, false will be returned.