Configuration.java revision 1330
98N/A * See LICENSE.txt included in this distribution for the specific
98N/A * file and include the License file at LICENSE.txt.
191N/A * package scope, but that didn't work with the XMLDecoder/XMLEncoder.
public final class Configuration {
private boolean historyCache;
private int historyCacheTime;
private boolean historyCacheInDB;
private boolean generateHtml;
/** Default project will be used, when no project is selected and no project is in cookie, so basically only the first time you open the first page, or when you clear your web cookies */
private int indexWordLimit;
private boolean verbose;
//if below is set, then we count how many files per project we need to process and print percentage of completion per project
private boolean printProgress;
private boolean allowLeadingWildcard;
private boolean remoteScmSupported;
private boolean optimizeDatabase;
private boolean useLuceneLocking;
private boolean compressXref;
private boolean indexVersionedFilesOnly;
private int hitsPerPage;
private int cachePages;
private int scanningDepth;
private boolean obfuscatingEMailAddresses;
private boolean chattyStatusPage;
private int tabSize;
public int getTabSize() {
return tabSize;
public int getScanningDepth() {
return scanningDepth;
public Configuration() {
setHistoryCache(true);
setHistoryCacheInDB(false);
//setUrlPrefix("../s?"); // TODO generate relative search paths, get rid of -w <webapp> option to indexer !
setVerbose(false);
setPrintProgress(false);
setGenerateHtml(true);
setQuickContextScan(true);
setRemoteScmSupported(false);
setOptimizeDatabase(true);
setUsingLuceneLocking(false);
setCompressXref(true);
setIndexVersionedFilesOnly(false);
return null;
return ctags;
public int getCachePages() {
return cachePages;
public int getHitsPerPage() {
return hitsPerPage;
public boolean isHistoryCache() {
return historyCache;
public int getHistoryCacheTime() {
return historyCacheTime;
public boolean isHistoryCacheInDB() {
return historyCacheInDB;
return projects;
return sourceRoot;
return dataRoot;
return repositories;
return urlPrefix;
* org.opensolaris.opengrok.analysis.executables.JavaClassAnalyzer} as well
public boolean isGenerateHtml() {
return generateHtml;
return defaultProject;
public int getIndexWordLimit() {
return indexWordLimit;
public boolean isVerbose() {
return verbose;
public boolean isPrintProgress() {
return printProgress;
public boolean isAllowLeadingWildcard() {
return allowLeadingWildcard;
private boolean quickContextScan;
public boolean isQuickContextScan() {
return quickContextScan;
return ignoredNames;
return includedNames;
return userPage;
return userPageSuffix;
return bugPage;
return bugPattern;
return reviewPage;
return reviewPattern;
return webappLAF;
public boolean isRemoteScmSupported() {
return remoteScmSupported;
public boolean isOptimizeDatabase() {
return optimizeDatabase;
public boolean isUsingLuceneLocking() {
return useLuceneLocking;
public boolean isCompressXref() {
return compressXref;
public boolean isIndexVersionedFilesOnly() {
return indexVersionedFilesOnly;
private transient long lastModified;
* to this method after instantiation/de-serialization.
public long getLastModified() {
return lastModified;
return indexLastModified;
return footer;
return header;
return databaseDriver;
return databaseUrl;
return allowedSymlinks;
public boolean isObfuscatingEMailAddresses() {
return obfuscatingEMailAddresses;
public boolean isChattyStatusPage() {
return chattyStatusPage;
e.writeObject(this);
e.close();
return ret;
d.close();