public class IsNewerThanAndConfiguredNumberHighEnough extends Object implements BuildNumberUpgradeConstraint
A constraint that will test whether the build number configured on the constraint is newer
than the build number passed to test(int)
AND the application configured
build number is higher than a configured value.
This type of constraint would typically be used if you only wanted an upgrade task to run if the configured build number was newer than a certain value but you are upgrading from a certain old version. value.
A hypothetical example:
For the above example you would construct the constraint like new IsNewerThanAndConfiguredNumberHighEnough(5,10)
Constructor and Description |
---|
IsNewerThanAndConfiguredNumberHighEnough(int applicationConfigBuildNumber,
int minApplicationConfig,
int constraintBuildNumber) |
public IsNewerThanAndConfiguredNumberHighEnough(int applicationConfigBuildNumber, int minApplicationConfig, int constraintBuildNumber)
applicationConfigBuildNumber
- the actual application configured build numberminApplicationConfig
- the minimum application configured build number required for this constraint to passconstraintBuildNumber
- the constraint build number to test other build numbers againstpublic boolean test(int buildNumber)
test
in interface BuildNumberUpgradeConstraint
buildNumber
- the build number to test the constraint against.Copyright © 2003–2019 Atlassian. All rights reserved.