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- ForWebEngineStatus.Status.ENDEDon 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 aWebEngineStatus.Status.BEHINDverdict, 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
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe platforms assessed, and all the others.static enumWhether the engine receives security updates (design section 2).Constructor Summary
ConstructorsConstructorDescriptionWebEngineStatus(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) Validates the components.Method Summary
Modifier and TypeMethodDescriptiondescribe()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.intReturns the value of theengineMajorrecord component.Returns the value of theengineVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanTests if the engine no longer receives security updates.intReturns the value of thelastMajorrecord component.Returns the value of theminSupportedOSrecord component.static WebEngineStatusGets the verdict for a client that is not assessed.intosMajor()Returns the value of theosMajorrecord component.Returns the value of theosVersionrecord component.platform()Returns the value of theplatformrecord component.booleanReturns the value of thepossiblyEndedrecord component.product()Returns the value of theproductrecord component.since()Returns the value of thesincerecord component.status()Returns the value of thestatusrecord component.textKey()Gets the key of the end-user text that fits this verdict (design section 7.2).final StringtoString()Returns a string representation of this record class.Returns the value of theupgradeTorecord component.
Constructor Details
WebEngineStatus
public 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) Validates the components.- Throws:
NullPointerException- If the status or the platform is null.
Method Details
notAssessed
Gets the verdict for a client that is not assessed.- Returns:
- The shared
WebEngineStatus.Status.NOT_ASSESSEDverdict, platformWebEngineStatus.Platform.OTHER.
isUnpatched
public boolean isUnpatched()Tests if the engine no longer receives security updates.- Returns:
- true for
WebEngineStatus.Status.BEHINDandWebEngineStatus.Status.ENDED.
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_IOSorWE_ENDED_IOS, or null when nothing is to be shown.
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
hashCode
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes.status
platform
product
engineVersion
Returns the value of theengineVersionrecord component.- Returns:
- the value of the
engineVersionrecord component
engineMajor
public int engineMajor()Returns the value of theengineMajorrecord component.- Returns:
- the value of the
engineMajorrecord component
osVersion
osMajor
since
lastMajor
minSupportedOS
Returns the value of theminSupportedOSrecord component.- Returns:
- the value of the
minSupportedOSrecord component
upgradeTo
possiblyEnded
public boolean possiblyEnded()Returns the value of thepossiblyEndedrecord component.- Returns:
- the value of the
possiblyEndedrecord component