public class

IsApplicationVersionCondition

extends Object
implements Condition
java.lang.Object
   ↳ com.atlassian.bitbucket.web.conditions.IsApplicationVersionCondition

Class Overview

A Condition which displays based on the Stash version.

Two parameters are required:

  • The operator param defines the operation to use.
  • The version param defines the version to check against.

Valid operators are:

  • eq - Displays if the Stash version is equal to the version param
  • neq - Displays if the Stash version is not equal to the version param
  • gt - Displays if the Stash version is greater than the version param
  • gte - Displays if the Stash version is greater than or equal to the version param
  • lt - Displays if the Stash version is less than the version param
  • lte - Displays if the Stash version is less than or equal to the version param

The following example will show the web fragment if Stash version 2.4 or beyond (2.4.1, 2.5, etc) is running:

 <condition class="com.atlassian.bitbucket.web.conditions.IsApplicationVersionCondition">
     <param name="operator">gte</param>
     <param name="version">2.4</param>
 </condition>
 

Summary

Public Constructors
IsApplicationVersionCondition(ApplicationPropertiesService applicationPropertiesService)
Public Methods
void init(Map<StringString> params)
boolean shouldDisplay(Map<StringObject> context)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.plugin.web.Condition

Public Constructors

public IsApplicationVersionCondition (ApplicationPropertiesService applicationPropertiesService)

Public Methods

public void init (Map<StringString> params)

Throws
PluginParseException

public boolean shouldDisplay (Map<StringObject> context)