Package ca.carleton.gcrc.couch.client

Examples of ca.carleton.gcrc.couch.client.CouchFactory


    props.setProperty("couchdb.server", atlasProperties.getCouchDbUrl().toExternalForm());
    props.setProperty("couchdb.user", atlasProperties.getCouchDbAdminUser());
    props.setProperty("couchdb.password", atlasProperties.getCouchDbAdminPassword());
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
View Full Code Here


        }
      }
    }
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
   
    // Create database
    try {
      if( props.containsKey("dbUrl") ) {
        couchDb = factory.getDb(couchClient, props.getProperty("dbUrl"));
      } else if( props.containsKey("dbName") ) {
        couchDb = couchClient.getDatabase(props.getProperty("dbName"));
      } else {
        throw new Exception("dbUrl or dbName must be provided");
      }
View Full Code Here

    CouchContextCookie contextCookie = new CouchContextCookie();
    for(Cookie cookie : cookies){
      contextCookie.setCookie(cookie.getName(), cookie.getValue());
    }
   
    CouchFactory factory = new CouchFactory();
    return factory.getDb(contextCookie, dd.getDatabase());
  }
View Full Code Here

    CouchContextCookie contextCookie = new CouchContextCookie();
    for(Cookie cookie : cookies){
      contextCookie.setCookie(cookie.getName(), cookie.getValue());
    }
   
    CouchFactory factory = new CouchFactory();
    return factory.getDb(contextCookie, dd.getDatabase());
  }
View Full Code Here

    props.setProperty("couchdb.server", atlasProperties.getCouchDbUrl().toExternalForm());
    props.setProperty("couchdb.user", atlasProperties.getCouchDbAdminUser());
    props.setProperty("couchdb.password", atlasProperties.getCouchDbAdminPassword());
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
View Full Code Here

    if( props.containsKey("couchdb.replication.password") ) {
      couchReplicationPassword = props.getProperty("couchdb.replication.password");
    }
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
   
    // Create database
    try {
      if( props.containsKey("couchdb.dbUrl") ) {
        couchDb = factory.getDb(couchClient, props.getProperty("couchdb.dbUrl"));
      } else if( props.containsKey("couchdb.dbName") ) {
        couchDb = couchClient.getDatabase(props.getProperty("couchdb.dbName"));
      } else {
        throw new Exception("dbUrl or dbName must be provided");
      }
View Full Code Here

    if( props.containsKey("couchdb.replication.password") ) {
      couchReplicationPassword = props.getProperty("couchdb.replication.password");
    }
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
   
    // Create database
    try {
      if( props.containsKey("couchdb.dbUrl") ) {
        couchDb = factory.getDb(couchClient, props.getProperty("couchdb.dbUrl"));
      } else if( props.containsKey("couchdb.dbName") ) {
        couchDb = couchClient.getDatabase(props.getProperty("couchdb.dbName"));
      } else {
        throw new Exception("dbUrl or dbName must be provided");
      }
View Full Code Here

      }
    }
   
    CouchClient client = documentDesign.getDatabase().getClient();
   
    CouchFactory factory = new CouchFactory();
    CouchClient userClient = factory.getClient(contextCookie, client);
   
    CouchSession session = userClient.getSession();
    CouchAuthenticationContext authContext = session.getAuthenticationContext();
   
    return authContext;
View Full Code Here

    props.setProperty("couchdb.server", atlasProperties.getCouchDbUrl().toExternalForm());
    props.setProperty("couchdb.user", atlasProperties.getCouchDbAdminUser());
    props.setProperty("couchdb.password", atlasProperties.getCouchDbAdminPassword());
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
View Full Code Here

    props.setProperty("couchdb.server", atlasProperties.getCouchDbUrl().toExternalForm());
    props.setProperty("couchdb.user", atlasProperties.getCouchDbAdminUser());
    props.setProperty("couchdb.password", atlasProperties.getCouchDbAdminPassword());
   
    // Create Couch Server from properties
    CouchFactory factory = new CouchFactory();
    try {
      couchClient = factory.getClient(props);
     
    } catch(Exception e) {
      logger.error("Unable to get Couch Server",e);
      throw new ServletException("Unable to get Couch Server",e);
    }
View Full Code Here

TOP

Related Classes of ca.carleton.gcrc.couch.client.CouchFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.