Class VersionUtil
- java.lang.Object
-
- org.hansken.plugin.extraction.runtime.grpc.common.VersionUtil
-
public final class VersionUtil extends Object
Utility class that is used to return the current SDK (API) version, and to test forward and backward compatibility.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetApiVersion()Returns the extraction plugin API version.static booleanisCompatible(String pluginVersionString)Utility method that compares a given version String for compatibility with the current SDK version.static booleanisHigherOrEqualTo(String first, String second)Utility method that compares two API versions.
-
-
-
Method Detail
-
getApiVersion
public static String getApiVersion()
Returns the extraction plugin API version.- Returns:
- the extraction plugin API version
-
isCompatible
public static boolean isCompatible(String pluginVersionString)
Utility method that compares a given version String for compatibility with the current SDK version.- Parameters:
pluginVersionString- Version-string of the remote plugin- Returns:
- true if plugin version API is compatible with the current SDK API version
-
isHigherOrEqualTo
public static boolean isHigherOrEqualTo(String first, String second)
Utility method that compares two API versions.- Parameters:
first- Version-string of a remote plugin APIsecond- Version-string of a remote plugin API- Returns:
- true if
firstversion is higher or equal thansecond
-
-