Package com.onec.ui

Record Class UpdateStatus

java.lang.Object
java.lang.Record
com.onec.ui.UpdateStatus
Record Components:
updateAvailable - whether a newer version exists
currentVersion - the framework version this app is running ("" if unknown)
latestVersion - the latest version onec-cloud announced, or null if not yet known
releaseUrl - optional changelog / release-notes link for the latest version
checkedAt - when the last successful check completed, or null if none yet

public record UpdateStatus(boolean updateAvailable, String currentVersion, String latestVersion, String releaseUrl, Instant checkedAt) extends Record
The last-known result of the update check, exposed to the web client via /api/config. updateAvailable is true only when a latest version was successfully fetched and is strictly newer than the running currentVersion.
  • Constructor Details

    • UpdateStatus

      public UpdateStatus(boolean updateAvailable, String currentVersion, String latestVersion, String releaseUrl, Instant checkedAt)
      Creates an instance of a UpdateStatus record class.
      Parameters:
      updateAvailable - the value for the updateAvailable record component
      currentVersion - the value for the currentVersion record component
      latestVersion - the value for the latestVersion record component
      releaseUrl - the value for the releaseUrl record component
      checkedAt - the value for the checkedAt record component
  • Method Details

    • 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 '=='.
      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.
    • updateAvailable

      public boolean updateAvailable()
      Returns the value of the updateAvailable record component.
      Returns:
      the value of the updateAvailable record component
    • currentVersion

      public String currentVersion()
      Returns the value of the currentVersion record component.
      Returns:
      the value of the currentVersion record component
    • latestVersion

      public String latestVersion()
      Returns the value of the latestVersion record component.
      Returns:
      the value of the latestVersion record component
    • releaseUrl

      public String releaseUrl()
      Returns the value of the releaseUrl record component.
      Returns:
      the value of the releaseUrl record component
    • checkedAt

      public Instant checkedAt()
      Returns the value of the checkedAt record component.
      Returns:
      the value of the checkedAt record component