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 Details

    • 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 API
      second - Version-string of a remote plugin API
      Returns:
      true if first version is higher or equal than second