Package lu.kbra.modelizer_next.bootstrap
Class AbstractBootstrapRuntime
java.lang.Object
lu.kbra.modelizer_next.bootstrap.AbstractBootstrapRuntime
Base implementation of update runtime behavior shared with application-side update checks.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDefines operations for update preparation behavior. -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an abstract bootstrap runtime instance. -
Method Summary
Modifier and TypeMethodDescriptionChecks the for updates.longDeletes installed update folders that are no longer needed.Returns the current application version.Returns the installed updates directory.longReturns the installed updates disk usage bytes.intReturns the installed updates file count.static AbstractBootstrapRuntimeReturns the instance during bootstrap/update processing.Returns the selected channel during bootstrap/update processing.booleaninstallUpdateAndExit(Component parentComponent, AvailableUpdate update, AbstractBootstrapRuntime.UpdatePreparation preparation) Installs the update and exit.static booleanisActive()Checks whether active is enabled or applies during bootstrap/update processing.booleanChecks whether auto check updates is enabled or applies.booleanChecks whether automatic update checks enabled by property is enabled or applies.voidsetAutoCheckUpdates(boolean enabled) Sets the auto check updates.voidsetSelectedChannel(UpdateChannel updateChannel) Sets the selected channel during bootstrap/update processing.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
AbstractBootstrapRuntime
protected AbstractBootstrapRuntime()Creates an abstract bootstrap runtime instance.
-
-
Method Details
-
getInstance
Returns the instance during bootstrap/update processing.- Returns:
- the instance
-
isActive
public static boolean isActive()Checks whether active is enabled or applies during bootstrap/update processing.- Returns:
trueif active is enabled or applies; otherwisefalse
-
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
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
-
getCurrentApplicationVersion
Returns the current application version.- Returns:
- the current application version
-
getSelectedChannel
Returns the selected channel during bootstrap/update processing.- Returns:
- the selected channel
-
installUpdateAndExit
public boolean installUpdateAndExit(Component parentComponent, AvailableUpdate update, AbstractBootstrapRuntime.UpdatePreparation preparation) throws IOException Installs the update and exit.- 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
public boolean isAutoCheckUpdates()Checks whether auto check updates is enabled or applies.- Returns:
trueif auto check updates is enabled or applies; otherwisefalse
-
isAutomaticUpdateChecksEnabledByProperty
public 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
-
setAutoCheckUpdates
public 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
-