Package com.senzing.sdk
Interface SzProduct
public interface SzProduct
Defines the Java interface to the Senzing product functions. The Senzing product functions provide information regarding the Senzing product installation and user license.
An SzProduct
instance is typically obtained from an SzEnvironment
instance via the SzEnvironment.getProduct()
method as follows:
// How to obtain an SzProduct instance
try {
// obtain the SzEnvironment (varies by application)
SzEnvironment
env = getEnvironment();
SzProduct product = env.getProduct();
...
} catch (SzException e) {
// handle or rethrow the exception
logError("Failed to get SzProduct.", e);
}
-
Method Summary
Modifier and TypeMethodDescriptionGets the details and entitlements of the applied product license.Gets the product version details.
-
Method Details
-
getLicense
Gets the details and entitlements of the applied product license.NOTE: The details do not include the license key.
Usage:
// How to obtain the Senzing product license JSON try { // obtain the SzEnvironment (varies by application)
SzEnvironment
env = getEnvironment(); // get the SzProduct instance SzProduct product = env.getProduct(); // obtain the license JSON String license = product.getLicense(); // do something with the returned JSON (e.g.: parse it and extract values) JsonObject jsonObj = Json.createReader( new StringReader(license)).readObject(); String expiration = jsonObj.getString("expireDate"); int recordLimit = jsonObj.getInt("recordLimit"); ... } catch (SzException e) { // handle or rethrow the exception logError("Failed to get license information.", e); }Example Result: (formatted for readability)
{ "customer": "", "contract": "", "issueDate": "2025-08-11", "licenseType": "EVAL (Solely for non-productive use)", "licenseLevel": "", "billing": "", "expireDate": "2026-08-12", "recordLimit": 500, "advSearch": 0 }
- Returns:
- The JSON document describing the license details.
- Throws:
SzException
- If a failure occurs.
-
getVersion
Gets the product version details.Usage:
// How to obtain the Senzing product version JSON try { // obtain the SzEnvironment (varies by application)
SzEnvironment
env = getEnvironment(); // get the SzProduct instance SzProduct product = env.getProduct(); // obtain the version JSON String result = product.getVersion(); // do something with the returned JSON (e.g.: parse it and extract values) JsonObject jsonObj = Json.createReader( new StringReader(result)).readObject(); String version = jsonObj.getString("VERSION"); String buildDate = jsonObj.getString("BUILD_DATE"); ... } catch (SzException e) { logError("Failed to get version information.", e); }Example Result: (formatted for readability)
{ "PRODUCT_NAME": "Senzing SDK", "VERSION": "4.0.0", "BUILD_VERSION": "4.0.0.25223", "BUILD_DATE": "2025-08-11", "BUILD_NUMBER": "2025_08_11__07_35", "COMPATIBILITY_VERSION": { "CONFIG_VERSION": "11" }, "SCHEMA_VERSION": { "ENGINE_SCHEMA_VERSION": "4.0", "MINIMUM_REQUIRED_SCHEMA_VERSION": "4.0", "MAXIMUM_REQUIRED_SCHEMA_VERSION": "4.99" } }
- Returns:
- The JSON document of version details.
- Throws:
SzException
- If a failure occurs.
-