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 java.lang.Object
implements QueryCreationContext

Default implementation of QueryCreationContext.

Since:
v4.0

Constructor Summary
QueryCreationContextImpl(com.opensymphony.user.User user)
          Use this constructor unless you know you need to override security.
QueryCreationContextImpl(com.opensymphony.user.User user, boolean securityOverriden)
          Use this constructor if you need to override security.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 com.opensymphony.user.User getUser()
           
 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.opensymphony.user.User user)
Use this constructor unless you know you need to override security.

Parameters:
user - the user performing the search

QueryCreationContextImpl

public QueryCreationContextImpl(com.opensymphony.user.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.opensymphony.user.User getUser()
Specified by:
getUser 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.getUser() will be ignored. If false, the user will be used to do permission checks.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.