1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. The ASF licenses this file to You 4 * under the Apache License, Version 2.0 (the "License"); you may not 5 * use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. For additional information regarding 15 * copyright in this work, please see the NOTICE file in the top level 16 * directory of this distribution. 17 */ 18 package org.apache.roller.model; 19 20 import org.apache.roller.RollerException; 21 import org.apache.roller.business.search.operations.IndexOperation; 22 import org.apache.roller.pojos.UserData; 23 import org.apache.roller.pojos.WeblogEntryData; 24 import org.apache.roller.pojos.WebsiteData; 25 26 /** 27 * Interface to Roller's Lucene-based search facility. 28 * @author Dave Johnson 29 */ 30 public interface IndexManager 31 { 32 /** Does index need to be rebuild */ 33 public abstract boolean isInconsistentAtStartup(); 34 35 /** Remove user from index, returns immediately and operates in background */ 36 public void removeWebsiteIndex(WebsiteData website) throws RollerException; 37 38 /** Remove entry from index, returns immediately and operates in background */ 39 public void removeEntryIndexOperation(WeblogEntryData entry) throws RollerException; 40 41 /** Add entry to index, returns immediately and operates in background */ 42 public void addEntryIndexOperation(WeblogEntryData entry) throws RollerException; 43 44 /** R-index entry, returns immediately and operates in background */ 45 public void addEntryReIndexOperation(WeblogEntryData entry) throws RollerException; 46 47 /** Execute operation immediately */ 48 public abstract void executeIndexOperationNow(final IndexOperation op); 49 50 /** 51 * Release all resources associated with Roller session. 52 */ 53 public abstract void release(); 54 55 /** Shutdown to be called on application shutdown */ 56 public abstract void shutdown(); 57 58 public abstract void rebuildWebsiteIndex(WebsiteData website) throws RollerException; 59 60 public abstract void rebuildWebsiteIndex() throws RollerException; 61 }