Package ca.carleton.gcrc.couch.client

Examples of ca.carleton.gcrc.couch.client.CouchDb.createDocument()


      }
     
      // Update document before saving
      CouchNunaliitUtils.adjustDocumentForStorage(doc, userContext);
   
      userCouchDb.createDocument(doc);
     
      logger.info("onLoad update: "+doc.optString("_id")+" -> "+fileNames);
    } catch(Exception e) {
      logger.error("Unable to create an upload request",e);
    }
View Full Code Here


    CouchAuthenticationContext authContext = db.getClient().getSession().getAuthenticationContext();
    CouchNunaliitUtils.adjustDocumentForStorage(jsonDoc, authContext);
    if( exists ){
      db.updateDocument(jsonDoc);
    } else {
      db.createDocument(jsonDoc);
    }
  }

  @Override
  public List<ClusterInfo> getAllClusterInfo() throws Exception {
View Full Code Here

    if( null == currentDoc ) {
      // New document. Create.
      JSONObject originalDoc = SubmissionUtils.getApprovedDocumentFromSubmission(submissionDoc);
     
      CouchDb targetDb = documentDbDesignDocument.getDatabase();
      targetDb.createDocument(originalDoc);
     
      CouchDb submissionDb = submissionDbDesignDocument.getDatabase();
      submissionDoc.getJSONObject("nunaliit_submission")
        .put("state", "complete");
      submissionDb.updateDocument(submissionDoc);
View Full Code Here

    if( null == currentDoc ) {
      // New document. Create.
      JSONObject originalDoc = SubmissionUtils.getApprovedDocumentFromSubmission(submissionDoc);
     
      CouchDb targetDb = documentDbDesignDocument.getDatabase();
      targetDb.createDocument(originalDoc);
     
      CouchDb submissionDb = submissionDbDesignDocument.getDatabase();
      submissionDoc.getJSONObject("nunaliit_submission")
        .put("state", "complete");
      submissionDb.updateDocument(submissionDoc);
View Full Code Here

      }
     
      // Update document before saving
      CouchNunaliitUtils.adjustDocumentForStorage(doc, userContext);
   
      userCouchDb.createDocument(doc);
     
      logger.info("onLoad update: "+doc.optString("_id")+" -> "+fileNames);
    } catch(Exception e) {
      logger.error("Unable to create an upload request",e);
    }
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.