Interface G2Product

  • All Superinterfaces:
    G2Fallible
    All Known Implementing Classes:
    G2ProductJNI

    public interface G2Product
    extends G2Fallible
    Defines the Java interface to the G2 product functions. The G2 product functions provide information regarding the Senzing product installation and user license.
    • Method Detail

      • init

        int init​(String moduleName,
                 String iniParams,
                 boolean verboseLogging)
        Initializes the G2 product API with the specified module name, init parameters and flag indicating verbose logging. If the G2CONFIGFILE init parameter is absent then the default configuration from the repository is used.
        Parameters:
        moduleName - A short name given to this instance of the product API.
        iniParams - A JSON string containing configuration parameters.
        verboseLogging - Enable diagnostic logging which will print a massive amount of information to stdout.
        Returns:
        Zero (0) on success and non-zero on failure.
      • destroy

        int destroy()
        Uninitializes the G2 product API.
        Returns:
        Zero (0) on success and non-zero on failure.
      • license

        String license()
        Returns the currently configured license details.
        Returns:
        The JSON document describing the license details.
      • validateLicenseFile

        int validateLicenseFile​(String licenseFile,
                                StringBuffer errorResponse)
        Determines whether a specified license file is valid
        Parameters:
        licenseFile - The path
        errorResponse - The StringBuffer to write any error response to (if an error occurs).
        Returns:
        Zero (0) for valid license, one (1) for invalid, and a negative number for errors.
      • validateLicenseStringBase64

        int validateLicenseStringBase64​(String licenseData,
                                        StringBuffer errorResponse)
        Determines whether a specified license Base-64 string is valid.
        Parameters:
        licenseData - The license data as a encoded Base-64 String.
        errorResponse - The StringBuffer to write any error response to (if an error occurs).
        Returns:
        Zero (0) for valid license, one (1) for invalid, and a negative number for errors.
      • version

        String version()
        Returns the currently installed version details
        Returns:
        JSON document of version details.