@PublicApi public interface

QueryCreationContext

com.atlassian.jira.jql.query.QueryCreationContext
Known Indirect Subclasses

@PublicApi

This interface is designed for plugins to consume (call its methods).

Clients of @PublicApi can expect that programs compiled against a given version will remain binary compatible with later versions of the @PublicApi as per each product's API policy as long as the client does not implement/extend @PublicApi interfaces or classes (refer to each product's API policy for the exact guarantee---usually binary compatibility is guaranteed at least across minor versions).

Note: since @PublicApi interfaces and classes are not designed to be implemented or extended by clients, we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces annotated with @PublicSpi are safe to extend/implement).

Class Overview

A parameter object that encapsulates the context required when creating queries in the JQL way.

The user specified by getUser() represents the user that is performing the search, and thus the user to use when performing security checks in query factories, JQL functions and resolving fields/handlers from clause names.

These security checks will be ignored when the isSecurityOverriden() is set to true. This is necessary when creating queries in the context of administration searches, where you need to ensure that all the results in the system are returned, regardless of who is performing the search.

The determined projects specified by getDeterminedProjects() represent the projects which were impliedfa

Summary

Public Methods
ApplicationUser getApplicationUser()
Get the User.
@Nonnull Set<String> getDeterminedProjects()
ApplicationUser getQueryUser()
This method is deprecated. Use getUser() instead. Since v5.0.
@Deprecated ApplicationUser getUser()
This method is deprecated. since 6.1 use getApplicationUser() instead
boolean isSecurityOverriden()

Public Methods

public ApplicationUser getApplicationUser ()

Get the User.

Returns
  • the user in this context; null signifies the anonymous user.

@Nonnull public Set<String> getDeterminedProjects ()

Returns
  • set of project names/keys determined by clause conditions or empty set if no projects could be determined.

public ApplicationUser getQueryUser ()

This method is deprecated.
Use getUser() instead. Since v5.0.

Get the User.

Returns
  • the user in this context; null signifies the anonymous user.

@Deprecated public ApplicationUser getUser ()

This method is deprecated.
since 6.1 use getApplicationUser() instead

Get the User.

Returns
  • the user in this context; null signifies the anonymous user.

public boolean isSecurityOverriden ()

Returns
  • true if security should be overriden when creating the lucene query or evaluating JQL functions. Security restrictions will also be lifted on retrieving the field ids or clause handler for a clause name. If true, the user specified in getQueryUser() will be ignored. If false, the user will be used to do permission checks.