public class

SelectCustomFieldValidator

extends Object
implements ClauseValidator
java.lang.Object
   ↳ com.atlassian.jira.jql.validator.SelectCustomFieldValidator
Known Direct Subclasses

Class Overview

A validator for select custom fields. Takes into account if the user has any context under which she can see the given options.

Summary

Public Constructors
SelectCustomFieldValidator(CustomField customField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, I18nHelper.BeanFactory beanFactory)
Public Methods
MessageSet validate(ApplicationUser searcher, TerminalClause terminalClause)
Validates a clause and adds human readable i18n'ed messages if there is a problem.
Protected Methods
List<Option> getOptionsFromLiteral(ApplicationUser searcher, QueryLiteral literal)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.validator.ClauseValidator

Public Constructors

public SelectCustomFieldValidator (CustomField customField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, I18nHelper.BeanFactory beanFactory)

Public Methods

public MessageSet validate (ApplicationUser searcher, TerminalClause terminalClause)

Validates a clause and adds human readable i18n'ed messages if there is a problem.

Parameters
searcher the user who is executing the search.
terminalClause the clause to validate.
Returns
  • an MessageSet that will contain any messages relating to failed validation. An empty message set must be returned to indicate there were no errors. null can never be returned.

Protected Methods

protected List<Option> getOptionsFromLiteral (ApplicationUser searcher, QueryLiteral literal)