Package com.senzing.g2.engine
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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
destroy()
Uninitializes the G2 product API.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.String
license()
Returns the currently configured license details.int
validateLicenseFile(String licenseFile, StringBuffer errorResponse)
Determines whether a specified license file is validint
validateLicenseStringBase64(String licenseData, StringBuffer errorResponse)
Determines whether a specified license Base-64 string is valid.String
version()
Returns the currently installed version details-
Methods inherited from interface com.senzing.g2.engine.G2Fallible
clearLastException, getLastException, getLastExceptionCode
-
-
-
-
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 theG2CONFIGFILE
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 patherrorResponse
- TheStringBuffer
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-64String
.errorResponse
- TheStringBuffer
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.
-
-