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 .