Package com.atlassian.jira.jql.query
Interface QueryCreationContext
- All Known Implementing Classes:
QueryCreationContextImpl
@PublicApi
public interface QueryCreationContext
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
- Since:
- v4.0
-
Method Summary
Modifier and TypeMethodDescriptionGet the User.Deprecated.getUser()
Deprecated.since 6.1 usegetApplicationUser()
insteadboolean
-
Method Details
-
getUser
Deprecated.since 6.1 usegetApplicationUser()
insteadGet the User.- Returns:
- the user in this context; null signifies the anonymous user.
-
getApplicationUser
Get the User.- Returns:
- the user in this context; null signifies the anonymous user.
-
getQueryUser
ApplicationUser getQueryUser()Deprecated.UsegetUser()
instead. Since v5.0.Get the User.- Returns:
- the user in this context; null signifies the anonymous user.
-
isSecurityOverriden
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.
-
getDeterminedProjects
- Returns:
- set of project names/keys determined by clause conditions or empty set if no projects could be determined.
-
getUser()
instead.