Class LicenseEnforcement

java.lang.Object
com.iizix.license.LicenseEnforcement

public final class LicenseEnforcement extends Object
The enforcement switch of the License System (order CC-LICENSE-ENFORCE-SWITCH, the code part of work package WP-27): whether a verdict of the license - a lock of iiziGo's IIZI functions, a refused sign-in of iiziServer - is applied, or only observed, logged and warned about as the v5.0 release does (ruled 2026-10-05; enforcement ships only when a second MLS and its name exist, G-13 (a)).

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:

  1. a development override: the class com.iizix.license.lab.LabEnforcement, which reads the system property iizi.license.enforce or the environment variable IIZI_LICENSE_ENFORCE (true or false). 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;
  2. the build: isBuildEnforcing(), a constant of the build, false until the release that enforces; turning it on is a source change of that release;
  3. 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.
The override decides alone when present; otherwise the switch is on when the build enforces or the document says so. The shipped default is therefore OFF everywhere, and no setting, preference, configuration file or user interface a customer reaches turns it on or off.

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 Details

    • PROPERTY

      public static final String PROPERTY
      The system property the development override reads, "iizi.license.enforce": true or false. Read by com.iizix.license.lab.LabEnforcement only, a class no release build carries; a release ignores it.
      See Also:
    • ENVIRONMENT

      public static final String ENVIRONMENT
      The environment variable the development override reads, "IIZI_LICENSE_ENFORCE": true or false, 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: false until the release that enforces.
      Returns:
      true when the build enforces.
    • isEnforcing

      public static boolean isEnforcing(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.
      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

      public static String describe(Boolean labOverride, LicenseDocument document)
      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.