Class LicenseEnforcement
One decision, one seam. Every lock path asks its license system, IGenericLicenseSystem.isLicenseEnforced(), implemented once in the license implementation (inside the .dat files, never in a bundle a customer can read). The answer is built from three sources, in this order:
- a development override: the class
com.iizix.license.lab.LabEnforcement, which reads the system propertyiizi.license.enforceor the environment variableIIZI_LICENSE_ENFORCE(trueorfalse). The class lives outside the shipped package, as the lab route does (ruling of 2026-10-11): the license jar builder refuses it, so no release build - no.dat- carries it, and a release ignores the property and the variable whatever they say. It exists so that the tests, a lab and a release dry run can turn enforcement on, or off, in a development build; - the build:
isBuildEnforcing(), a constant of the build,falseuntil the release that enforces; turning it on is a source change of that release; - the signed license document: its key
LicenseDocument.ENFORCE(enforce=1), set per license by the license server, which only it can sign; a document without the key, and every v5.0 document, says nothing. The license server serves the key only to builds that know it (CAT-D-16): a v5.0 build refuses a document with an unknown key.
What it changes, and what it never changes. The position changes the consequence of a verdict and nothing else: the wizard, the banner, the refresh, the counting, the daily reports and the release of an installation run the same in both positions. Off: a lock is a warning that says the functions stay enabled, a refusal is a log line that says nothing is refused ("would be refused"). On: iiziGo's gate locks what it would lock, iiziServer refuses the sign-in its counter refuses - never a user already signed in, never a sign-in to ServerAdmin (RB-9 (a)), and never before the 14-day grace of an unlicensed server has run out (8.4, LV-20); a document that expired because no license server answered is graced for 14 days after expires in iiziGo too (B5E-D-a (b)). Offline, an unreachable license server, a clock set back and a torn license file are therefore grace, never a lock: see the tests of the gate and the counter with the switch on.
Without a license system - a build whose license system did not load - the build's position is the answer (isEnforcing(IGenericLicenseSystem)).
- Author:
- Christopher Mindus
Field Summary
FieldsMethod Summary
Modifier and TypeMethodDescriptionstatic Stringdescribe(Boolean labOverride, LicenseDocument document) Describes a position and its source in one line, for the log: what decided it.static booleanTells whether this build enforces the license by itself, whatever the license document says:falseuntil the release that enforces.static booleanisEnforcing(IGenericLicenseSystem licenseSystem) Tells whether the license is enforced: what the license system answers (IGenericLicenseSystem.isLicenseEnforced()), or the build's position when there is no license system.
Field Details
PROPERTY
The system property the development override reads, "iizi.license.enforce":trueorfalse. Read bycom.iizix.license.lab.LabEnforcementonly, a class no release build carries; a release ignores it.- See Also:
ENVIRONMENT
The environment variable the development override reads, "IIZI_LICENSE_ENFORCE":trueorfalse, read when the system property is not set. A release ignores it.- See Also:
Method Details
isBuildEnforcing
public static boolean isBuildEnforcing()Tells whether this build enforces the license by itself, whatever the license document says:falseuntil the release that enforces.- Returns:
- true when the build enforces.
isEnforcing
Tells whether the license is enforced: what the license system answers (IGenericLicenseSystem.isLicenseEnforced()), or the build's position when there is no license system.- Parameters:
licenseSystem- The license system of the product, null when it did not load.- Returns:
- true when a verdict of the license is applied.
describe
Describes a position and its source in one line, for the log: what decided it.- Parameters:
labOverride- The development override, null for none.document- The license document held, null for none.- Returns:
- The line, in English.