Package org.apache.wiki.search
Class DefaultSearchManager.JSONSearch
- java.lang.Object
- 
- org.apache.wiki.search.DefaultSearchManager.JSONSearch
 
- 
- All Implemented Interfaces:
- WikiAjaxServlet
 - Enclosing class:
- DefaultSearchManager
 
 public class DefaultSearchManager.JSONSearch extends java.lang.Object implements WikiAjaxServlet Provides a JSON AJAX API to the JSPWiki Search Engine.
- 
- 
Field SummaryFields Modifier and Type Field Description static java.lang.StringAJAX_ACTION_PAGESstatic java.lang.StringAJAX_ACTION_SUGGESTIONSstatic intDEFAULT_MAX_RESULTSintmaxResults
 - 
Constructor SummaryConstructors Constructor Description JSONSearch()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.util.Map<java.lang.String,java.lang.Object>>findPages(java.lang.String searchString, int maxLength, Context wikiContext)Performs a full search of pages.java.lang.StringgetServletMapping()java.util.List<java.lang.String>getSuggestions(java.lang.String wikiName, int maxLength)Provides a list of suggestions to use for a page name.voidservice(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String actionName, java.util.List<java.lang.String> params)
 
- 
- 
- 
Field Detail- 
AJAX_ACTION_SUGGESTIONSpublic static final java.lang.String AJAX_ACTION_SUGGESTIONS - See Also:
- Constant Field Values
 
 - 
AJAX_ACTION_PAGESpublic static final java.lang.String AJAX_ACTION_PAGES - See Also:
- Constant Field Values
 
 - 
DEFAULT_MAX_RESULTSpublic static final int DEFAULT_MAX_RESULTS - See Also:
- Constant Field Values
 
 - 
maxResultspublic int maxResults 
 
- 
 - 
Constructor Detail- 
JSONSearchpublic JSONSearch() 
 
- 
 - 
Method Detail- 
getServletMappingpublic java.lang.String getServletMapping() - Specified by:
- getServletMappingin interface- WikiAjaxServlet
 
 - 
servicepublic void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, java.lang.String actionName, java.util.List<java.lang.String> params) throws java.io.IOException - Specified by:
- servicein interface- WikiAjaxServlet
- Throws:
- java.io.IOException
 
 - 
getSuggestionspublic java.util.List<java.lang.String> getSuggestions(java.lang.String wikiName, int maxLength) Provides a list of suggestions to use for a page name. Currently, the algorithm just looks into the value parameter, and returns all page names from that.- Parameters:
- wikiName- the page name
- maxLength- maximum number of suggestions
- Returns:
- the suggestions
 
 
- 
 
-