Java ComposeDocument Method, Accessing Created Document

I’m using the new Java UI classes to compose a document, but I’m having problems working out how to get a handle on the created document to add content to it. I specifically want to add content after it’s been created rather than using NotesFormData.addComposeItem().

NotesUIWorkspace.getCurrentDocument is showing as deprecated and doesn’t return the document either. Am I right in thinking this is because ComposeDocument has not completed before that line of code runs, that I need to use a separate NotesSessionJob? But I’m not sure then how to get a handle on the created NotesUIDocument. Any help will be appreciated.