public abstract class

AbstractVersionsFunction

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

Class Overview

An abstract class for the versions system field flag functions

Summary

Fields
protected final PermissionManager permissionManager
protected final IndexInfoResolver<Project> projectIndexInfoResolver
Public Constructors
AbstractVersionsFunction(NameResolver<Project> projectResolver, PermissionManager permissionManager)
Public Methods
JiraDataType getDataType()
int getMinimumNumberOfExpectedArguments()
@Nonnull List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)
FunctionOperand sanitiseOperand(ApplicationUser searcher, FunctionOperand operand)
Sanitise a function operand for the specified user, so that information is not leaked.
MessageSet validate(ApplicationUser searcherUser, FunctionOperand operand, TerminalClause terminalClause)
Protected Methods
IndexInfoResolver<Project> createIndexInfoResolver(NameResolver<Project> projectResolver)
abstract Collection<Version> getAllVersions(ApplicationUser user)
abstract Collection<Version> getVersionsForProject(Long projectId)
[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.ClauseSanitisingJqlFunction
From interface com.atlassian.jira.plugin.jql.function.JqlFunction

Fields

protected final PermissionManager permissionManager

protected final IndexInfoResolver<Project> projectIndexInfoResolver

Public Constructors

public AbstractVersionsFunction (NameResolver<Project> projectResolver, PermissionManager permissionManager)

Public Methods

public JiraDataType getDataType ()

public int getMinimumNumberOfExpectedArguments ()

@Nonnull public List<QueryLiteral> getValues (QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)

public FunctionOperand sanitiseOperand (ApplicationUser searcher, FunctionOperand operand)

Sanitise a function operand for the specified user, so that information is not leaked.

Parameters
searcher the user performing the search
operand the operand to sanitise; will only be sanitised if valid
Returns
  • the sanitised operand; never null.

public MessageSet validate (ApplicationUser searcherUser, FunctionOperand operand, TerminalClause terminalClause)

Protected Methods

protected IndexInfoResolver<Project> createIndexInfoResolver (NameResolver<Project> projectResolver)

protected abstract Collection<Version> getAllVersions (ApplicationUser user)

Returns
  • all the versions relevant to this function.

protected abstract Collection<Version> getVersionsForProject (Long projectId)

Parameters
projectId the id of the Project which the versions belong to
Returns
  • all the versions relevant to this function and the specified project