public class

DefaultQueryFactory

extends Object
implements QueryFactory
java.lang.Object
   ↳ com.atlassian.confluence.search.v2.DefaultQueryFactory

Class Overview

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".

Summary

Public Constructors
DefaultQueryFactory(PluginAccessor pluginAccessor)
Construct a new query factory
Public Methods
SearchQuery newQuery(String queryKey)
Generate a SearchQuery without parameters
SearchQuery newQuery(String queryKey, List parameters)
Generate a SearchQuery with parameters.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.search.v2.QueryFactory

Public Constructors

public DefaultQueryFactory (PluginAccessor pluginAccessor)

Construct a new query factory

Parameters
pluginAccessor the PluginAccessor to retrieve query modules from.

Public Methods

public SearchQuery newQuery (String queryKey)

Generate a SearchQuery without parameters

Parameters
queryKey the key for that query type
Returns
  • the appropriate SearchQuery object
See Also

public SearchQuery newQuery (String queryKey, List parameters)

Generate a SearchQuery with parameters. Parameters must be either String or SearchQuery instances.

Parameters
queryKey the key for that query type
parameters the parameters for that query
Returns
  • the appropriate SearchQuery object