01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. The ASF licenses this file to You
04: * under the Apache License, Version 2.0 (the "License"); you may not
05: * use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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.business.search;
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: /** Does index need to be rebuild */
32: public abstract boolean isInconsistentAtStartup();
33:
34: /** Remove user from index, returns immediately and operates in background */
35: public void removeWebsiteIndex(WebsiteData website)
36: throws RollerException;
37:
38: /** Remove entry from index, returns immediately and operates in background */
39: public void removeEntryIndexOperation(WeblogEntryData entry)
40: throws RollerException;
41:
42: /** Add entry to index, returns immediately and operates in background */
43: public void addEntryIndexOperation(WeblogEntryData entry)
44: throws RollerException;
45:
46: /** R-index entry, returns immediately and operates in background */
47: public void addEntryReIndexOperation(WeblogEntryData entry)
48: throws RollerException;
49:
50: /** Execute operation immediately */
51: public abstract void executeIndexOperationNow(
52: final IndexOperation op);
53:
54: /**
55: * Release all resources associated with Roller session.
56: */
57: public abstract void release();
58:
59: /** Shutdown to be called on application shutdown */
60: public abstract void shutdown();
61:
62: public abstract void rebuildWebsiteIndex(WebsiteData website)
63: throws RollerException;
64:
65: public abstract void rebuildWebsiteIndex() throws RollerException;
66: }
|