* the documentId of the upload.
* @return The document Id
*/
public DocumentId getDocumentId() {
if(jsonObject == null) {
return new DocumentId("");
}
if(!wasUploadAccepted()) {
return new DocumentId("");
}
JSONValue value = jsonObject.get(FileUploadResponseAttributes.UPLOAD_FILE_ID.name());
if(value == null) {
return new DocumentId("");
}
JSONString string = value.isString();
if(string == null) {
return new DocumentId("");
}
return new DocumentId(string.stringValue().trim());
}