|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.atlassian.confluence.search.v2.DefaultQueryFactory
public class DefaultQueryFactory
A default implementation of QueryFactory that maps query type keys to plugin module complete keys.
Plugin modules must be of type SearchQueryModuleDescriptor
.
So the most common query types can have more readable seralized forms, any query type key that does not look like a plugin module complete key will be assumed to be a module in the "confluence.search.builtin" plugin. So, for example, looking up "inSpace" is the functional equivalent of looking up "confluence.search.builtin:inSpace".
Constructor Summary | |
---|---|
DefaultQueryFactory(PluginAccessor pluginAccessor)
Construct a new query factory |
Method Summary | |
---|---|
SearchQuery |
newQuery(String queryKey)
Generate a SearchQuery without parameters |
SearchQuery |
newQuery(String queryKey,
List parameters)
Generate a SearchQuery with parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultQueryFactory(PluginAccessor pluginAccessor)
pluginAccessor
- the PluginAccessor to retrieve query modules from.Method Detail |
---|
public SearchQuery newQuery(String queryKey) throws InvalidQueryException
QueryFactory
newQuery
in interface QueryFactory
queryKey
- the key for that query type
InvalidQueryException
- if no query can be found for that key, or a query can be found but it can
not be constructed with no parameters.QueryFactory.newQuery(String)
public SearchQuery newQuery(String queryKey, List parameters) throws InvalidQueryException
QueryFactory
newQuery
in interface QueryFactory
queryKey
- the key for that query typeparameters
- the parameters for that query
InvalidQueryException
- if no query can be found for that key, or a query can be found but it can
not be constructed with the given parameters.QueryFactory.newQuery(String, List)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |