@Override public List<DeveloperDatabase> getDatabaseList(DeveloperObjectFactory developerObjectFactory) { AssetIssuingTransactionDeveloperDatabaseFactory assetIssuingTransactionDeveloperDatabaseFactory = new AssetIssuingTransactionDeveloperDatabaseFactory( this.pluginDatabaseSystem, this.pluginId); return assetIssuingTransactionDeveloperDatabaseFactory.getDatabaseList(developerObjectFactory); }
@Override public List<DeveloperDatabaseTableRecord> getDatabaseTableContent( DeveloperObjectFactory developerObjectFactory, DeveloperDatabase developerDatabase, DeveloperDatabaseTable developerDatabaseTable) { Database database; try { database = this.pluginDatabaseSystem.openDatabase( pluginId, AssetIssuingTransactionDatabaseConstants.DIGITAL_ASSET_TRANSACTION_DATABASE); return AssetIssuingTransactionDeveloperDatabaseFactory.getDatabaseTableContent( developerObjectFactory, database, developerDatabaseTable); } catch (CantOpenDatabaseException cantOpenDatabaseException) { /** The database exists but cannot be open. I can not handle this situation. */ FermatException e = new CantDeliverDatabaseException( "Cannot open the database", cantOpenDatabaseException, "DeveloperDatabase: " + developerDatabase.getName(), ""); this.errorManager.reportUnexpectedPluginException( Plugins.BITDUBAI_ASSET_ISSUING_TRANSACTION, UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e); } catch (DatabaseNotFoundException databaseNotFoundException) { FermatException e = new CantDeliverDatabaseException( "Database does not exists", databaseNotFoundException, "DeveloperDatabase: " + developerDatabase.getName(), ""); this.errorManager.reportUnexpectedPluginException( Plugins.BITDUBAI_ASSET_ISSUING_TRANSACTION, UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e); } catch (Exception exception) { FermatException e = new CantDeliverDatabaseException( "Unexpected Exception", FermatException.wrapException(exception), "DeveloperDatabase: " + developerDatabase.getName(), ""); this.errorManager.reportUnexpectedPluginException( Plugins.BITDUBAI_ASSET_ISSUING_TRANSACTION, UnexpectedPluginExceptionSeverity.DISABLES_SOME_FUNCTIONALITY_WITHIN_THIS_PLUGIN, e); } // If we are here the database could not be opened, so we return an empty list return new ArrayList<>(); }
@Override public List<DeveloperDatabaseTable> getDatabaseTableList( DeveloperObjectFactory developerObjectFactory, DeveloperDatabase developerDatabase) { return AssetIssuingTransactionDeveloperDatabaseFactory.getDatabaseTableList( developerObjectFactory); }