Top Description Fields Constructors Methods
org.jabref.gui.help

public Class VersionWorker

extends Object
Class Inheritance
Imports
java.io.IOException, java.util.List, .Objects, .Optional, java.util.concurrent.TimeUnit, org.jabref.gui.DialogService, org.jabref.gui.util.BackgroundTask, .TaskExecutor, org.jabref.logic.l10n.Localization, org.jabref.logic.util.Version, org.jabref.preferences.FilePreferences, .InternalPreferences, .PreferencesService, org.slf4j.Logger, .LoggerFactory

This worker checks if there is a new version of JabRef available. If there is it will display a dialog to the user offering him multiple options to proceed (see changelog, go to the download page, ignore this version, and remind later). If the versions check is executed manually and this is the latest version it will also display a dialog to inform the user.

Field Summary

Modifier and TypeField and Description
private final DialogService
private final FilePreferences
private final Version
installedVersion

The current version of the installed JabRef

private final InternalPreferences
private static final Logger
private final TaskExecutor

Constructor Summary

AccessConstructor and Description
public
VersionWorker(Version installedVersion, DialogService dialogService, TaskExecutor taskExecutor, PreferencesService preferencesService)

Method Summary

Modifier and TypeMethod and Description
public void
public void
private Optional<Version>
getNewVersion()

Returns a newer version excluding any non-stable versions, except if the installed one is unstable too.

private void
showConnectionError(Exception exception, boolean manualExecution)

Prints the connection problem to the status bar and shows a dialog if it was executed manually

private void
showUpdateInfo(Optional<Version> newerVersion, boolean manualExecution)

Prints up-to-date to the status bar (and shows a dialog it was executed manually) if there is now new version.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

dialogServiceback to summary
private final DialogService dialogService
filePreferencesback to summary
private final FilePreferences filePreferences
installedVersionback to summary
private final Version installedVersion

The current version of the installed JabRef

internalPreferencesback to summary
private final InternalPreferences internalPreferences
LOGGERback to summary
private static final Logger LOGGER
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

VersionWorkerback to summary
public VersionWorker(Version installedVersion, DialogService dialogService, TaskExecutor taskExecutor, PreferencesService preferencesService)

Method Detail

checkForNewVersionAsyncback to summary
public void checkForNewVersionAsync()
checkForNewVersionDelayedback to summary
public void checkForNewVersionDelayed()
getNewVersionback to summary
private Optional<Version> getNewVersion() throws IOException

Returns a newer version excluding any non-stable versions, except if the installed one is unstable too. If no newer version was found, then an empty optional is returned.

showConnectionErrorback to summary
private void showConnectionError(Exception exception, boolean manualExecution)

Prints the connection problem to the status bar and shows a dialog if it was executed manually

showUpdateInfoback to summary
private void showUpdateInfo(Optional<Version> newerVersion, boolean manualExecution)

Prints up-to-date to the status bar (and shows a dialog it was executed manually) if there is now new version. Shows a "New Version" Dialog to the user if there is.