Package lu.kbra.modelizer_next.bootstrap
Interface UpdateRuntime
- All Known Implementing Classes:
BootstrapRuntime
public interface UpdateRuntime
Runtime contract exposed to the launched application for update checks and restart/update flow.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceDefines operations for update preparation behavior. -
Method Summary
Modifier and TypeMethodDescriptionChecks the for updates.longDeletes installed update folders that are no longer needed.Returns the bootstrap config.com.fasterxml.jackson.databind.JsonNodeReturns the bootstrap JSON.Returns the current application version.Returns the installed updates directory.longReturns the installed updates disk usage bytes.intReturns the installed updates file count.Returns the selected channel during bootstrap/update processing.booleaninstallUpdateAndRestart(Component parentComponent, AvailableUpdate update, UpdateRuntime.UpdatePreparation preparation) Installs the update and restart.booleanChecks whether auto check updates is enabled or applies.booleanChecks whether automatic update checks enabled by property is enabled or applies.booleanChecks whether available is enabled or applies during bootstrap/update processing.voidsetAutoCheckUpdates(boolean enabled) Sets the auto check updates.voidsetSelectedChannel(UpdateChannel updateChannel) Sets the selected channel during bootstrap/update processing.
-
Method Details
-
checkForUpdates
Checks the for updates.- Returns:
- the check for updates result
- Throws:
IOException- if the operation cannot be completed
-
getInstalledUpdatesDiskUsageBytes
Returns the installed updates disk usage bytes.- Returns:
- the installed updates disk usage bytes
- Throws:
IOException- if the operation cannot be completed
-
getInstalledUpdatesFileCount
Returns the installed updates file count.- Returns:
- the installed updates file count
- Throws:
IOException- if the operation cannot be completed
-
getInstalledUpdatesDirectory
Path getInstalledUpdatesDirectory()Returns the installed updates directory.- Returns:
- the installed updates directory
-
freeUnusedInstalledUpdates
Deletes installed update folders that are no longer needed.- Returns:
- the free unused installed updates result
- Throws:
IOException- if the operation cannot be completed
-
getBootstrapConfig
BootstrapConfig getBootstrapConfig()Returns the bootstrap config.- Returns:
- the bootstrap config
-
getBootstrapJson
com.fasterxml.jackson.databind.JsonNode getBootstrapJson()Returns the bootstrap JSON.- Returns:
- the bootstrap JSON
-
getCurrentApplicationVersion
VersionComparator.ParsedVersion getCurrentApplicationVersion()Returns the current application version.- Returns:
- the current application version
-
getSelectedChannel
UpdateChannel getSelectedChannel()Returns the selected channel during bootstrap/update processing.- Returns:
- the selected channel
-
installUpdateAndRestart
boolean installUpdateAndRestart(Component parentComponent, AvailableUpdate update, UpdateRuntime.UpdatePreparation preparation) throws IOException Installs the update and restart.- Parameters:
parentComponent- parent component value used by the operationupdate- update metadata to download or installpreparation- preparation value used by the operation- Returns:
truewhen the condition is met; otherwisefalse- Throws:
IOException- if the operation cannot be completed
-
isAutoCheckUpdates
boolean isAutoCheckUpdates()Checks whether auto check updates is enabled or applies.- Returns:
trueif auto check updates is enabled or applies; otherwisefalse
-
isAutomaticUpdateChecksEnabledByProperty
boolean isAutomaticUpdateChecksEnabledByProperty()Checks whether automatic update checks enabled by property is enabled or applies.- Returns:
trueif automatic update checks enabled by property is enabled or applies; otherwisefalse
-
isAvailable
boolean isAvailable()Checks whether available is enabled or applies during bootstrap/update processing.- Returns:
trueif available is enabled or applies; otherwisefalse
-
setAutoCheckUpdates
void setAutoCheckUpdates(boolean enabled) Sets the auto check updates.- Parameters:
enabled- whether enabled is enabled
-
setSelectedChannel
Sets the selected channel during bootstrap/update processing.- Parameters:
updateChannel- update channel value used by the operation
-