Class DatabaseServiceListener
- java.lang.Object
-
- com.biomatters.geneious.publicapi.databaseservice.DatabaseServiceListener
-
public abstract class DatabaseServiceListener extends java.lang.Object
Code using aDatabaseService
can get notified of special events by registering this listener viaaddDatabaseServiceListener
. Any implementation of a database service which supports the type of changes handled here should call those callbacs to insure proper handling of the service UI on Geneious side.
-
-
Constructor Summary
Constructors Constructor Description DatabaseServiceListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionsChanged()
Notify the program that the actions returned byGeneiousService.getActionsAlwaysEnabled()
orGeneiousService.getActionsEnabledWhenServiceSelected()
have changed since the service was initialized or this was last called.void
browsableContentsChanged()
Gets called when the browse contents of this Database Service have been changed.void
documentCopyAboutToBeAdded(AnnotatedPluginDocument document)
Called when a document is about to be added to aWritableDatabaseService
.void
documentMoved(AnnotatedPluginDocument document, DatabaseService source)
Called when a document is moved usingWritableDatabaseService.moveDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument, jebl.util.ProgressListener)
.void
extendedSearchOptionsChanged()
Notify the code using this database that this database's extended options have changed.void
fieldsChanged()
Notify using code about a change in search fields.void
hiddenElementsChanged()
Called when one or more hidden elements have been updated, added or removed from aWritableDatabaseService
.void
searchableStatusChanged(boolean isSearchable, java.lang.String message)
Notify using code about a change in status of searchability.
-
-
-
Method Detail
-
browsableContentsChanged
public void browsableContentsChanged()
Gets called when the browse contents of this Database Service have been changed. (Provided this is abrowasable database
). This typically results in the using code retrieving the document list again from the database.
-
searchableStatusChanged
public void searchableStatusChanged(boolean isSearchable, java.lang.String message)
Notify using code about a change in status of searchability. Typical usage is to disable the search interface and stop agents from attempting a search.- Parameters:
isSearchable
- false to disable the search button/panel in the interfacemessage
- to display to the user if isSearchable == false. Ignored if isSearchable == true
-
documentCopyAboutToBeAdded
public void documentCopyAboutToBeAdded(AnnotatedPluginDocument document)
Called when a document is about to be added to aWritableDatabaseService
. Only called for changes in the service this listener was added to, not any child services. This method is only called if the listener is on aWritableDatabaseService
.- Parameters:
document
- the document that is about to be added. NOTE: This is not the actual document that will be stored in the database, a copy of this document will be added.
-
documentMoved
public void documentMoved(AnnotatedPluginDocument document, DatabaseService source)
Called when a document is moved usingWritableDatabaseService.moveDocument(com.biomatters.geneious.publicapi.documents.AnnotatedPluginDocument, jebl.util.ProgressListener)
. Only called when a document is moved to the service this listener was added to, not any child services. This method is only called if the listener is on aWritableDatabaseService
.- Parameters:
document
- the document that has been movedsource
- the DatabaseService that the document was moved from
-
hiddenElementsChanged
public void hiddenElementsChanged()
Called when one or more hidden elements have been updated, added or removed from aWritableDatabaseService
. Only called for changes in the service this listener was added to, not any child services. This method is only called if the listener is on aWritableDatabaseService
.
-
fieldsChanged
public void fieldsChanged()
Notify using code about a change in search fields. Typically using code need to obtain thesearch fields
again and update the search UI etc.
-
extendedSearchOptionsChanged
public void extendedSearchOptionsChanged()
Notify the code using this database that this database's extended options have changed. This would typically result inDatabaseService.getExtendedSearchOptions(boolean)
being called again so the UI can be updated for example.
-
actionsChanged
public void actionsChanged()
Notify the program that the actions returned byGeneiousService.getActionsAlwaysEnabled()
orGeneiousService.getActionsEnabledWhenServiceSelected()
have changed since the service was initialized or this was last called. The actions in the menu will be updated.
-
-