com.atlassian.jira.jql.validator
Class SelectCustomFieldValidator

java.lang.Object
  extended by com.atlassian.jira.jql.validator.SelectCustomFieldValidator
All Implemented Interfaces:
ClauseValidator
Direct Known Subclasses:
CascadingSelectCustomFieldValidator

public class SelectCustomFieldValidator
extends Object
implements ClauseValidator

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

Since:
v4.0

Constructor Summary
SelectCustomFieldValidator(CustomField customField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, I18nHelper.BeanFactory beanFactory)
           
 
Method Summary
protected  List<Option> getOptionsFromLiteral(User searcher, QueryLiteral literal)
           
 MessageSet validate(User searcher, TerminalClause terminalClause)
          Validates a clause and adds human readable i18n'ed messages if there is a problem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectCustomFieldValidator

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

validate

public MessageSet validate(User searcher,
                           TerminalClause terminalClause)
Description copied from interface: ClauseValidator
Validates a clause and adds human readable i18n'ed messages if there is a problem.

Specified by:
validate in interface ClauseValidator
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.

getOptionsFromLiteral

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


Copyright © 2002-2009 Atlassian. All Rights Reserved.