@Test public void testConnectionUri() throws Exception { String dbPath = new File(tmpDir.getRoot(), "dbName").getCanonicalPath().replace('\\', '/'); assertThat(databaseManager.connectionUri("dbName"), is("plocal:" + dbPath)); }
@Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace(" } catch (IOException e) { throw new RuntimeException(e); } }
DatabaseManagerImpl extends DatabaseManagerSupport { @Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace(" } catch (IOException e) { throw new RuntimeException(e); } } }
DatabaseManagerImpl extends DatabaseManagerSupport { @Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace(" } catch (IOException e) { throw new RuntimeException(e); } } @Inject  DatabaseManagerImpl(final ApplicationDirectories applicationDirectories,
                             final DatabaseRestorer databaseRestorer); @VisibleForTesting  DatabaseManagerImpl(final File databasesDirectory,
                             final DatabaseRestorer databaseRestorer); }
DatabaseManagerImpl extends DatabaseManagerSupport { @Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace(" } catch (IOException e) { throw new RuntimeException(e); } } @Inject  DatabaseManagerImpl(final ApplicationDirectories applicationDirectories,
                             final DatabaseRestorer databaseRestorer); @VisibleForTesting  DatabaseManagerImpl(final File databasesDirectory,
                             final DatabaseRestorer databaseRestorer); @ManagedAttribute File getDatabasesDirectory(); }
DatabaseManagerImpl extends DatabaseManagerSupport { @Override protected String connectionUri(final String name) { try { File dir = directory(name); DirectoryHelper.mkdir(dir); return "plocal:" + OFileUtils.getPath(dir.getAbsolutePath()).replace(" } catch (IOException e) { throw new RuntimeException(e); } } @Inject  DatabaseManagerImpl(final ApplicationDirectories applicationDirectories,
                             final DatabaseRestorer databaseRestorer); @VisibleForTesting  DatabaseManagerImpl(final File databasesDirectory,
                             final DatabaseRestorer databaseRestorer); @ManagedAttribute File getDatabasesDirectory(); static final String WORK_PATH; }