Verified Owner
Top Fields Constructors Methods
org.jabref.gui.shared

public Class SharedDatabaseUIManager

extends Object
Class Inheritance
Imports
java.sql.SQLException, java.util.Optional, javafx.scene.control.Alert.AlertType, .ButtonBar, .ButtonType, org.jabref.gui.DialogService, .LibraryTab, .LibraryTabContainer, .StateManager, org.jabref.gui.clipboard.ClipBoardManager, org.jabref.gui.mergeentries.threewaymerge.EntriesMergeResult, .MergeEntriesDialog, org.jabref.gui.preferences.GuiPreferences, org.jabref.gui.util.UiTaskExecutor, org.jabref.logic.ai.AiService, org.jabref.logic.git.util.GitHandlerRegistry, org.jabref.logic.importer.ParserResult, org.jabref.logic.l10n.Localization, org.jabref.logic.shared.DBMSConnection, .DBMSConnectionProperties, .DBMSSynchronizer, .DatabaseNotSupportedException, .DatabaseSynchronizer, org.jabref.logic.shared.event.ConnectionLostEvent, .ConnectionRestoredEvent, .SharedEntriesNotPresentEvent, .SharedWriteFailedEvent, .UpdateRefusedEvent, org.jabref.logic.shared.exception.InvalidDBMSConnectionPropertiesException, .NotASharedDatabaseException, org.jabref.logic.shared.prefs.SharedDatabasePreferences, org.jabref.logic.util.TaskExecutor, org.jabref.model.database.BibDatabaseContext, org.jabref.model.entry.BibEntry, .BibEntryTypesManager, org.jabref.model.undo.UndoableRemoveEntries, org.jabref.model.util.FileUpdateMonitor, com.google.common.eventbus.Subscribe

Field Summary

Modifier and TypeField and Description
private final AiService
private final ClipBoardManager
private DatabaseSynchronizer
private final DialogService
private final BibEntryTypesManager
private final FileUpdateMonitor
private final GitHandlerRegistry
private final GuiPreferences
private final StateManager
private final LibraryTabContainer
private final TaskExecutor

Constructor Summary

AccessConstructor and Description
public
SharedDatabaseUIManager(LibraryTabContainer tabContainer, DialogService dialogService, GuiPreferences preferences, AiService aiService, StateManager stateManager, BibEntryTypesManager entryTypesManager, FileUpdateMonitor fileUpdateMonitor, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, GitHandlerRegistry gitHandlerRegistry)

Method Summary

Modifier and TypeMethod and Description
public BibDatabaseContext

Returns:

BasePanel which also used by org.jabref.gui.exporter.SaveDatabaseAction Connects and loads the shared database. Blocks on the network, so call it off the JavaFX thread and hand the result to openTab(BibDatabaseContext).
connect
(DBMSConnectionProperties
Connection data
dbmsConnectionProperties
)

Opens a new shared database tab with the given DBMSConnectionProperties.

public BibDatabaseContext
private BibDatabaseContext
private void
handleSharedEntriesNotPresent(SharedEntriesNotPresentEvent event)

Another client removed entries.

private void
public void
listen(ConnectionLostEvent event)

The synchronizer keeps the changes locally and reconnects by itself (see DBMSSynchronizer), so the user is informed, not interrupted.

public void
public void
public void
listen(UpdateRefusedEvent updateRefusedEvent)

public void
public void
public LibraryTab
openTab(BibDatabaseContext bibDatabaseContext)

Shows a database returned by connect(DBMSConnectionProperties) in a new tab.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aiServiceback to summary
private final AiService aiService
clipBoardManagerback to summary
private final ClipBoardManager clipBoardManager
dbmsSynchronizerback to summary
private DatabaseSynchronizer dbmsSynchronizer
dialogServiceback to summary
private final DialogService dialogService
entryTypesManagerback to summary
private final BibEntryTypesManager entryTypesManager
fileUpdateMonitorback to summary
private final FileUpdateMonitor fileUpdateMonitor
gitHandlerRegistryback to summary
private final GitHandlerRegistry gitHandlerRegistry
preferencesback to summary
private final GuiPreferences preferences
stateManagerback to summary
private final StateManager stateManager
tabContainerback to summary
private final LibraryTabContainer tabContainer
taskExecutorback to summary
private final TaskExecutor taskExecutor

Constructor Detail

SharedDatabaseUIManagerback to summary
public SharedDatabaseUIManager(LibraryTabContainer tabContainer, DialogService dialogService, GuiPreferences preferences, AiService aiService, StateManager stateManager, BibEntryTypesManager entryTypesManager, FileUpdateMonitor fileUpdateMonitor, ClipBoardManager clipBoardManager, TaskExecutor taskExecutor, GitHandlerRegistry gitHandlerRegistry)

Method Detail

connectback to summary
public BibDatabaseContext connect(DBMSConnectionProperties dbmsConnectionProperties) throws SQLException, org.jabref.logic.shared.DatabaseNotSupportedException, org.jabref.logic.shared.exception.InvalidDBMSConnectionPropertiesException

Opens a new shared database tab with the given DBMSConnectionProperties.

Parameters
dbmsConnectionProperties:DBMSConnectionProperties

Connection data

Returns:BibDatabaseContext

BasePanel which also used by org.jabref.gui.exporter.SaveDatabaseAction Connects and loads the shared database. Blocks on the network, so call it off the JavaFX thread and hand the result to openTab(BibDatabaseContext).

createDummyContextback to summary
public BibDatabaseContext createDummyContext(DBMSConnectionProperties connectionProperties)
getBibDatabaseContextForSharedDatabaseback to summary
private BibDatabaseContext getBibDatabaseContextForSharedDatabase()
handleSharedEntriesNotPresentback to summary
private void handleSharedEntriesNotPresent(SharedEntriesNotPresentEvent event)

Another client removed entries. Live synchronization makes this an everyday event, so it is reported without interrupting the user; the undo edit keeps the entries' last local state (including unsynchronized edits) recoverable.

handleUpdateRefusedback to summary
private void handleUpdateRefused(UpdateRefusedEvent updateRefusedEvent)
listenback to summary
public void listen(ConnectionLostEvent event)

The synchronizer keeps the changes locally and reconnects by itself (see DBMSSynchronizer), so the user is informed, not interrupted. notify() marshals to the JavaFX thread itself.

Annotations
@Subscribe
listenback to summary
public void listen(ConnectionRestoredEvent event)
Annotations
@Subscribe
listenback to summary
public void listen(SharedWriteFailedEvent event)
Annotations
@Subscribe
listenback to summary
public void listen(UpdateRefusedEvent updateRefusedEvent)
Annotations
@Subscribe
listenback to summary
public void listen(SharedEntriesNotPresentEvent event)
Annotations
@Subscribe
openSharedDatabaseFromParserResultback to summary
public void openSharedDatabaseFromParserResult(ParserResult parserResult) throws SQLException, org.jabref.logic.shared.DatabaseNotSupportedException, org.jabref.logic.shared.exception.InvalidDBMSConnectionPropertiesException, org.jabref.logic.shared.exception.NotASharedDatabaseException
openTabback to summary
public LibraryTab openTab(BibDatabaseContext bibDatabaseContext)

Shows a database returned by connect(DBMSConnectionProperties) in a new tab. JavaFX thread only.