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); }
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 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; }