Class DesignerLicenseGate

java.lang.Object
com.iizix.license.DesignerLicenseGate

public final class DesignerLicenseGate extends Object
The decision of iiziGo's licence gate (LICENSE-V2-DESIGN.md sections 7.2, 8.2 and 11.2, order B-5e): from what the licence system says about the installation at a start to what iiziGo does - nothing, the setup wizard, the trial banner, a warning, or no IIZI functions with the reason. Pure: no user interface, no clock and no licence system of its own, so that a reactor test runs it; com.iizigo.setup.SetupWizard reads the facts, asks here and shows the answer.

Where the gate does not apply (applies(boolean, boolean, String, String, boolean)): a build that started without a licence system (the reactor bypass of com.iizigo.Startup let it go on), a reactor build by its version, a test harness by its Eclipse application, and a development build whose licence client is dormant. None of them ever meets the wizard.

The rules (decide(Facts,boolean,boolean)), ruled or listed for a ruling in the order's report (rows B5E-D-a to B5E-D-d):

  • No licence document: the installation was never activated - the setup wizard. Once the wizard completed without a document (a registration off-line), iiziGo works with a warning until the installation's own trial period ends, and not after it.
  • A trial: the banner with the days left. A trial or a validity that ended by the document's own dates: no IIZI functions, with the date.
  • A revoked or deactivated installation: no IIZI functions, with the reason.
  • A document that expired because no licence server answered: a warning at every start that names the day of the lock, and iiziGo keeps working (ruling T1-096) - for what the document would still license by its own dates, and for 14 days after expires (ruling B5E-D-a (b), the grace a server has by LV-20). After them: no IIZI functions until a licence server answers, so that an installation that never reconnects loses its licence (7.4 step 3).
  • A licence server this build cannot verify (no pinned root): a state of its own, a warning; never the wizard, which could not register, and never "revoked".

The enforcement switch (isEnforcing(); order CC-LIC-V5-OBSERVE-DESIGNER, rulings L-1 and L-2 of 2026-10-06): off in this release, which ships the licence system installed but not enforcing (ruled 2026-10-05). While it is off, every rule above that would leave no IIZI functions is a warning that gives the reason and says that they stay enabled; a build without a root key, and a client without a licence server to contact, are one line to log (DesignerLicenseGate.Action.NOTE) and no box, since there is nothing to register with or to refresh from. The switch changes the consequence of a verdict and nothing else: the wizard, the banner, the refresh and the release of an installation run as before when a licence server answers.

Author:
Christopher Mindus
  • Field Details

    • REACTOR_BUILD_PREFIX

      public static final String REACTOR_BUILD_PREFIX
      The version and build prefix of a reactor build, whose qualifier is the build's time stamp in the 2020s: the prefix com.iizigo.Startup lets go on without a licence.
      See Also:
  • Method Details

    • isEnforcing

      public static boolean isEnforcing()
      Tells whether a verdict to lock is applied.
      Returns:
      true when the enforcement switch is on; never in this release outside the tests.
    • isReactorBuild

      public static boolean isReactorBuild(String versionBuild)
      Tells whether a version and build is a reactor build's.
      Parameters:
      versionBuild - The version and build, SystemConfig.VERSION_BUILD; may be null.
      Returns:
      true for a reactor build.
    • isTestHarness

      public static boolean isTestHarness(String application)
      Tells whether an Eclipse application is a test harness: Tycho's surefire or PDE's JUnit runtime. Such a run has no user to answer a wizard.
      Parameters:
      application - The Eclipse application ID, the system property eclipse.application; may be null.
      Returns:
      true for a test harness.
    • applies

      public static boolean applies(boolean hasLicenseSystem, boolean developmentMode, String versionBuild, String application, boolean serverConfigured)
      Tells whether the gate applies to this start. It does not - no validation, no wizard, no message - without a licence system, in a reactor build, under a test harness, and in a development build whose licence client has no server to contact.
      Parameters:
      hasLicenseSystem - true when the licence system was loaded.
      developmentMode - true for a development build, SystemConfig.isDevelopmentMode.
      versionBuild - The version and build, SystemConfig.VERSION_BUILD.
      application - The Eclipse application ID, may be null.
      serverConfigured - true when a licence server is configured.
      Returns:
      true when the gate applies.
    • decide

      public static DesignerLicenseGate.Decision decide(DesignerLicenseGate.Facts facts, boolean wizardDone, boolean settled)
      Decides what the gate does.
      Parameters:
      facts - What the licence system says.
      wizardDone - true once the setup wizard was completed, or its offer declined, in this start: the wizard is not asked for again.
      settled - true once the caller's short wait for the licence server is over: DesignerLicenseGate.Action.WAIT is then never answered.
      Returns:
      The decision.
    • lockOrWarn

      public static DesignerLicenseGate.Decision lockOrWarn(String reason)
      Decides what a start does with a reason to disable the IIZI functions that arose outside decide(DesignerLicenseGate.Facts, boolean, boolean): the licence system did not load, the setup wizard was canceled, the hardware information could not be read (com.iizigo.Startup.setError). The lock with the reason while the switch is on; while the release observes only, a warning that gives the reason and says that the IIZI functions stay enabled.
      Parameters:
      reason - The reason, in English.
      Returns:
      The decision: DesignerLicenseGate.Action.LOCK or DesignerLicenseGate.Action.WARN, with its message.
    • describe

      public static String describe(DesignerLicenseGate.Facts f)
      Describes the state in one line, for the licence preferences: what the gate would say at a start, without its advice.
      Parameters:
      f - What the licence system says.
      Returns:
      The line, in English.
    • isReleasable

      public static boolean isReleasable(boolean connected, LicenseState state)
      Tells whether the licence preferences offer "Release this installation": the installation holds a document whose state is active or trial, and the licence server is connected - the release is an event on the proven connection. A deactivated or revoked installation has nothing left to release; one without a document was never registered.
      Parameters:
      connected - true when the licence system is connected to the licence server.
      state - The state of the licence document held, null for no document.
      Returns:
      true when the installation can be released now.
    • releaseQuestion

      public static String releaseQuestion(String accountName)
      The question the licence preferences ask before the installation is released. What it says of the next start follows the enforcement switch: an enforcing release disables the IIZI functions then, one that observes only keeps working.
      Parameters:
      accountName - The document's account, null for none.
      Returns:
      The text, in English.
    • releasedMessage

      public static String releasedMessage()
      What the licence preferences say once the installation is released; of the next start, what releaseQuestion(String) said.
      Returns:
      The text, in English.
    • formatDate

      public static String formatDate(long millis)
      Formats an instant as its day in the zone of this machine.
      Parameters:
      millis - Milliseconds since the epoch.
      Returns:
      The day as yyyy-MM-dd.