Examples of CouchServer


Examples of com.cedarsoft.couchdb.CouchServer

    int read = System.in.read();

    if ( read == 'y' ) {
      System.out.println( "Deleting..." );

      CouchServer server = couchDbRule.getCurrentServer();
      for ( String nameToDelete : namesToDelete ) {
        System.out.println( "\tDeleting <" + nameToDelete + ">" );
        server.deleteDatabase( nameToDelete );
      }

    } else {
      System.out.println( "Canceled." );
    }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

  public void createServer() throws URISyntaxException {
    URI currentUri = getServerUri();
    serverURI = currentUri;

    assert client != null;
    this.server = new CouchServer(client.resource( currentUri ));

    //Verify the CouchDB version
    ClientResponse response = server.get( "" );
    try {
      String content = response.getEntity( String.class );
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

      System.out.println( "Skipping deletion of " + getCurrentDb().getDbName() );
      System.out.println( "----------------------------" );
      return;
    }

    CouchServer currentServer = server;
    if ( currentServer != null ) {
      for ( Iterator<CouchDatabase> iterator = dbs.iterator(); iterator.hasNext(); ) {
        CouchDatabase couchDatabase = iterator.next();
        currentServer.deleteDatabase( couchDatabase.getDbName() );
        iterator.remove();
      }
    }
    db = null;
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

    this.dbs.add( couchDatabase );
    return couchDatabase;
  }

  public void deleteDb( @Nonnull String dbName ) throws ActionFailedException {
    CouchServer currentServer = server;
    if ( currentServer == null ) {
      throw new IllegalArgumentException( "Invalid state - server is null" );
    }
    currentServer.deleteDatabase( dbName );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

    URI currentUri = getServerUri();
    serverURI = currentUri;

    @Nullable HTTPBasicAuthFilter authFilter = getAuthFilter( );

    this.server = new CouchServer( currentUri, authFilter );
    db = createDb( createNewTestDbName() );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

      System.out.println( "Skipping deletion of " + getCurrentDb().getDbName() );
      System.out.println( "----------------------------" );
      return;
    }

    CouchServer currentServer = server;
    if ( currentServer != null ) {
      for ( Iterator<CouchDatabase> iterator = dbs.iterator(); iterator.hasNext(); ) {
        CouchDatabase couchDatabase = iterator.next();
        currentServer.deleteDatabase( couchDatabase.getDbName() );
        iterator.remove();
      }
    }
    db = null;
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

    this.dbs.add( couchDatabase );
    return couchDatabase;
  }

  public void deleteDb( @Nonnull String dbName ) throws ActionFailedException {
    CouchServer currentServer = server;
    if ( currentServer == null ) {
      throw new IllegalArgumentException( "Invalid state - server is null" );
    }
    currentServer.deleteDatabase( dbName );
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

  public void createServer() throws URISyntaxException {
    URI currentUri = getServerUri();
    serverURI = currentUri;

    assert client != null;
    this.server = new CouchServer(client.resource( currentUri ));

    //Verify the CouchDB version
    ClientResponse response = server.get( "" );
    try {
      String content = response.getEntity( String.class );
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

      System.out.println( "Skipping deletion of " + getCurrentDb().getDbName() );
      System.out.println( "----------------------------" );
      return;
    }

    CouchServer currentServer = server;
    if ( currentServer != null ) {
      for ( Iterator<CouchDatabase> iterator = dbs.iterator(); iterator.hasNext(); ) {
        CouchDatabase couchDatabase = iterator.next();
        currentServer.deleteDatabase( couchDatabase.getDbName() );
        iterator.remove();
      }
    }
    db = null;
  }
View Full Code Here

Examples of com.cedarsoft.couchdb.CouchServer

    this.dbs.add( couchDatabase );
    return couchDatabase;
  }

  public void deleteDb( @Nonnull String dbName ) throws ActionFailedException {
    CouchServer currentServer = server;
    if ( currentServer == null ) {
      throw new IllegalArgumentException( "Invalid state - server is null" );
    }
    currentServer.deleteDatabase( dbName );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.