Top Fields Constructors Methods
org.jabref.gui.preferences.network

public Class NetworkTabViewModel

extends Object
implements PreferenceTabViewModel
Class Inheritance
All Implemented Interfaces
org.jabref.gui.preferences.PreferenceTabViewModel
Imports
java.net.MalformedURLException, java.nio.file.Path, java.util.Collections, .List, .Optional, java.util.concurrent.atomic.AtomicBoolean, javafx.beans.property.BooleanProperty, .ListProperty, .ReadOnlyBooleanProperty, .SimpleBooleanProperty, .SimpleListProperty, .SimpleStringProperty, .StringProperty, javafx.collections.FXCollections, .ListChangeListener, javafx.stage.FileChooser, org.jabref.gui.DialogService, org.jabref.gui.preferences.PreferenceTabViewModel, org.jabref.gui.util.FileDialogConfiguration, org.jabref.logic.l10n.Localization, org.jabref.logic.net.ProxyPreferences, .ProxyRegisterer, .URLDownload, org.jabref.logic.net.ssl.SSLCertificate, .TrustStoreManager, org.jabref.logic.util.OS, .StandardFileType, org.jabref.model.strings.StringUtil, org.jabref.preferences.InternalPreferences, .PreferencesService, de.saxsys.mvvmfx.utils.validation.CompositeValidator, de.saxsys.mvvmfx.utils.validation.FunctionBasedValidator, de.saxsys.mvvmfx.utils.validation.ValidationMessage, de.saxsys.mvvmfx.utils.validation.ValidationStatus, de.saxsys.mvvmfx.utils.validation.Validator, kong.unirest.core.UnirestException

Field Summary

Modifier and TypeField and Description
private final ProxyPreferences
private final ListProperty<CustomCertificateViewModel>
private final DialogService
private final InternalPreferences
private final BooleanProperty
private final PreferencesService
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final BooleanProperty
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final ProxyPreferences
private final BooleanProperty
private final BooleanProperty
private final StringProperty
private final de.saxsys.mvvmfx.utils.validation.Validator
private final AtomicBoolean
private final TrustStoreManager
private final BooleanProperty

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
checkConnection()

Check the connection by using the given url.

public ListProperty<CustomCertificateViewModel>
private String
private Optional<Integer>
public List<String>
getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

public ReadOnlyBooleanProperty
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public BooleanProperty
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
public BooleanProperty
public BooleanProperty
public StringProperty
public de.saxsys.mvvmfx.utils.validation.ValidationStatus
private void
private void
public void
setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

This method is called when the dialog is opened, or if it is made visible after being hidden.

public void
storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog.

public boolean
validateSettings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

This method is called before the storeSettings() method, to check if there are illegal settings in the tab, or if is ready to be closed.

public BooleanProperty
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

backupProxyPreferencesback to summary
private final ProxyPreferences backupProxyPreferences
customCertificateListPropertyback to summary
private final ListProperty<CustomCertificateViewModel> customCertificateListProperty
dialogServiceback to summary
private final DialogService dialogService
internalPreferencesback to summary
private final InternalPreferences internalPreferences
passwordPersistAvailableback to summary
private final BooleanProperty passwordPersistAvailable
preferencesback to summary
private final PreferencesService preferences
proxyHostnamePropertyback to summary
private final StringProperty proxyHostnameProperty
proxyHostnameValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator proxyHostnameValidator
proxyPasswordPropertyback to summary
private final StringProperty proxyPasswordProperty
proxyPasswordValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator proxyPasswordValidator
proxyPersistPasswordPropertyback to summary
private final BooleanProperty proxyPersistPasswordProperty
proxyPortPropertyback to summary
private final StringProperty proxyPortProperty
proxyPortValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator proxyPortValidator
proxyPreferencesback to summary
private final ProxyPreferences proxyPreferences
proxyUseAuthenticationPropertyback to summary
private final BooleanProperty proxyUseAuthenticationProperty
proxyUsePropertyback to summary
private final BooleanProperty proxyUseProperty
proxyUsernamePropertyback to summary
private final StringProperty proxyUsernameProperty
proxyUsernameValidatorback to summary
private final de.saxsys.mvvmfx.utils.validation.Validator proxyUsernameValidator
sslCertificatesChangedback to summary
private final AtomicBoolean sslCertificatesChanged
trustStoreManagerback to summary
private final TrustStoreManager trustStoreManager
versionCheckPropertyback to summary
private final BooleanProperty versionCheckProperty

Constructor Detail

NetworkTabViewModelback to summary
public NetworkTabViewModel(DialogService dialogService, PreferencesService preferences)

Method Detail

addCertificateFileback to summary
public void addCertificateFile()
checkConnectionback to summary
public void checkConnection()

Check the connection by using the given url. Used for validating the http proxy. The checking result will be appear when request finished. The checking result could be either success or fail, if fail, the cause will be displayed.

customCertificateListPropertyback to summary
public ListProperty<CustomCertificateViewModel> customCertificateListProperty()
formatCustomAliasback to summary
private String formatCustomAlias(String thumbprint)
getPortAsIntback to summary
private Optional<Integer> getPortAsInt(String value)
getRestartWarningsback to summary
public List<String> getRestartWarnings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.getRestartWarnings.

This method should be called after storing the preferences, to collect the properties, which require a restart of JabRef to load

Returns:List<String>

The messages for the changed properties (e. g. "Changed language: English")

Annotations
@Override
passwordPersistAvailableback to summary
public ReadOnlyBooleanProperty passwordPersistAvailable()
proxyHostnamePropertyback to summary
public StringProperty proxyHostnameProperty()
proxyHostnameValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus proxyHostnameValidationStatus()
proxyPasswordPropertyback to summary
public StringProperty proxyPasswordProperty()
proxyPasswordValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus proxyPasswordValidationStatus()
proxyPersistPasswordPropertyback to summary
public BooleanProperty proxyPersistPasswordProperty()
proxyPortPropertyback to summary
public StringProperty proxyPortProperty()
proxyPortValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus proxyPortValidationStatus()
proxyUseAuthenticationPropertyback to summary
public BooleanProperty proxyUseAuthenticationProperty()
proxyUsePropertyback to summary
public BooleanProperty proxyUseProperty()
proxyUsernamePropertyback to summary
public StringProperty proxyUsernameProperty()
proxyUsernameValidationStatusback to summary
public de.saxsys.mvvmfx.utils.validation.ValidationStatus proxyUsernameValidationStatus()
setProxyValuesback to summary
private void setProxyValues()
setSSLValuesback to summary
private void setSSLValues()
setValuesback to summary
public void setValues()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.setValues.

This method is called when the dialog is opened, or if it is made visible after being hidden. The tab should update all its values. This is the ONLY PLACE to set values for the fields in the tab. It is ILLEGAL to set values only at construction time, because the dialog will be reused and updated.

Annotations
@Override
storeSettingsback to summary
public void storeSettings()

Implements org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.storeSettings.

This method is called when the user presses OK in the Preferences dialog. Implementing classes must make sure all settings presented get stored in PreferencesService.

Annotations
@Override
validateSettingsback to summary
public boolean validateSettings()

Overrides default org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

Doc from org.jabref.gui.preferences.PreferenceTabViewModel.validateSettings.

This method is called before the storeSettings() method, to check if there are illegal settings in the tab, or if is ready to be closed. If the tab is *not* ready, it should display a message to the user informing about the illegal setting.

Annotations
@Override
versionCheckPropertyback to summary
public BooleanProperty versionCheckProperty()