public class SubmissionUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SubmissionUtils.DocAndReserved |
| Constructor and Description |
|---|
SubmissionUtils() |
| Modifier and Type | Method and Description |
|---|---|
static SubmissionUtils.DocAndReserved |
computeDocAndReservedFromDocument(org.json.JSONObject doc)
Given a JSON document, breaks the document into two parts: the doc and reserved portions.
|
static org.json.JSONObject |
getApprovedDocumentFromSubmission(org.json.JSONObject submissionDoc)
Re-creates the approved document submitted by the client from
the submission document.
|
static String |
getDocumentIdentifierFromSubmission(org.json.JSONObject submissionDoc)
Computes the target document identifier for this submission.
|
static org.json.JSONObject |
getOriginalDocumentFromSubmission(org.json.JSONObject submissionDoc)
Re-creates the original document when the submission was proposed from
the submission document.
|
static org.json.JSONObject |
getSubmittedDocumentFromSubmission(org.json.JSONObject submissionDoc)
Re-creates the document submitted by the client from
the submission document.
|
static org.json.JSONObject |
recreateDocumentFromDocAndReserved(org.json.JSONObject doc,
org.json.JSONObject reserved)
Re-creates a document given the document and the reserved keys.
|
public static String getDocumentIdentifierFromSubmission(org.json.JSONObject submissionDoc) throws Exception
submissionDoc - Submission document from the submission databaseExceptionpublic static org.json.JSONObject getSubmittedDocumentFromSubmission(org.json.JSONObject submissionDoc)
throws Exception
submissionDoc - Submission document from the submission databaseExceptionpublic static org.json.JSONObject getOriginalDocumentFromSubmission(org.json.JSONObject submissionDoc)
throws Exception
submissionDoc - Submission document from the submission databaseExceptionpublic static org.json.JSONObject getApprovedDocumentFromSubmission(org.json.JSONObject submissionDoc)
throws Exception
submissionDoc - Submission document from the submission databaseExceptionpublic static org.json.JSONObject recreateDocumentFromDocAndReserved(org.json.JSONObject doc,
org.json.JSONObject reserved)
throws Exception
doc - Main documentreserved - Document that contains reserved keys. A reserve key starts with an underscore. In this document,
the reserved keys do not have the starting underscore.Exceptionpublic static SubmissionUtils.DocAndReserved computeDocAndReservedFromDocument(org.json.JSONObject doc) throws Exception
doc - ExceptionCopyright © 2015. All Rights Reserved.