submissionDb.updateDocument(submissionDoc);
} else if( isDeletion ) {
CouchDb targetDb = documentDbDesignDocument.getDatabase();
JSONObject toDeleteDoc = targetDb.getDocument(docId);
targetDb.deleteDocument(toDeleteDoc);
CouchDb submissionDb = submissionDbDesignDocument.getDatabase();
submissionDoc.getJSONObject("nunaliit_submission")
.put("state", "complete");
submissionDb.updateDocument(submissionDoc);