com.atlassian.jira.jql.query
Interface QueryCreationContext

All Known Implementing Classes:
QueryCreationContextImpl

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.

Since:
v4.0

Method Summary
 com.atlassian.crowd.embedded.api.User getQueryUser()
          Deprecated. Use getUser() instead. Since v5.0.
 com.atlassian.crowd.embedded.api.User getUser()
          Get the User.
 boolean isSecurityOverriden()
           
 

Method Detail

getUser

com.atlassian.crowd.embedded.api.User getUser()
Get the User.

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

getQueryUser

com.atlassian.crowd.embedded.api.User getQueryUser()
Deprecated. Use getUser() 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.


Copyright © 2002-2013 Atlassian. All Rights Reserved.