Hello! > Has anybody worked on a wrapper for the Slide API (that does not use > webdav) in order to simplify it and make it look like a > filesystem usage ?
We have developed such a wrapper layer, it's not complete (implements jut the basic methods and versioning) and somewhat specific to our needs though. And the more I work on it the less comfortable I feel - especially when upgrading Slide. This time I've noticed that in Slide 2.1 certain "core" classes do now require certain data from the "webdav" layer (see the org.apache.slide.search package, SlideUri class for instance). Therefore it becomes increasingly difficult to adapt our wrapper... Yours sincerely, Andrey. > > Brusic, Ivan wrote: > > >Andrey, > > > >Thanks for following up. Martin Kal�n posted the same > solution back on > >Friday (thread called "Problem creating Objects"), but I did > not have a > >chance to test it out yet. Reading his description, it > appeared that > >his solution would work, and I am glad you came to the same > conclusion. > >I also noticed the changes in the store method of > StructureImpl, but I > >did not want to undo and modifications. > > > >Thanks again for the help. > > > >Ivan > > > >-----Original Message----- > >From: Andrey Shulinsky [mailto:[EMAIL PROTECTED] > >Sent: Monday, April 11, 2005 8:41 PM > >To: 'Slide Users Mailing List' > >Subject: RE: Errors when creating a new node > > > > > >Hi, Ivan! > > > >Well, I've got the same error and fortunately found an easy > way to fix > >it. Here's the explanation if you're still interested. > > > >First of all, the error that the system gives you isn't > quite accurate. > >When Slide tries to create a new node it calls the following > methods of > >the org.apache.slide.structure.StructureImpl class: > > > >public void create(SlideToken token, ObjectNode > object,String strUri) > >public void store(SlideToken token, ObjectNode object) > protected void > >store(SlideToken token, ObjectNode object, boolean > >setModificationDate) > > > >and the last one tries to check if the active user has the > appropriate > >access rights (write, in fact) to the object that is being > created. So > >it calls the method > > > >public void checkCredentials(SlideToken token, ObjectNode object, > >ActionNode > >action) > > > >of the org.apache.slide.security.SecurityImpl class which, in turn, > >tries to find the object: > > > >ObjectNode realObject = > objectUri.getStore().retrieveObject(objectUri); > > > >And this very call failed for me throwing up the > >ObjectNotFoundException. This exception is caught in the > same method, > >swallowed and the familiar AccessDeniedException is thrown instead. > >Imho, it's a wrong way of handling this exception, it should be at > >least logged. > > > >And now about the reason of having this > ObjectNotFoundException. It's > >actually quite simple. The SlideToken I was using didn't > have its store > >enlistment flag mutator set to true. As a result the retrieveObject > >method failed to find the object - the "creation" transaction hadn't > >been committed at that moment. So I just set this flag to true: > > > >slideToken.setForceStoreEnlistment(true); > > > >and the problem was solved. I hope it'll work for you as > well. And why > >did it worked in the 2.0 release? I have noticed certain > changes in the > >store method in the org.apache.slide.structure.StructureImpl > class that > >might have caused this error but I haven't looked into them. > > > >Yours sincerely, > >Andrey. > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > > -- > Julien Viet > JBoss Portal Lead Developer > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
