@@ -0,0 +1,1627 @@
+/*%0A * Copyright 2014 hbz NRW (http://www.hbz-nrw.de/)%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *  you may not use this file except in compliance with the License.%0A *  You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *  Unless required by applicable law or agreed to in writing, software%0A *  distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *  See the License for the specific language governing permissions and%0A * limitations under the License.%0A *%0A */%0Aimport helper.Globals;%0Aimport play.Application;%0Aimport play.GlobalSettings;%0Aimport play.libs.F.Promise;%0Aimport play.mvc.Action;%0Aimport play.mvc.Http.Request;%0Aimport play.mvc.Http.RequestHeader;%0Aimport play.mvc.SimpleResult;%0Aimport static play.mvc.Results.*;%0A%0Aimport java.lang.reflect.Method;%0A%0A/**%0A * @author Jan Schnasse%0A *%0A */%0Apublic class Global extends GlobalSettings %7B%0A    @Override%0A    public void onStart(Application app) %7B%0A%09play.Logger.info(%22Application has started%22);%0A%09Globals.search.init(Globals.namespaces);%0A    %7D%0A%0A    @Override%0A    public void onStop(Application app) %7B%0A%09play.Logger.info(%22Application shutdown...%22);%0A    %7D%0A%0A    public Promise%3CSimpleResult%3E onHandlerNotFound(RequestHeader request) %7B%0A%09return Promise.%3CSimpleResult%3E pure(notFound(%22Action not found %22%0A%09%09+ request.uri()));%0A    %7D%0A%0A    @SuppressWarnings(%22rawtypes%22)%0A    public Action onRequest(Request request, Method actionMethod) %7B%0A%09play.Logger.debug(request.toString());%0A%09return super.onRequest(request, actionMethod);%0A    %7D%0A%7D%0A

add Global object - initalized indexes at startup