public interface

QueryCreationContext

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

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.

Summary

Public Methods
ApplicationUser getApplicationUser()
Get the User.
User getQueryUser()
This method is deprecated. Use getUser() instead. Since v5.0.
@Deprecated User 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.

public User 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 User 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.