You can use session.getDefaultContext() or create your own one. The Session class has factory methods. Currently, Session.save() does nothing. It will be become important when we implement transient sessions. See [1] for details.
Florian [1] http://incubator.apache.org/chemistry/opencmis-client-api.html#OpenCMISClientAPI-SessionandCacheConcepts -----Original Message----- From: Ugo Cei [mailto:[email protected]] Sent: Montag, 10. Mai 2010 18:57 To: [email protected] Subject: Re: Creating a folder On May 10, 2010, at 6:03 PM, Florian Müller wrote: > That's one valid way to do it. > > The Folder class also has a createFolder() method. It would save you one line > if you would use that instead of the one provided by the Session class. ;-) Folder.createFolder takes one more argument, though: an OperationContext. I guess I should get one from session.getDefaultContext(), right? And one more thing: is it recommended to always call Session.save() at the end? Ugo -- Ugo Cei Sourcesense - making sense of Open Source: http://www.sourcesense.com
