Hi Alexander,

thank you for your response!

Alexander Klimetschek schrieb:
On Wed, Feb 25, 2009 at 7:53 PM, Korbinian Bachl - privat
<korbinian.ba...@whiskyworld.de> wrote:
-> Why do I have to do soo much work for just saving a file? Did I miss
an easier approach?

Why do you think this is "soo much work"? Your code does the following:
- save any file
- automatic versioning
- store metadata along the file
- uses standard structure to be compatible with eg. Jackrabbits simple
webdav server

That's a nice bunch of feature to me ;-)

it seems as I forgot to write the important sentence. I meant that it looks like much same boilercode to me. A simple "FileNode" class that expects exact that looks somewhat more logic to me. I mean in JCR spec there are defaults written and these defaults should IMHO be directly accessible by using an object that directly implements this; however I'm not sure if its not just because im not yet used to it :)


And regarding the somewhat nasty PathNotFoundException: you could use
Node.hasNode() instead and simply ignore those PathNotFoundExceptions,
that should no longer occur if you do the hasNode() check - all JCR
exceptions inherit RepositoryEx, which you already throw in your
method.


thank you for that hint! - sounds really better than catching exceptions to me :)

Best,

Korbinian


Reply via email to