|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opensolaris.opengrok.configuration.Configuration
public final class Configuration
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()
|
int |
getCachePages()
|
java.lang.String |
getCtags()
|
java.lang.String |
getDatabaseDriver()
|
java.lang.String |
getDatabaseUrl()
|
java.lang.String |
getDataRoot()
|
java.util.Date |
getDateForLastIndexRun()
|
Project |
getDefaultProject()
|
int |
getHistoryCacheTime()
How long can a history request take before it's cached? If the time is exceeded, the result is cached. |
int |
getHitsPerPage()
|
IgnoredNames |
getIgnoredNames()
|
int |
getIndexWordLimit()
|
java.util.List<Project> |
getProjects()
|
java.util.List<RepositoryInfo> |
getRepositories()
|
java.lang.String |
getReviewPage()
|
java.lang.String |
getReviewPattern()
|
java.lang.String |
getSourceRoot()
|
java.lang.String |
getUrlPrefix()
|
java.lang.String |
getUserPage()
|
java.lang.String |
getWebappLAF()
|
java.lang.String |
getXMLRepresentationAsString()
|
boolean |
isAllowLeadingWildcard()
|
boolean |
isCompressXref()
|
boolean |
isGenerateHtml()
|
boolean |
isHistoryCache()
Should the history log be cached? |
boolean |
isHistoryCacheInDB()
Should the history cache be stored in a database? If yes, JDBCHistoryCache will be used to cache the history; otherwise,
FileHistoryCache is used. |
boolean |
isIndexVersionedFilesOnly()
|
boolean |
isOptimizeDatabase()
|
boolean |
isQuickContextScan()
|
boolean |
isRemoteScmSupported()
|
boolean |
isUsingLuceneLocking()
|
boolean |
isVerbose()
|
static Configuration |
makeXMLStringAsConfiguration(java.lang.String xmlconfig)
|
static Configuration |
read(java.io.File file)
|
void |
setAllowLeadingWildcard(boolean allowLeadingWildcard)
|
void |
setBugPage(java.lang.String bugPage)
|
void |
setBugPattern(java.lang.String bugPattern)
|
void |
setCachePages(int cachePages)
|
void |
setCompressXref(boolean compressXref)
|
void |
setCtags(java.lang.String ctags)
|
void |
setDatabaseDriver(java.lang.String databaseDriver)
|
void |
setDatabaseUrl(java.lang.String databaseUrl)
|
void |
setDataRoot(java.lang.String dataRoot)
|
void |
setDefaultProject(Project defaultProject)
|
void |
setGenerateHtml(boolean generateHtml)
|
void |
setHistoryCache(boolean historyCache)
Set whether history should be cached. |
void |
setHistoryCacheInDB(boolean historyCacheInDB)
Set whether the history cache should be stored in a database, and JDBCHistoryCache should be used instead of FileHistoryCache . |
void |
setHistoryCacheTime(int historyCacheTime)
Set the maximum time a history request can take before it's cached. |
void |
setHitsPerPage(int hitsPerPage)
|
void |
setIgnoredNames(IgnoredNames ignoredNames)
|
void |
setIndexVersionedFilesOnly(boolean indexVersionedFilesOnly)
|
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.List<RepositoryInfo> repositories)
|
void |
setReviewPage(java.lang.String reviewPage)
|
void |
setReviewPattern(java.lang.String reviewPattern)
|
void |
setSourceRoot(java.lang.String sourceRoot)
|
void |
setUrlPrefix(java.lang.String urlPrefix)
|
void |
setUserPage(java.lang.String userPage)
|
void |
setUsingLuceneLocking(boolean useLuceneLocking)
|
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 |
---|
public Configuration()
Method Detail |
---|
public java.lang.String getCtags()
public void setCtags(java.lang.String ctags)
public int getCachePages()
public void setCachePages(int cachePages)
public int getHitsPerPage()
public void setHitsPerPage(int hitsPerPage)
public boolean isHistoryCache()
true
if a HistoryCache
implementation should
be used, false
otherwisepublic void setHistoryCache(boolean historyCache)
historyCache
- if true
enable history cachepublic int getHistoryCacheTime()
FileHistoryCache
.
public void setHistoryCacheTime(int historyCacheTime)
FileHistoryCache
is used.
historyCacheTime
- maximum time in millisecondspublic boolean isHistoryCacheInDB()
JDBCHistoryCache
will be used to cache the history; otherwise,
FileHistoryCache
is used.
public void setHistoryCacheInDB(boolean historyCacheInDB)
JDBCHistoryCache
should be used instead of FileHistoryCache
.
historyCacheInDB
- whether the history cached should be stored in
a databasepublic java.util.List<Project> getProjects()
public void setProjects(java.util.List<Project> projects)
public java.lang.String getSourceRoot()
public void setSourceRoot(java.lang.String sourceRoot)
public java.lang.String getDataRoot()
public void setDataRoot(java.lang.String dataRoot)
public java.util.List<RepositoryInfo> getRepositories()
public void setRepositories(java.util.List<RepositoryInfo> repositories)
public java.lang.String getUrlPrefix()
public void setUrlPrefix(java.lang.String urlPrefix)
public void setGenerateHtml(boolean generateHtml)
public boolean isGenerateHtml()
public void setDefaultProject(Project defaultProject)
public Project getDefaultProject()
public int getIndexWordLimit()
public void setIndexWordLimit(int indexWordLimit)
public boolean isVerbose()
public void setVerbose(boolean verbose)
public void setAllowLeadingWildcard(boolean allowLeadingWildcard)
public boolean isAllowLeadingWildcard()
public boolean isQuickContextScan()
public void setQuickContextScan(boolean quickContextScan)
public void setIgnoredNames(IgnoredNames ignoredNames)
public IgnoredNames getIgnoredNames()
public void setUserPage(java.lang.String userPage)
public java.lang.String getUserPage()
public void setBugPage(java.lang.String bugPage)
public java.lang.String getBugPage()
public void setBugPattern(java.lang.String bugPattern)
public java.lang.String getBugPattern()
public java.lang.String getReviewPage()
public void setReviewPage(java.lang.String reviewPage)
public java.lang.String getReviewPattern()
public void setReviewPattern(java.lang.String reviewPattern)
public java.lang.String getWebappLAF()
public void setWebappLAF(java.lang.String webappLAF)
public boolean isRemoteScmSupported()
public void setRemoteScmSupported(boolean remoteScmSupported)
public boolean isOptimizeDatabase()
public void setOptimizeDatabase(boolean optimizeDatabase)
public boolean isUsingLuceneLocking()
public void setUsingLuceneLocking(boolean useLuceneLocking)
public void setCompressXref(boolean compressXref)
public boolean isCompressXref()
public boolean isIndexVersionedFilesOnly()
public void setIndexVersionedFilesOnly(boolean indexVersionedFilesOnly)
public java.util.Date getDateForLastIndexRun()
public java.lang.String getDatabaseDriver()
public void setDatabaseDriver(java.lang.String databaseDriver)
public java.lang.String getDatabaseUrl()
public void setDatabaseUrl(java.lang.String databaseUrl)
public void write(java.io.File file) throws java.io.IOException
file
- the file to write the configuration into
java.io.IOException
- if an error occurspublic java.lang.String getXMLRepresentationAsString()
public static Configuration read(java.io.File file) throws java.io.IOException
java.io.IOException
public static Configuration makeXMLStringAsConfiguration(java.lang.String xmlconfig) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |