Record Class WebEngineStatus

java.lang.Object
java.lang.Record
com.iizix.gyro.WebEngineStatus
Record Components:
status - The verdict, never null.
platform - The platform, never null.
product - The engine as a user knows it: "Android System WebView", "Chrome" or "iOS", or null when not assessed.
engineVersion - The engine version as the client reported it, e.g. "119.0.6045.194"; on iOS the OS version.
engineMajor - The engine's major version; on iOS the OS major.
osVersion - The OS version, e.g. "7.0" or "17.5.1", or null when the client does not reveal it (a reduced Chrome user agent).
osMajor - The OS major version.
since - The day the engine stopped receiving security updates, or null when not patched-relevant or not known.
lastMajor - For WebEngineStatus.Status.ENDED on Android, the last engine major the OS was given.
minSupportedOS - On Android, the oldest OS version still given new engines, e.g. "10", for an ENDED verdict or one that may be ended; else null.
upgradeTo - On iOS, the OS major to upgrade to for a WebEngineStatus.Status.BEHIND verdict, e.g. "18"; else null.
possiblyEnded - True for a Chrome Browser on Android whose OS the user agent hides and whose engine is the last one an ended Android version was given: the device is either behind or on an ended OS (design section 6.2).

public record WebEngineStatus(WebEngineStatus.Status status, WebEngineStatus.Platform platform, String product, String engineVersion, int engineMajor, String osVersion, int osMajor, LocalDate since, int lastMajor, String minSupportedOS, String upgradeTo, boolean possiblyEnded) extends Record
The verdict on the web engine a client session runs on: whether it still receives security updates, and since when it does not (design CC-DESIGN-WEBVIEW-WARNING sections 2 and 8.3, work order CC-WEBENGINE-CLASSIFIER).

The web engine is the rendering engine running the IIZI client: Android System WebView in iiziRun or Chrome in a Browser on Android, WKWebView in iiziRun or Safari on iOS and iPadOS, where the engine is part of the operating system. The server computes the verdict from the client's user agent and, in iiziRun, the device's own OS version; it never decides access. An application may read it and apply a stricter policy of its own.

A component that is not known is null for a text and -1 for a number. A WebEngineStatus.Status.NOT_ASSESSED verdict carries nothing but its status and platform.

Author:
Christopher Mindus
  • Constructor Details

  • Method Details

    • notAssessed

      public static WebEngineStatus notAssessed()
      Gets the verdict for a client that is not assessed.
      Returns:
      The shared WebEngineStatus.Status.NOT_ASSESSED verdict, platform WebEngineStatus.Platform.OTHER.
    • isUnpatched

      public boolean isUnpatched()
      Tests if the engine no longer receives security updates.
      Returns:
      true for WebEngineStatus.Status.BEHIND and WebEngineStatus.Status.ENDED.
    • textKey

      public String textKey()
      Gets the key of the end-user text that fits this verdict (design section 7.2).
      Returns:
      WE_ENDED_ANDROID, WE_BEHIND_WEBVIEW, WE_BEHIND_CHROME, WE_BEHIND_OR_ENDED_CHROME, WE_BEHIND_IOS or WE_ENDED_IOS, or null when nothing is to be shown.
    • describe

      public String describe()
      Describes the verdict for a log line, the fields of design section 8.1: platform, OS, engine, status, and the "since" day and last major when they are known. An unknown component is left out: a missing date prints no date.
      Returns:
      E.g. platform=Android os=7.0 engine=Android System WebView 119.0.6045.194 status=ENDED since=2023-11-30 last=119.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • status

      public WebEngineStatus.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • platform

      public WebEngineStatus.Platform platform()
      Returns the value of the platform record component.
      Returns:
      the value of the platform record component
    • product

      public String product()
      Returns the value of the product record component.
      Returns:
      the value of the product record component
    • engineVersion

      public String engineVersion()
      Returns the value of the engineVersion record component.
      Returns:
      the value of the engineVersion record component
    • engineMajor

      public int engineMajor()
      Returns the value of the engineMajor record component.
      Returns:
      the value of the engineMajor record component
    • osVersion

      public String osVersion()
      Returns the value of the osVersion record component.
      Returns:
      the value of the osVersion record component
    • osMajor

      public int osMajor()
      Returns the value of the osMajor record component.
      Returns:
      the value of the osMajor record component
    • since

      public LocalDate since()
      Returns the value of the since record component.
      Returns:
      the value of the since record component
    • lastMajor

      public int lastMajor()
      Returns the value of the lastMajor record component.
      Returns:
      the value of the lastMajor record component
    • minSupportedOS

      public String minSupportedOS()
      Returns the value of the minSupportedOS record component.
      Returns:
      the value of the minSupportedOS record component
    • upgradeTo

      public String upgradeTo()
      Returns the value of the upgradeTo record component.
      Returns:
      the value of the upgradeTo record component
    • possiblyEnded

      public boolean possiblyEnded()
      Returns the value of the possiblyEnded record component.
      Returns:
      the value of the possiblyEnded record component