Package ca.carleton.gcrc.couch.client

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


          .put("state", "complete");
        submissionDb.updateDocument(submissionDoc);
      } else {
        // Get document that the changes were made against
        CouchDb couchDb = documentDbDesignDocument.getDatabase();
        CouchDocumentOptions options = new CouchDocumentOptions();
        options.setRevision(approvedVersion);
        JSONObject rootDoc = couchDb.getDocument(docId, options);
       
        // Compute patch from submission
        JSONObject submissionPatch = JSONPatcher.computePatch(rootDoc, approvedDoc);
        JSONObject databasePatch = JSONPatcher.computePatch(rootDoc, currentDoc);
View Full Code Here


     
      validateLastUpdated(authContext, doc);
     
      JSONObject originalDoc = null;
      if( JSONSupport.containsKey(doc, "_rev") ){
        CouchDocumentOptions options = new CouchDocumentOptions();
        options.setRevision( doc.getString("_rev") );
        originalDoc = documentCouchDb.getDocument(docId, options);
      }
     
      JSONObject submissionRequest = buildSubmissionRequest(authContext, doc, originalDoc);
     
View Full Code Here

        throw new Exception("Document identifier and revision must be specified");
      }
     
      JSONObject originalDoc = null;
      {
        CouchDocumentOptions options = new CouchDocumentOptions();
        options.setRevision( rev );
        originalDoc = documentCouchDb.getDocument(docId, options);
      }
     
      JSONObject submissionRequest = buildSubmissionRequest(authContext, null, originalDoc);
     
View Full Code Here

TOP

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

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.