|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.xpn.xwiki.api.Api
com.xpn.xwiki.plugin.PluginApi<GlobalSearchPlugin>
com.xpn.xwiki.plugin.globalsearch.GlobalSearchPluginApi
public class GlobalSearchPluginApi
API tool to be able to make and merge multi wikis search queries.
| Field Summary | |
|---|---|
static java.lang.String |
CONTEXT_LASTERRORCODE
Field name of the last error code inserted in context. |
static java.lang.String |
CONTEXT_LASTEXCEPTION
Field name of the last API exception inserted in context. |
protected static org.apache.commons.logging.Log |
LOG
Logging tool. |
| Fields inherited from class com.xpn.xwiki.api.Api |
|---|
context |
| Constructor Summary | |
|---|---|
GlobalSearchPluginApi(GlobalSearchPlugin plugin,
com.xpn.xwiki.XWikiContext context)
Create an instance of GlobalSearchPluginApi. |
|
| Method Summary | |
|---|---|
void |
logError(java.lang.String errorMessage,
com.xpn.xwiki.XWikiException e)
Log error and store details in the context. |
GlobalSearchQuery |
newQuery()
Create a new instance of GlobalSearchQuery and return it. |
java.util.Collection<GlobalSearchResult> |
search(GlobalSearchQuery query)
Execute query in all provided wikis and return list containing all results. |
java.util.Collection<com.xpn.xwiki.api.Document> |
searchDocuments(GlobalSearchQuery query,
boolean distinctbylanguage)
Search wiki pages in all provided wikis and return list containing found Document. |
java.util.Collection<java.lang.String> |
searchDocumentsNames(GlobalSearchQuery query,
boolean distinctbylanguage,
boolean checkRight)
Search wiki pages in all provided wikis and return list containing found Document. |
| Methods inherited from class com.xpn.xwiki.plugin.PluginApi |
|---|
getInternalPlugin, getPlugin, getProtectedPlugin, setPlugin |
| Methods inherited from class com.xpn.xwiki.api.Api |
|---|
checkProgrammingRights, convert, convert, getXWikiContext, hasAccessLevel, hasAdminRights, hasProgrammingRights |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CONTEXT_LASTERRORCODE
public static final java.lang.String CONTEXT_LASTEXCEPTION
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
public GlobalSearchPluginApi(GlobalSearchPlugin plugin,
com.xpn.xwiki.XWikiContext context)
plugin - the entry point of the Global Search plugin.context - the XWiki context.| Method Detail |
|---|
public void logError(java.lang.String errorMessage,
com.xpn.xwiki.XWikiException e)
errorMessage - error message.e - the catched exception.public GlobalSearchQuery newQuery()
GlobalSearchQuery and return it.
GlobalSearchQuery and return it.
public java.util.Collection<GlobalSearchResult> search(GlobalSearchQuery query)
throws com.xpn.xwiki.XWikiException
query - the query parameters. The hql has some constraints:
GlobalSearchResult containing all selected fields values.
com.xpn.xwiki.XWikiException - error when executing query.
public java.util.Collection<com.xpn.xwiki.api.Document> searchDocuments(GlobalSearchQuery query,
boolean distinctbylanguage)
throws com.xpn.xwiki.XWikiException
Document.
Compared to XWiki Platform search, searchDocuments and searchDocumentsName it's potentially "time-consuming"
since it issues one request per provided wiki.
query - the query parameters. The hql has some constraints:
distinctbylanguage - when a document has multiple version for each language it is returned as one document a
language.
Document.
com.xpn.xwiki.XWikiException - error when executing query.
public java.util.Collection<java.lang.String> searchDocumentsNames(GlobalSearchQuery query,
boolean distinctbylanguage,
boolean checkRight)
throws com.xpn.xwiki.XWikiException
Document.
Compared to XWiki Platform search, searchDocuments and searchDocumentsName it's potentially "time-consuming"
since it issues one request per provided wiki.
query - the query parameters. The hql has some constraints:
distinctbylanguage - when a document has multiple version for each language it is returned as one document a
language.checkRight - if true check for each found document if context's user has "view" rights for it.
Document.
com.xpn.xwiki.XWikiException - error when executing query.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||