Class DebianUpdater
java.lang.Object
org.eblocker.server.common.update.DebianUpdater
- All Implemented Interfaces:
SystemUpdater
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eblocker.server.common.update.SystemUpdater
SystemUpdater.State -
Constructor Summary
ConstructorsConstructorDescriptionDebianUpdater(DeviceRegistrationProperties deviceRegistrationProperties, ScriptRunner scriptRunner, DataSource dataSource, UpdateStatusObserver updateStatusObserver, String updatesStartCommand, String updatesRunningCommand, String updatesDownloadStartCommand, String updatesDownloadRunningCommand, String updatesCheckCommand, String updatesRunningInfoCommand, String updatesFailedCommand, String updatesRecoveryStartCommand, String updatesRecoveryRunningCommand, String pinEblockerListsCommand, String unpinEblockerListsCommand, String eBlockerListsPinningFilename, String eBlockerListsPinningVersion, String projectVersion) -
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
-
Constructor Details
-
DebianUpdater
@Inject public DebianUpdater(DeviceRegistrationProperties deviceRegistrationProperties, ScriptRunner scriptRunner, DataSource dataSource, UpdateStatusObserver updateStatusObserver, String updatesStartCommand, String updatesRunningCommand, String updatesDownloadStartCommand, String updatesDownloadRunningCommand, String updatesCheckCommand, String updatesRunningInfoCommand, String updatesFailedCommand, String updatesRecoveryStartCommand, String updatesRecoveryRunningCommand, String pinEblockerListsCommand, String unpinEblockerListsCommand, String eBlockerListsPinningFilename, String eBlockerListsPinningVersion, String projectVersion)
-
-
Method Details
-
startUpdate
Description copied from interface:SystemUpdaterStarts 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.- Specified by:
startUpdatein interfaceSystemUpdater- Throws:
IOExceptionInterruptedExceptionEblockerException
-
startUpdateRecovery
Description copied from interface:SystemUpdaterStart the update recovery process.- Specified by:
startUpdateRecoveryin interfaceSystemUpdater- Throws:
IOExceptionInterruptedException
-
getUpdateStatus
- Specified by:
getUpdateStatusin interfaceSystemUpdater- Returns:
- the update state
- Throws:
IOExceptionInterruptedException
-
getLastUpdateTime
public java.time.LocalDateTime getLastUpdateTime()Description copied from interface:SystemUpdaterGet the last time an update was executed.- Specified by:
getLastUpdateTimein interfaceSystemUpdater- Returns:
-
startDownload
Description copied from interface:SystemUpdaterStarts downloading new updates- Specified by:
startDownloadin interfaceSystemUpdater- Throws:
IOExceptionInterruptedException
-
updatesAvailable
Description copied from interface:SystemUpdaterChecks whether new updates are available.- Specified by:
updatesAvailablein interfaceSystemUpdater- Returns:
- the update state
- Throws:
IOExceptionInterruptedException
-
updatesAvailablePackages
Description copied from interface:SystemUpdaterReturns a list of package updates- Specified by:
updatesAvailablePackagesin interfaceSystemUpdater- Returns:
- A list of new updates. The list is empty if no updates are available.
-
getUpdateProgress
Description copied from interface:SystemUpdaterReturns a list of notable update progress events- Specified by:
getUpdateProgressin interfaceSystemUpdater- Returns:
- A list like "Unpacked ..., Installed ..." or an empty list if no progress was made.
-
invalidLicense
public boolean invalidLicense()Description copied from interface:SystemUpdaterChecks 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.- Specified by:
invalidLicensein interfaceSystemUpdater- Returns:
- True if the license is invalid, false if not.
-
pinEblockerListsPackage
Description copied from interface:SystemUpdaterCreates a apt-pinning file named for eblocker lists to prevent upgrading eblocker lists.- Specified by:
pinEblockerListsPackagein interfaceSystemUpdater- Returns:
- True if the successful, otherwise false.
- Throws:
IOExceptionInterruptedException
-
unpinEblockerListsPackage
Description copied from interface:SystemUpdaterDelete the pinning of the eblocker-lists package- Specified by:
unpinEblockerListsPackagein interfaceSystemUpdater- Returns:
- True if the successful, otherwise false.
- Throws:
IOExceptionInterruptedException
-
getUpdatingStatus
- Specified by:
getUpdatingStatusin interfaceSystemUpdater- Throws:
IOExceptionInterruptedException
-