public class LatestReleasedVersionFunction extends AbstractVersionsFunction
Projects are resolved by project key first, then name, then id. Only Versions from Projects which the current user can browse will be returned.
| Modifier and Type | Field and Description |
|---|---|
static String |
FUNCTION_LATEST_RELEASED_VERSION |
permissionManager, projectIndexInfoResolver| Constructor and Description |
|---|
LatestReleasedVersionFunction(VersionManager versionManager,
ProjectResolver projectResolver,
PermissionManager permissionManager) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<Version> |
getAllVersions(ApplicationUser user) |
List<QueryLiteral> |
getValues(QueryCreationContext queryCreationContext,
FunctionOperand operand,
TerminalClause terminalClause)
Gets the unexpanded values provided by the user on input.
|
protected Collection<Version> |
getVersionsForProject(Long projectId) |
createIndexInfoResolver, getDataType, getMinimumNumberOfExpectedArguments, sanitiseOperand, validategetFunctionName, getI18n, getModuleDescriptor, init, isList, validateNumberOfArgspublic static final String FUNCTION_LATEST_RELEASED_VERSION
public LatestReleasedVersionFunction(VersionManager versionManager, ProjectResolver projectResolver, PermissionManager permissionManager)
public List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)
JqlFunctionGets the unexpanded values provided by the user on input. This is the output values that will later be transformed into index values.
For example, a function who returns all the released versions of a specified project should return QueryLiterals representing the ids of those versions. For correctness, always opt
to return the most specific identifier for the object; if you can return either the id (which is stored in the
index) or a string name (that would require resolving to get the index value), choose the id.
getValues in interface JqlFunctiongetValues in class AbstractVersionsFunctionqueryCreationContext - the context of query creationoperand - the operand to get values fromterminalClause - the terminal clause that contains the operandprotected Collection<Version> getAllVersions(ApplicationUser user)
getAllVersions in class AbstractVersionsFunctionprotected Collection<Version> getVersionsForProject(Long projectId)
getVersionsForProject in class AbstractVersionsFunctionprojectId - the id of the Project which the versions belong toCopyright © 2002-2021 Atlassian. All Rights Reserved.