com.atlassian.jira.jql.query
Class QueryCreationContextImpl

java.lang.Object
  extended by com.atlassian.jira.jql.query.QueryCreationContextImpl
All Implemented Interfaces:
QueryCreationContext

public class QueryCreationContextImpl
extends Object
implements QueryCreationContext

Default implementation of QueryCreationContext.

Since:
v4.0

Constructor Summary
QueryCreationContextImpl(com.atlassian.crowd.embedded.api.User user)
          Use this constructor unless you know you need to override security.
QueryCreationContextImpl(com.atlassian.crowd.embedded.api.User user, boolean securityOverriden)
          Use this constructor if you need to override security.
 
Method Summary
 boolean equals(Object o)
           
 com.atlassian.crowd.embedded.api.User getQueryUser()
          Get the User.
 com.atlassian.crowd.embedded.api.User getUser()
          Get the User.
 int hashCode()
           
 boolean isSecurityOverriden()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryCreationContextImpl

public QueryCreationContextImpl(com.atlassian.crowd.embedded.api.User user)
Use this constructor unless you know you need to override security.

Parameters:
user - the user performing the search

QueryCreationContextImpl

public QueryCreationContextImpl(com.atlassian.crowd.embedded.api.User user,
                                boolean securityOverriden)
Use this constructor if you need to override security.

Parameters:
user - the user performing the search
securityOverriden - true if you want to override security; false otherwise
Method Detail

getUser

public com.atlassian.crowd.embedded.api.User getUser()
Description copied from interface: QueryCreationContext
Get the User.

Specified by:
getUser in interface QueryCreationContext
Returns:
the user in this context; null signifies the anonymous user.

getQueryUser

public com.atlassian.crowd.embedded.api.User getQueryUser()
Description copied from interface: QueryCreationContext
Get the User.

Specified by:
getQueryUser in interface QueryCreationContext
Returns:
the user in this context; null signifies the anonymous user.

isSecurityOverriden

public boolean isSecurityOverriden()
Specified by:
isSecurityOverriden in interface QueryCreationContext
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.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2013 Atlassian. All Rights Reserved.