org.opensolaris.opengrok.configuration
Class Configuration

java.lang.Object
  extended by org.opensolaris.opengrok.configuration.Configuration

public class Configuration
extends java.lang.Object

Placeholder class for all configuration variables. Due to the multithreaded nature of the web application, each thread will use the same instance of the configuration object for each page request. Class and methods should have package scope, but that didn't work with the XMLDecoder/XMLEncoder.


Constructor Summary
Configuration()
          Creates a new instance of Configuration
 
Method Summary
 java.lang.String getBugPage()
           
 java.lang.String getBugPattern()
           
 java.lang.String getCtags()
           
 java.lang.String getDataRoot()
           
 Project getDefaultProject()
           
 int getHistoryCacheTime()
           
 IgnoredNames getIgnoredNames()
           
 int getIndexWordLimit()
           
 java.util.List<Project> getProjects()
           
 java.util.Map<java.lang.String,ExternalRepository> getRepositories()
           
 java.lang.String getSourceRoot()
           
 java.lang.String getUrlPrefix()
           
 java.lang.String getUserPage()
           
 java.lang.String getWebappLAF()
           
 boolean isAllowLeadingWildcard()
           
 boolean isGenerateHtml()
           
 boolean isHistoryCache()
           
 boolean isOptimizeDatabase()
           
 boolean isQuickContextScan()
           
 boolean isRemoteScmSupported()
           
 boolean isVerbose()
           
static Configuration read(java.io.File file)
           
 void setAllowLeadingWildcard(boolean allowLeadingWildcard)
           
 void setBugPage(java.lang.String bugPage)
           
 void setBugPattern(java.lang.String bugPattern)
           
 void setCtags(java.lang.String ctags)
           
 void setDataRoot(java.lang.String dataRoot)
           
 void setDefaultProject(Project defaultProject)
           
 void setGenerateHtml(boolean generateHtml)
           
 void setHistoryCache(boolean historyCache)
           
 void setHistoryCacheTime(int historyCacheTime)
           
 void setIgnoredNames(IgnoredNames ignoredNames)
           
 void setIndexWordLimit(int indexWordLimit)
           
 void setOptimizeDatabase(boolean optimizeDatabase)
           
 void setProjects(java.util.List<Project> projects)
           
 void setQuickContextScan(boolean quickContextScan)
           
 void setRemoteScmSupported(boolean remoteScmSupported)
           
 void setRepositories(java.util.Map<java.lang.String,ExternalRepository> repositories)
           
 void setSourceRoot(java.lang.String sourceRoot)
           
 void setUrlPrefix(java.lang.String urlPrefix)
           
 void setUserPage(java.lang.String userPage)
           
 void setVerbose(boolean verbose)
           
 void setWebappLAF(java.lang.String webappLAF)
           
 void write(java.io.File file)
          Write the current configuration to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()
Creates a new instance of Configuration

Method Detail

getCtags

public java.lang.String getCtags()

setCtags

public void setCtags(java.lang.String ctags)

isHistoryCache

public boolean isHistoryCache()

setHistoryCache

public void setHistoryCache(boolean historyCache)

getHistoryCacheTime

public int getHistoryCacheTime()

setHistoryCacheTime

public void setHistoryCacheTime(int historyCacheTime)

getProjects

public java.util.List<Project> getProjects()

setProjects

public void setProjects(java.util.List<Project> projects)

getSourceRoot

public java.lang.String getSourceRoot()

setSourceRoot

public void setSourceRoot(java.lang.String sourceRoot)

getDataRoot

public java.lang.String getDataRoot()

setDataRoot

public void setDataRoot(java.lang.String dataRoot)

getRepositories

public java.util.Map<java.lang.String,ExternalRepository> getRepositories()

setRepositories

public void setRepositories(java.util.Map<java.lang.String,ExternalRepository> repositories)

getUrlPrefix

public java.lang.String getUrlPrefix()

setUrlPrefix

public void setUrlPrefix(java.lang.String urlPrefix)

setGenerateHtml

public void setGenerateHtml(boolean generateHtml)

isGenerateHtml

public boolean isGenerateHtml()

setDefaultProject

public void setDefaultProject(Project defaultProject)

getDefaultProject

public Project getDefaultProject()

getIndexWordLimit

public int getIndexWordLimit()

setIndexWordLimit

public void setIndexWordLimit(int indexWordLimit)

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean verbose)

setAllowLeadingWildcard

public void setAllowLeadingWildcard(boolean allowLeadingWildcard)

isAllowLeadingWildcard

public boolean isAllowLeadingWildcard()

isQuickContextScan

public boolean isQuickContextScan()

setQuickContextScan

public void setQuickContextScan(boolean quickContextScan)

setIgnoredNames

public void setIgnoredNames(IgnoredNames ignoredNames)

getIgnoredNames

public IgnoredNames getIgnoredNames()

setUserPage

public void setUserPage(java.lang.String userPage)

getUserPage

public java.lang.String getUserPage()

setBugPage

public void setBugPage(java.lang.String bugPage)

getBugPage

public java.lang.String getBugPage()

setBugPattern

public void setBugPattern(java.lang.String bugPattern)

getBugPattern

public java.lang.String getBugPattern()

getWebappLAF

public java.lang.String getWebappLAF()

setWebappLAF

public void setWebappLAF(java.lang.String webappLAF)

isRemoteScmSupported

public boolean isRemoteScmSupported()

setRemoteScmSupported

public void setRemoteScmSupported(boolean remoteScmSupported)

isOptimizeDatabase

public boolean isOptimizeDatabase()

setOptimizeDatabase

public void setOptimizeDatabase(boolean optimizeDatabase)

write

public void write(java.io.File file)
           throws java.io.IOException
Write the current configuration to a file

Parameters:
file - the file to write the configuration into
Throws:
java.io.IOException - if an error occurs

read

public static Configuration read(java.io.File file)
                          throws java.io.IOException
Throws:
java.io.IOException