public Task createDocument ( Task task ) { DocumentRevision rev = new DocumentRevision ( ) ; rev . setBody ( DocumentBodyFactory . create ( task . asMap ( ) ) ) ; try { DocumentRevision created = this . mDocumentStore . database ( ) . create ( rev ) ; return Task . fromRevision ( created ) ; } catch ( DocumentException de ) { return null ; } catch ( DocumentStoreException de ) { return null ; } }
Creates a task assigning an ID .