* @throws RegainException If updating the index failed.
*/
private synchronized void checkUpdate() throws RegainException {
if (indexNeedsUpdate()) {
// The index must be updated
CrawlerConfig config = new XmlCrawlerConfig(CRAWLER_CONFIG_FILE);
Properties authProps = new Properties();
try {
authProps.load(new FileInputStream(AUTH_PROPS_FILE));
} catch( Exception ex ) {
mLog.error("Couldn't load authentication.properties", ex);
}
// Check whether to show the welcome page
if (config.getStartUrls().length == 0) {
// There are no start URLs defined -> Show the welcome page
mLog.info("There is nothing configured. Showing the welcome page.");
DesktopToolkit.openPageInBrowser("welcome.jsp");
// Show the welcome page again, when the next update period is finished