public AtlasInfo getAtlasInfo(String databaseName) throws Exception { CouchDb db = couchClient.getDatabase(databaseName); return getAtlasInfo(db, databaseName); }
public CouchDb createCouchDb() throws Exception { CouchClient couchClient = createCouchClient(); // Get database from Couch Client CouchDb couchDb = null; { if( false == couchClient.databaseExists(dbName) ) { throw new Exception("Can not find a database with the name: "+dbName); } couchDb = couchClient.getDatabase(dbName); } return couchDb; }
static public UserDesignDocumentImpl getUserDesignDocument(CouchClient couchClient) throws Exception { if( false == couchClient.databaseExists("_users") ) { throw new Exception("_users database not found"); } CouchDb userDb = couchClient.getDatabase("_users"); return getUserDesignDocument(userDb); }
documentDatabase = couchClient.getDatabase(documentDatabaseName); } catch(Exception e) { logger.error("Unable to connect to document database: "+documentDatabaseName,e); try { String submissionDbName = atlasProperties.getCouchDbSubmissionDbName(); submissionDb = couchClient.getDatabase(submissionDbName);
static public CouchDb createCouchDbSubmission( GlobalSettings gs ,AtlasProperties atlasProperties ) throws Exception { CouchClient couchClient = createCouchClient(gs, atlasProperties); // Get database from Couch Client CouchDb couchDb = null; { String dbName = atlasProperties.getCouchDbSubmissionDbName(); if( false == couchClient.databaseExists(dbName) ) { couchClient.createDatabase(dbName); } couchDb = couchClient.getDatabase(dbName); } return couchDb; } }
static public CouchDb createCouchDb( GlobalSettings gs ,AtlasProperties atlasProperties ) throws Exception { CouchClient couchClient = createCouchClient(gs, atlasProperties); // Get database from Couch Client CouchDb couchDb = null; { String dbName = atlasProperties.getCouchDbName(); if( false == couchClient.databaseExists(dbName) ) { couchClient.createDatabase(dbName); } couchDb = couchClient.getDatabase(dbName); } return couchDb; }
CouchDb atlasDb = couchClient.getDatabase(atlasInfo.getDatabaseName()); CouchDesignDocument atlasDesign = atlasDb.getDesignDocument("atlas");