|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wiki.api.filters.BasicPageFilter org.apache.wiki.search.SearchManager
public class SearchManager
Manages searching the Wiki.
Nested Class Summary | |
---|---|
class |
SearchManager.JSONSearch
Provides a JSON RPC API to the JSPWiki Search Engine. |
Field Summary | |
---|---|
static String |
JSON_SEARCH
The name of the JSON object that manages search. |
static String |
PROP_SEARCHPROVIDER
Property name for setting the search provider. |
Fields inherited from class org.apache.wiki.api.filters.BasicPageFilter |
---|
m_engine |
Constructor Summary | |
---|---|
SearchManager(WikiEngine engine,
Properties properties)
Creates a new SearchManager. |
Method Summary | |
---|---|
void |
actionPerformed(WikiEvent event)
If the page has been deleted, removes it from the index. |
Collection |
findPages(String query)
Sends a search to the current search provider. |
SearchProvider |
getSearchEngine()
Returns the SearchProvider used. |
void |
initialize(WikiEngine engine,
Properties properties)
This particular method starts off indexing and all sorts of various activities, so you need to run this last, after things are done. |
void |
pageRemoved(WikiPage page)
Removes the page from the search cache (if any). |
void |
postSave(WikiContext wikiContext,
String content)
Reindexes the page. |
void |
reindexPage(WikiPage page)
Forces the reindex of the given page. |
Methods inherited from class org.apache.wiki.api.filters.BasicPageFilter |
---|
destroy, postTranslate, preSave, preTranslate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_SEARCHPROVIDER
public static final String JSON_SEARCH
Constructor Detail |
---|
public SearchManager(WikiEngine engine, Properties properties) throws FilterException
engine
- The WikiEngine that owns this SearchManager.properties
- The list of Properties.
FilterException
- If it cannot be instantiated.Method Detail |
---|
public void initialize(WikiEngine engine, Properties properties) throws FilterException
initialize
in interface PageFilter
initialize
in class BasicPageFilter
engine
- the wiki engineproperties
- the properties used to initialize the wiki engine
FilterException
- if the search provider failed to initializepublic SearchProvider getSearchEngine()
public Collection findPages(String query) throws ProviderException, IOException
query
- The query. Null is safe, and is interpreted as an empty query.
ProviderException
- If the provider fails and a search cannot be completed.
IOException
- If something else goes wrong.public void pageRemoved(WikiPage page)
page
- The page to removepublic void postSave(WikiContext wikiContext, String content)
postSave
in interface PageFilter
postSave
in class BasicPageFilter
wikiContext
- The WikiContextcontent
- The content which was just stored.public void reindexPage(WikiPage page)
page
- The page.public void actionPerformed(WikiEvent event)
actionPerformed
in interface WikiEventListener
event
- a WikiEvent object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |