Package com.atlassian.jira.jql.query
Class QueryCreationContextImpl
java.lang.Object
com.atlassian.jira.jql.query.QueryCreationContextImpl
- All Implemented Interfaces:
QueryCreationContext
Default implementation of
QueryCreationContext.- Since:
- v4.0
-
Constructor Summary
ConstructorsConstructorDescriptionQueryCreationContextImpl(QueryCreationContext queryCreationContext, Set<String> determinedProjects) Use this constructor unless you know you need to override security.QueryCreationContextImpl(ApplicationUser user, boolean securityOverriden) QueryCreationContextImpl(ApplicationUser user, boolean securityOverriden, Set<String> determinedProjects) Use this constructor if you need to override security. -
Method Summary
-
Constructor Details
-
QueryCreationContextImpl
Use this constructor unless you know you need to override security.- Parameters:
user- the user performing the search
-
QueryCreationContextImpl
-
QueryCreationContextImpl
public QueryCreationContextImpl(QueryCreationContext queryCreationContext, Set<String> determinedProjects) -
QueryCreationContextImpl
public QueryCreationContextImpl(ApplicationUser user, boolean securityOverriden, Set<String> determinedProjects) Use this constructor if you need to override security.- Parameters:
user- the user performing the searchsecurityOverriden- true if you want to override security; false otherwise
-
-
Method Details
-
getApplicationUser
Description copied from interface:QueryCreationContextGet the User.- Specified by:
getApplicationUserin interfaceQueryCreationContext- Returns:
- the user in this context; null signifies the anonymous user.
-
getUser
Description copied from interface:QueryCreationContextGet the User.- Specified by:
getUserin interfaceQueryCreationContext- Returns:
- the user in this context; null signifies the anonymous user.
-
getQueryUser
Description copied from interface:QueryCreationContextGet the User.- Specified by:
getQueryUserin interfaceQueryCreationContext- Returns:
- the user in this context; null signifies the anonymous user.
-
isSecurityOverriden
public boolean isSecurityOverriden()- Specified by:
isSecurityOverridenin interfaceQueryCreationContext- 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
QueryCreationContext.getQueryUser()will be ignored. If false, the user will be used to do permission checks.
-
getDeterminedProjects
- Specified by:
getDeterminedProjectsin interfaceQueryCreationContext- Returns:
- set of project names/keys determined by clause conditions or empty set if no projects could be determined.
-
equals
-
hashCode
public int hashCode() -
toString
-