Interface SystemUpdater
- All Known Implementing Classes:
DebianUpdater
public interface SystemUpdater
Runs system updates. Only one instance should exist.
System updates usually take a few seconds (or minutes), so this is an asynchronous interface. You can start an update and ask if an update is in progress.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionjava.time.LocalDateTimeGet the last time an update was executed.Returns a list of notable update progress eventsbooleanChecks whether the license is invalid, i.e. invalid registration credentials or license revoked.booleanCreates a apt-pinning file named for eblocker lists to prevent upgrading eblocker lists.voidStarts downloading new updatesvoidStarts an update.voidStart the update recovery process.booleanDelete the pinning of the eblocker-lists packagebooleanChecks whether new updates are available.Returns a list of package updates
-
Method Details
-
startUpdate
Starts an update. If the current state is not State.NOT_UPDATING or the device is not registered or the subscription is not valid, calling this method has no effect. -
startUpdateRecovery
Start the update recovery process.- Throws:
IOExceptionInterruptedException
-
getUpdateStatus
- Returns:
- the update state
- Throws:
InterruptedExceptionIOException
-
getLastUpdateTime
java.time.LocalDateTime getLastUpdateTime()Get the last time an update was executed.- Returns:
-
startDownload
Starts downloading new updates- Throws:
InterruptedExceptionIOException
-
updatesAvailable
Checks whether new updates are available.- Returns:
- the update state
- Throws:
InterruptedExceptionIOException
-
updatesAvailablePackages
Returns a list of package updates- Returns:
- A list of new updates. The list is empty if no updates are available.
-
getUpdateProgress
Returns a list of notable update progress events- Returns:
- A list like "Unpacked ..., Installed ..." or an empty list if no progress was made.
-
invalidLicense
boolean invalidLicense()Checks whether the license is invalid, i.e. invalid registration credentials or license revoked. No new revocation test call will be made but cached data will be used.- Returns:
- True if the license is invalid, false if not.
-
pinEblockerListsPackage
Creates a apt-pinning file named for eblocker lists to prevent upgrading eblocker lists.- Returns:
- True if the successful, otherwise false.
- Throws:
IOExceptionInterruptedException
-
unpinEblockerListsPackage
Delete the pinning of the eblocker-lists package- Returns:
- True if the successful, otherwise false.
- Throws:
IOExceptionInterruptedException
-
getUpdatingStatus
- Throws:
IOExceptionInterruptedException
-