EntriesEvent
using Google's Guava EventBus.
| Modifier and Type | Field and Description |
|---|---|
| private final BibDatabase | |
| private final BibDatabaseContext | |
| private Connection | |
| private DBMSProcessor | |
| private String | |
| private final EventBus | |
| private final FieldPreferences | |
| private final FileUpdateMonitor | |
| private final GlobalCitationKeyPatterns | |
| private final Character | |
| private Optional | |
| private static final Logger | |
| private MetaData |
| Access | Constructor and Description |
|---|---|
| public | DBMSSynchronizer(BibDatabaseContext bibDatabaseContext, Character keywordSeparator, FieldPreferences fieldPreferences, GlobalCitationKeyPatterns globalCiteKeyPattern, FileUpdateMonitor fileMonitor)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | Returns: true if the connection is valid, else false.Checks whether the current SQL connection is valid. |
| public void | |
| public DatabaseConnectionProperties | |
| public String | |
| public DBMSProcessor | |
| public void | initializeDatabases()
Sets the table structure of shared database if needed and pulls all shared entries to the new local database. |
| public boolean | isEventSourceAccepted(EntriesEvent
An event)EntriesEventChecks whether the |
| private boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | openSharedDatabase(DatabaseConnection connection)
Implements org.
|
| public void | pullChanges()
Implements org. Synchronizes the local BibEntries and applies the fetched MetaData on them. |
| public void | |
| private void | |
| public void | registerListener(Object listener)
Implements org.
|
| private void | |
| public void | |
| public void | synchronizeLocalDatabase()
Implements org. Synchronizes the local database with shared one. |
| public void | |
| public void | synchronizeSharedEntry(BibEntry bibEntry)
Implements org. Synchronizes the shared |
| private void | synchronizeSharedMetaData(MetaData data, GlobalCitationKeyPatterns globalCiteKeyPattern)
Synchronizes all shared meta data. |
| bibDatabase | back to summary |
|---|---|
| private final BibDatabase bibDatabase | |
| bibDatabaseContext | back to summary |
|---|---|
| private final BibDatabaseContext bibDatabaseContext | |
| currentConnection | back to summary |
|---|---|
| private Connection currentConnection | |
| dbmsProcessor | back to summary |
|---|---|
| private DBMSProcessor dbmsProcessor | |
| dbName | back to summary |
|---|---|
| private String dbName | |
| eventBus | back to summary |
|---|---|
| private final EventBus eventBus | |
| fieldPreferences | back to summary |
|---|---|
| private final FieldPreferences fieldPreferences | |
| fileMonitor | back to summary |
|---|---|
| private final FileUpdateMonitor fileMonitor | |
| globalCiteKeyPattern | back to summary |
|---|---|
| private final GlobalCitationKeyPatterns globalCiteKeyPattern | |
| keywordSeparator | back to summary |
|---|---|
| private final Character keywordSeparator | |
| lastEntryChanged | back to summary |
|---|---|
| private Optional<BibEntry> lastEntryChanged | |
| LOGGER | back to summary |
|---|---|
| private static final Logger LOGGER | |
| metaData | back to summary |
|---|---|
| private MetaData metaData | |
| DBMSSynchronizer | back to summary |
|---|---|
| public DBMSSynchronizer(BibDatabaseContext bibDatabaseContext, Character keywordSeparator, FieldPreferences fieldPreferences, GlobalCitationKeyPatterns globalCiteKeyPattern, FileUpdateMonitor fileMonitor) | |
| applyMetaData | back to summary |
|---|---|
| public void applyMetaData() Applies the | |
| checkCurrentConnection | back to summary |
|---|---|
| public boolean checkCurrentConnection() Checks whether the current SQL connection is valid. In case that the connection is not valid a new
| |
| closeSharedDatabase | back to summary |
|---|---|
| public void closeSharedDatabase() Implements org.
| |
| getConnectionProperties | back to summary |
|---|---|
| public DatabaseConnectionProperties getConnectionProperties() Implements org.
| |
| getDBName | back to summary |
|---|---|
| public String getDBName() Implements org.
| |
| getDBProcessor | back to summary |
|---|---|
| public DBMSProcessor getDBProcessor() | |
| initializeDatabases | back to summary |
|---|---|
| public void initializeDatabases() throws DatabaseNotSupportedException Sets the table structure of shared database if needed and pulls all shared entries to the new local database.
| |
| isEventSourceAccepted | back to summary |
|---|---|
| public boolean isEventSourceAccepted(EntriesEvent event) Checks whether the
| |
| isPresentLocalBibEntry | back to summary |
|---|---|
| private boolean isPresentLocalBibEntry(BibEntry bibEntry) | |
| listen | back to summary |
|---|---|
| public void listen(EntriesAddedEvent event) Listening method. Inserts a new
| |
| listen | back to summary |
|---|---|
| public void listen(FieldChangedEvent event) Listening method. Updates an existing shared
| |
| listen | back to summary |
|---|---|
| public void listen(EntriesRemovedEvent event) Listening method. Deletes the given list of
| |
| listen | back to summary |
|---|---|
| public void listen(MetaDataChangedEvent event) Listening method. Synchronizes the shared
| |
| openSharedDatabase | back to summary |
|---|---|
| public void openSharedDatabase(DatabaseConnection connection) throws DatabaseNotSupportedException Implements org.
| |
| pullChanges | back to summary |
|---|---|
| public void pullChanges() Implements org. Synchronizes the local BibEntries and applies the fetched MetaData on them.
| |
| pullLastEntryChanges | back to summary |
|---|---|
| public void pullLastEntryChanges() Synchronizes local BibEntries only if last entry changes still remain | |
| pullWithLastEntry | back to summary |
|---|---|
| private void pullWithLastEntry() Synchronizes local BibEntries and pulls remaining last entry changes | |
| registerListener | back to summary |
|---|---|
| public void registerListener(Object listener) Implements org.
| |
| removeNotSharedEntries | back to summary |
|---|---|
| private void removeNotSharedEntries(List<BibEntry> localEntries, Set<Integer> sharedIDs) Removes all local entries which are not present on shared database. | |
| setMetaData | back to summary |
|---|---|
| public void setMetaData(MetaData metaData) | |
| synchronizeLocalDatabase | back to summary |
|---|---|
| public void synchronizeLocalDatabase() Implements org. Synchronizes the local database with shared one. Possible update types are: removal, update, or insert of a
| |
| synchronizeLocalMetaData | back to summary |
|---|---|
| public void synchronizeLocalMetaData() Synchronizes all meta data locally. | |
| synchronizeSharedEntry | back to summary |
|---|---|
| public void synchronizeSharedEntry(BibEntry bibEntry) Implements org. Synchronizes the shared
| |
| synchronizeSharedMetaData | back to summary |
|---|---|
| private void synchronizeSharedMetaData(MetaData data, GlobalCitationKeyPatterns globalCiteKeyPattern) Synchronizes all shared meta data. | |