Package com.onec.ui
Record Class UpdateStatus
java.lang.Object
java.lang.Record
com.onec.ui.UpdateStatus
- Record Components:
updateAvailable- whether a newer version existscurrentVersion- the framework version this app is running (""if unknown)latestVersion- the latest version onec-cloud announced, ornullif not yet knownreleaseUrl- optional changelog / release-notes link for the latest versioncheckedAt- when the last successful check completed, ornullif 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 Summary
ConstructorsConstructorDescriptionUpdateStatus(boolean updateAvailable, String currentVersion, String latestVersion, String releaseUrl, Instant checkedAt) Creates an instance of aUpdateStatusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecheckedAtrecord component.Returns the value of thecurrentVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelatestVersionrecord component.Returns the value of thereleaseUrlrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theupdateAvailablerecord component.
-
Constructor Details
-
UpdateStatus
public UpdateStatus(boolean updateAvailable, String currentVersion, String latestVersion, String releaseUrl, Instant checkedAt) Creates an instance of aUpdateStatusrecord class.- Parameters:
updateAvailable- the value for theupdateAvailablerecord componentcurrentVersion- the value for thecurrentVersionrecord componentlatestVersion- the value for thelatestVersionrecord componentreleaseUrl- the value for thereleaseUrlrecord componentcheckedAt- the value for thecheckedAtrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
updateAvailable
public boolean updateAvailable()Returns the value of theupdateAvailablerecord component.- Returns:
- the value of the
updateAvailablerecord component
-
currentVersion
Returns the value of thecurrentVersionrecord component.- Returns:
- the value of the
currentVersionrecord component
-
latestVersion
Returns the value of thelatestVersionrecord component.- Returns:
- the value of the
latestVersionrecord component
-
releaseUrl
Returns the value of thereleaseUrlrecord component.- Returns:
- the value of the
releaseUrlrecord component
-
checkedAt
Returns the value of thecheckedAtrecord component.- Returns:
- the value of the
checkedAtrecord component
-