Class GrouperVersion
java.lang.Object
edu.internet2.middleware.grouper.misc.GrouperVersion
keep track of which version grouper is. Update this file (the GrouperVersion.grouperVersion() constant) before each
non-release-candidate release
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean_grouperVersionGreaterOrEqualHelper(String grouperVersion, String anotherVersion) helper method for unit testingstatic GrouperVersioncurrent grouper versionbooleanintgetBuild()intgetMajor()intgetMinor()getPatch()getRc()booleangreaterOrEqualToArg(GrouperVersion version) see if the grouper version is greater than or equal to a certain versionbooleangreaterOrEqualToArg(String version) see if the grouper version is greater than or equal to a certain versionstatic Stringget the version from the container, or null if not there.static Stringget the version from the container, or if not there use the jar e.g. 2.5.12static Stringget the version from jar e.g. 2.5.12static booleangrouperVersionGreaterOrEqual(String version) see if the grouper version is greater than or equal to a certain versioninthashCode()booleanlessThanArg(GrouperVersion other) see if this version is less than the argument onebooleanlessThanArg(GrouperVersion other, boolean orEqual) see if this version is less than the argument onebooleanlessThanMajorMinorArg(GrouperVersion other, boolean orEqual) see if this version is less than the argument one, only considering major and minor versionbooleansameMajorMinorArg(GrouperVersion other) see if this version is same argument one, only considering major and minor versionstatic StringstringValueOrNull(String versionString) return the parsed and tostring version of this version string (consistent), or null if nothing passed intoString()static GrouperVersionvalueOfIgnoreCase(String string) convert string to version like an enum wouldstatic GrouperVersionvalueOfIgnoreCase(String string, boolean exceptionOnNull) convert string to version like an enum would
-
Constructor Details
-
GrouperVersion
private constructor- Parameters:
versionString-
-
-
Method Details
-
stringValueOrNull
return the parsed and tostring version of this version string (consistent), or null if nothing passed in- Parameters:
versionString-- Returns:
- the version string
-
equals
-
hashCode
public int hashCode() -
toString
-
grouperContainerVersionOrMavenVersion
get the version from the container, or if not there use the jar e.g. 2.5.12- Returns:
- the version
-
grouperContainerVersion
get the version from the container, or null if not there. you should probably use grouperContainerVersionOrMavenVersion() instead- Returns:
- the version
-
grouperVersion
get the version from jar e.g. 2.5.12- Returns:
- the version
-
currentVersion
current grouper version- Returns:
- current grouper version
-
valueOfIgnoreCase
convert string to version like an enum would- Parameters:
string- cannot be blank- Returns:
- the enum or null or exception if not found
-
valueOfIgnoreCase
convert string to version like an enum would- Parameters:
string-exceptionOnNull- will not allow null or blank entries- Returns:
- the enum or null or exception if not found
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getBuild
public int getBuild() -
getRc
-
getPatch
-
grouperVersionGreaterOrEqual
see if the grouper version is greater than or equal to a certain version- Parameters:
version-- Returns:
- true if the grouper version is greater than or equal to a certain version
-
greaterOrEqualToArg
see if the grouper version is greater than or equal to a certain version- Parameters:
version-- Returns:
- true if the grouper version is greater than or equal to a certain version
-
lessThanArg
see if this version is less than the argument one- Parameters:
other-orEqual-- Returns:
- true if less than, false if equal or greater
-
lessThanMajorMinorArg
see if this version is less than the argument one, only considering major and minor version- Parameters:
other-orEqual-- Returns:
- true if less than, false if equal or greater
-
sameMajorMinorArg
see if this version is same argument one, only considering major and minor version- Parameters:
other-orEqual-- Returns:
- true if less than, false if equal or greater
-
lessThanArg
see if this version is less than the argument one- Parameters:
other-- Returns:
- true if less than, false if equal or greater
-
greaterOrEqualToArg
see if the grouper version is greater than or equal to a certain version- Parameters:
version-- Returns:
- true if the grouper version is greater than or equal to a certain version
-
_grouperVersionGreaterOrEqualHelper
public static boolean _grouperVersionGreaterOrEqualHelper(String grouperVersion, String anotherVersion) helper method for unit testing- Parameters:
grouperVersion-anotherVersion-- Returns:
- true if grouper is greater
-