/**   
 * License Agreement for Jaeksoft OpenSearchServer
 *
 * Copyright (C) 2008-2009 Emmanuel Keller / Jaeksoft
 * 
 * http://www.open-search-server.com
 * 
 * This file is part of Jaeksoft OpenSearchServer.
 *
 * Jaeksoft OpenSearchServer is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 * Jaeksoft OpenSearchServer is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Jaeksoft OpenSearchServer. 
 *  If not, see <http://www.gnu.org/licenses/>.
 **/

package com.jaeksoft.searchlib.web.controller;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import com.jaeksoft.searchlib.Client;
import com.jaeksoft.searchlib.SearchLibException;

public class IndexController extends CommonController {

	/**
	 * 
	 */
	private static final long serialVersionUID = -7590913483471357743L;

	private String release = null;

	public IndexController() throws SearchLibException {
		super();
	}

	public String getRelease() throws IOException {
		synchronized (this) {
			if (release != null)
				return release;
			InputStream is = null;
			try {
				is = getDesktop().getWebApp().getResourceAsStream("/version");
				Properties properties = new Properties();
				properties.load(is);
				String version = properties.getProperty("VERSION");
				String stage = properties.getProperty("STAGE");
				String revision = properties.getProperty("REVISION");

				release = "Open Search Server v" + version + " - " + stage;
				if (revision != null)
					release += " r" + properties.getProperty("REVISION");
			} finally {
				if (is != null)
					is.close();
			}
			return release;
		}
	}

	public String getIndexTitle() throws SearchLibException {
		Client client = getClient();
		if (client != null)
			return " Index: " + client.getIndexDirectory().getName();
		return "Indices";
	}
}

@@ -1827,16 +1827,68 @@
 ISION%22);
+%0A%09%09%09%09String build = properties.getProperty(%22BUILD%22);
 %0A%0A%09%09%09%09re
@@ -1993,47 +1993,86 @@
 = %22 
-r%22 + properties.getProperty(%22REVISION%22)
+- rev %22 + revision;%0A%09%09%09%09if (build != null)%0A%09%09%09%09%09release += %22 - build %22 + build
 ;%0A%09%09

Add build information in label title.