public abstract class

AbstractUserBasedFunction

extends AbstractJqlFunction
java.lang.Object
   ↳ com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
     ↳ com.atlassian.jira.plugin.jql.function.AbstractUserBasedFunction
Known Direct Subclasses

Class Overview

This is an abstract parent to user based functions that rely on returning a list of a list of QueryLiteral based on either the current user or a user passed as a parameter.

This function expects zero or one argument. If zero arguments are supplied the current logged in user will be used.

Summary

Fields
protected final UserUtil userUtil
Public Constructors
AbstractUserBasedFunction(UserUtil userUtil)
Public Methods
int getMinimumNumberOfExpectedArguments()
List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand functionOperand, TerminalClause terminalClause)
MessageSet validate(ApplicationUser searcher, FunctionOperand functionOperand, TerminalClause terminalClause)
Protected Methods
abstract List<QueryLiteral> getFunctionValuesList(QueryCreationContext queryCreationContext, FunctionOperand operand, ApplicationUser user)
Get the function return values based on the actual user.
abstract String getUserNotFoundMessageKey()
Get the I18n message key for the error when the passed in user does not exist.
[Expand]
Inherited Methods
From class com.atlassian.jira.plugin.jql.function.AbstractJqlFunction
From class java.lang.Object
From interface com.atlassian.jira.plugin.jql.function.JqlFunction

Fields

protected final UserUtil userUtil

Public Constructors

public AbstractUserBasedFunction (UserUtil userUtil)

Public Methods

public int getMinimumNumberOfExpectedArguments ()

public List<QueryLiteral> getValues (QueryCreationContext queryCreationContext, FunctionOperand functionOperand, TerminalClause terminalClause)

public MessageSet validate (ApplicationUser searcher, FunctionOperand functionOperand, TerminalClause terminalClause)

Protected Methods

protected abstract List<QueryLiteral> getFunctionValuesList (QueryCreationContext queryCreationContext, FunctionOperand operand, ApplicationUser user)

Get the function return values based on the actual user. transformed into index values.

Parameters
queryCreationContext the context of query creation
operand the operand to get values from
user the user
Returns
  • a List of objects that represent this Operands raw values. Cannot be null.

protected abstract String getUserNotFoundMessageKey ()

Get the I18n message key for the error when the passed in user does not exist.

Returns
  • message key.