Package com.tagtraum.beatunes
Class MediaLibraryDelegateImpl
- java.lang.Object
-
- com.tagtraum.beatunes.MediaLibraryDelegateImpl
-
- All Implemented Interfaces:
MediaLibraryUIDelegate
public class MediaLibraryDelegateImpl extends Object implements MediaLibraryUIDelegate
Media library UI delegate implementation.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description MediaLibraryDelegateImpl(BeaTunes application)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JDialogcreateDatabaseRecoveryDialog()Database recovery dialog.JDialogcreateDatabaseUpdateDialog()Database update dialog.JDialogcreateRebuildSearchIndexDialog()Full text index rebuild dialog.JDialogcreateSynchronizationProgressDialog()BeaTunesgetApplication()StringgetApplicationVersion()Version String used for the settings table.org.hibernate.boot.MetadataSourcesmetadataSources(org.hibernate.boot.MetadataSources metadataSources)Gives the delegate the chance to modify or replace the given configuration.voidshowDatabaseIsCorruptDialog()Database is corrupt-dialog.voidshowDatabaseMigrationErrorMessage(Exception e)Display error message about a failed database migration.booleanshowDatabaseRecoveryErrorMessage(Exception e)Display error message about a failed database recovery.voidshowOutOfMemoryMessage()Shows appropriate out of memory error message.booleanshowRetryCommunicationDialog()Makes the user aware of the fact that communication with iTunes failed and ask, whether it should be tried again.voidshowSchemaEvolutionErrorMessage(Exception e)Display error message about a failed schema evolution.voidshowSchemasDontMatchMessage(String expected, String actual)Display error message about mismatching schemas.voidshowSeriousErrorMessage(Throwable t)Shows appropriate serious error message.
-
-
-
Constructor Detail
-
MediaLibraryDelegateImpl
public MediaLibraryDelegateImpl(BeaTunes application)
-
-
Method Detail
-
getApplication
public BeaTunes getApplication()
-
createSynchronizationProgressDialog
public JDialog createSynchronizationProgressDialog()
- Specified by:
createSynchronizationProgressDialogin interfaceMediaLibraryUIDelegate- Returns:
- a dialog that should implement the
ProgressListenerinterface, if it wants to be notified of whatever progress is being made
-
showOutOfMemoryMessage
public void showOutOfMemoryMessage()
Description copied from interface:MediaLibraryUIDelegateShows appropriate out of memory error message.- Specified by:
showOutOfMemoryMessagein interfaceMediaLibraryUIDelegate
-
showSeriousErrorMessage
public void showSeriousErrorMessage(Throwable t)
Description copied from interface:MediaLibraryUIDelegateShows appropriate serious error message.- Specified by:
showSeriousErrorMessagein interfaceMediaLibraryUIDelegate- Parameters:
t- throwable
-
showRetryCommunicationDialog
public boolean showRetryCommunicationDialog()
Description copied from interface:MediaLibraryUIDelegateMakes the user aware of the fact that communication with iTunes failed and ask, whether it should be tried again.- Specified by:
showRetryCommunicationDialogin interfaceMediaLibraryUIDelegate- Returns:
- true, if communication should be retried.
-
metadataSources
public org.hibernate.boot.MetadataSources metadataSources(org.hibernate.boot.MetadataSources metadataSources)
Description copied from interface:MediaLibraryUIDelegateGives the delegate the chance to modify or replace the given configuration.- Specified by:
metadataSourcesin interfaceMediaLibraryUIDelegate- Parameters:
metadataSources- hibernate configuration.- Returns:
- modified or replaced configuration
-
getApplicationVersion
public String getApplicationVersion()
Description copied from interface:MediaLibraryUIDelegateVersion String used for the settings table.- Specified by:
getApplicationVersionin interfaceMediaLibraryUIDelegate- Returns:
- a version string for this version of the application
-
showSchemaEvolutionErrorMessage
public void showSchemaEvolutionErrorMessage(Exception e)
Description copied from interface:MediaLibraryUIDelegateDisplay error message about a failed schema evolution.- Specified by:
showSchemaEvolutionErrorMessagein interfaceMediaLibraryUIDelegate- Parameters:
e- exception
-
showDatabaseMigrationErrorMessage
public void showDatabaseMigrationErrorMessage(Exception e)
Description copied from interface:MediaLibraryUIDelegateDisplay error message about a failed database migration.- Specified by:
showDatabaseMigrationErrorMessagein interfaceMediaLibraryUIDelegate- Parameters:
e- exception
-
createDatabaseUpdateDialog
public JDialog createDatabaseUpdateDialog()
Description copied from interface:MediaLibraryUIDelegateDatabase update dialog.- Specified by:
createDatabaseUpdateDialogin interfaceMediaLibraryUIDelegate- Returns:
- a dialog that can be shown, while we are updating the database.
-
createRebuildSearchIndexDialog
public JDialog createRebuildSearchIndexDialog()
Description copied from interface:MediaLibraryUIDelegateFull text index rebuild dialog.- Specified by:
createRebuildSearchIndexDialogin interfaceMediaLibraryUIDelegate- Returns:
- a dialog that can be shown, while we are rebuilding the full text index
-
showSchemasDontMatchMessage
public void showSchemasDontMatchMessage(String expected, String actual)
Description copied from interface:MediaLibraryUIDelegateDisplay error message about mismatching schemas.- Specified by:
showSchemasDontMatchMessagein interfaceMediaLibraryUIDelegate- Parameters:
expected- expected schema versionactual- schema version
-
createDatabaseRecoveryDialog
public JDialog createDatabaseRecoveryDialog()
Description copied from interface:MediaLibraryUIDelegateDatabase recovery dialog.- Specified by:
createDatabaseRecoveryDialogin interfaceMediaLibraryUIDelegate- Returns:
- a dialog that can be shown, while we are recovering the database.
-
showDatabaseRecoveryErrorMessage
public boolean showDatabaseRecoveryErrorMessage(Exception e)
Description copied from interface:MediaLibraryUIDelegateDisplay error message about a failed database recovery.- Specified by:
showDatabaseRecoveryErrorMessagein interfaceMediaLibraryUIDelegate- Parameters:
e- exception- Returns:
- true, if the user wants us to delete the database
-
showDatabaseIsCorruptDialog
public void showDatabaseIsCorruptDialog()
Description copied from interface:MediaLibraryUIDelegateDatabase is corrupt-dialog. To be displayed, when we- Specified by:
showDatabaseIsCorruptDialogin interfaceMediaLibraryUIDelegate
-
-