Class UpdateService
- All Implemented Interfaces:
CtxEventListener
,ContextHandleAware
,HandleAware
,Ready
,ReadyListener
- Find available updates: The service will mount each attached storage device (usb drive) and search all the kabs in the root directory to see if there are any compatible manifest chains.
- Install a particular chain: Using the results from the fist step to identify a particular manifestId and deviceId, install the release.
This service can be used in conjunction with StorageService
which
generates events when usb storage devices are inserted / removed. This can be
used to trigger the check for available updates which effectively identifies
updates immediately upon device insertion.
- Version:
- 2024-05-03
-
Method Summary
Modifier and TypeMethodDescriptionReturn the list of available software that exists on storage devices that can be installed on this device.installUpdate
(String manifestId, File dir) Install an update with the specified manifestId from the specified directory.installUpdate
(String manifestId, String deviceId) Install an update with the specified manifestId on the storage device with the specified deviceId.Methods inherited from class com.tccc.kos.commons.core.service.AbstractService
getHandle, getHandlePrefix
Methods inherited from class com.tccc.kos.commons.util.ready.ReadyBean
getReady, onBeanReady, onDependenciesReady
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.tccc.kos.commons.core.context.CtxEventListener
onCtxAutowiringCompleted, onCtxDestroyed, onCtxPhaseCompleted
Methods inherited from interface com.tccc.kos.commons.core.service.handle.HandleAware
addHandleChild, getName, getPath
Methods inherited from interface com.tccc.kos.commons.util.ready.ReadyListener
onDependenciesGroupReady
-
Method Details
-
getAvailableUpdates
Return the list of available software that exists on storage devices that can be installed on this device. This automatically iterates through all available usb storage devices to check for compatible manifest chains, utilizingManifestChainResolver
. The results of all compatible releases are returned such that they can be presented for a user to pick from the options and trigger an install. -
installUpdate
Install an update with the specified manifestId on the storage device with the specified deviceId. This information is available inUpdateInfo
objects returned fromgetAvailableUpdates()
. This will mount the storage device for the duration of the install and then unmount it when complete, allowing it to be safely removed immediately after install.As this process is meant to be triggered from a user in front of the device, it will activate the new release once installed. For deferred updates such as those delivered over the air, refer to
OTAService
which provides extensive OTA functionality.- Parameters:
manifestId
- id of the first manifest in the chaindeviceId
- id of the storage device that contains the update
-
installUpdate
Install an update with the specified manifestId from the specified directory. This can be used to install from an internal source such as an internal drive which is not detected by the standard update process which is primarily focused at usb storage devices. This can be used along withManifestChainResolver
to support installations from internal sources with minimal effort.As this process is meant to be triggered from a user in front of the device, it will activate the new release once installed. For deferred updates such as those delivered over the air, refer to
OTAService
which provides extensive OTA functionality.- Parameters:
manifestId
- id of the first manifest in the chaindir
- the directory to install from
-