public Task updateDocument(Task task) throws ConflictException, DocumentStoreException {
        DocumentRevision rev = task.getDocumentRevision();
        rev.setBody(DocumentBodyFactory.create(task.asMap()));
        try {
            DocumentRevision updated = this.mDocumentStore.database().update(rev);
            return Task.fromRevision(updated);
        } catch (DocumentException de) {
            return null;
        }
    }
public Task updateDocument ( Task task ) throws ConflictException , DocumentStoreException { DocumentRevision rev = task . getDocumentRevision ( ) ; rev . setBody ( DocumentBodyFactory . create ( task . asMap ( ) ) ) ; try { DocumentRevision updated = this . mDocumentStore . database ( ) . update ( rev ) ; return Task . fromRevision ( updated ) ; } catch ( DocumentException de ) { return null ; } }
Updates a Task document within the DocumentStore.
@param task task to update
@return the updated revision of the Task
@throws ConflictException if the task passed in has a rev which doesn't
match the current rev in the DocumentStore.
@throws DocumentStoreException if there was an error updating the rev for this task