com.atlassian.greenhopper.web.rapid.view
Class JqlHelper

java.lang.Object
  extended by com.atlassian.greenhopper.global.AbstractLoggable
      extended by com.atlassian.greenhopper.web.rapid.view.JqlHelper

@Service
public class JqlHelper
extends AbstractLoggable

Helper class for validation and creation of jql, used by SwimlanesHelper and QuickFiltersHelper


Field Summary
 
Fields inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logger
 
Constructor Summary
JqlHelper()
           
 
Method Summary
 ServiceOutcome<com.atlassian.query.Query> createQuery(com.atlassian.crowd.embedded.api.User user, java.lang.String jqlQuery)
           
 ServiceOutcome<com.atlassian.query.Query> createQuery(com.atlassian.crowd.embedded.api.User user, java.lang.String jqlQuery, java.lang.String errorContext)
          Translates the query string into a query object Note: This is an adaption of IssueNavigator.getNewSearchQuery
 com.atlassian.query.Query createQuery(com.atlassian.crowd.embedded.api.User user, java.lang.String jqlQuery, java.lang.String errorContext, ErrorCollection errors)
          Translates the query string into a query object Note: This is an adaption of IssueNavigator.getNewSearchQuery
 java.lang.String getSanitisedQueryString(com.atlassian.crowd.embedded.api.User user, java.lang.String query)
          Sanitise the JQL fragment stored against the quick filter/swimlane so that the current user does not accidentally get shown sensitive information.
 ServiceOutcome<com.atlassian.query.Query> validateJql(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query, java.lang.String errorContext)
          Ensure the jql is properly parsable and not invalid Note: this is an adapted copy of IssueNavigator.validateQuery
 void validateJql(com.atlassian.crowd.embedded.api.User user, com.atlassian.query.Query query, java.lang.String errorContext, ErrorCollection errors)
          Ensure the jql is properly parsable and not invalid Note: this is an adapted copy of IssueNavigator.validateQuery
 ServiceOutcome<com.atlassian.query.Query> validateJql(com.atlassian.crowd.embedded.api.User user, java.lang.String queryString, java.lang.String errorContext)
          Validates a jql query string.
 void validateJql(com.atlassian.crowd.embedded.api.User user, java.lang.String queryString, java.lang.String errorContext, ErrorCollection errors)
          Validates a jql query string.
 
Methods inherited from class com.atlassian.greenhopper.global.AbstractLoggable
logDebug, logError, logException, logInfo, logTrace, logWarn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JqlHelper

public JqlHelper()
Method Detail

validateJql

public void validateJql(com.atlassian.crowd.embedded.api.User user,
                        java.lang.String queryString,
                        java.lang.String errorContext,
                        ErrorCollection errors)
Validates a jql query string.


validateJql

public ServiceOutcome<com.atlassian.query.Query> validateJql(com.atlassian.crowd.embedded.api.User user,
                                                             java.lang.String queryString,
                                                             java.lang.String errorContext)
Validates a jql query string.


validateJql

public void validateJql(com.atlassian.crowd.embedded.api.User user,
                        com.atlassian.query.Query query,
                        java.lang.String errorContext,
                        ErrorCollection errors)
Ensure the jql is properly parsable and not invalid Note: this is an adapted copy of IssueNavigator.validateQuery


validateJql

public ServiceOutcome<com.atlassian.query.Query> validateJql(com.atlassian.crowd.embedded.api.User user,
                                                             com.atlassian.query.Query query,
                                                             java.lang.String errorContext)
Ensure the jql is properly parsable and not invalid Note: this is an adapted copy of IssueNavigator.validateQuery


createQuery

public com.atlassian.query.Query createQuery(com.atlassian.crowd.embedded.api.User user,
                                             java.lang.String jqlQuery,
                                             java.lang.String errorContext,
                                             ErrorCollection errors)
Translates the query string into a query object Note: This is an adaption of IssueNavigator.getNewSearchQuery


createQuery

public ServiceOutcome<com.atlassian.query.Query> createQuery(com.atlassian.crowd.embedded.api.User user,
                                                             java.lang.String jqlQuery)

createQuery

public ServiceOutcome<com.atlassian.query.Query> createQuery(com.atlassian.crowd.embedded.api.User user,
                                                             java.lang.String jqlQuery,
                                                             java.lang.String errorContext)
Translates the query string into a query object Note: This is an adaption of IssueNavigator.getNewSearchQuery


getSanitisedQueryString

public java.lang.String getSanitisedQueryString(com.atlassian.crowd.embedded.api.User user,
                                                java.lang.String query)
Sanitise the JQL fragment stored against the quick filter/swimlane so that the current user does not accidentally get shown sensitive information.

Parameters:
user - the current user
query - the JQL fragment
Returns:
the sanitised fragment


Copyright © 2007-2012 Atlassian. All Rights Reserved.