Hi Sergiu,
On 7/24/07, Asiri Rathnayake <asiri.rathnayake@gmail.com> wrote:
> Hi All,
>
> We were silent for few days due to mid-semester work load (still have some
> unfinished business). Anyway, I have added the removeSpace RPC to xwiki
> back-end. But now i'm having few doubts about it. The remove space RPC works
> by retrieving all the page names under the given space and deleting them
> individually. But following complications may happen when using this RPC,
>
> 1. If the user does not have enough privileges to delete some of the pages
> within that space, an exception will be thrown half-way down. Now the RPC
> invoker does not know which pages were removed and which were not. (Thus, he
> is out of sync with the wiki)
>
> 2. If instead we chose to remove page by page from the client - Xeclipse
> (say), we don't have this problem , and we could even display a progress
> bar. (to indicate that pages are being deleted).
>
> Since the XML RPC API requires the removeSpace() RPC, we must indeed add it.
> But wouldn't it be better if we do not use this RPC within Xeclipse (due to
> reasons mentioned above) ?
>
> Or, is there a better way to implement removeSpace() RPC ? (like checking
> privileges before doing anything ?) ) (+ How ? )
From the user PoV, it is better to have a feedback as documents are
deleted. This means that the client should make requests one by one.
From a developer PoV, this means a lot more traffic and a lot more
time, as each request creates a new connection, a new context
initialization, new objects, etc.
Still, if there's an error while deleting documents, the server method
should not be aborted, but should keep a list of failed documents.
Now, I don't know what to do with this list. Should the method return
a List, and if it is empty then everything was OK? Or should we simply
return true/false, and make another call to see what documents are
left in the space, if the result was "false"?
Sergiu
--
http://purl.org/net/sergiu
--
You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list.
To unsubscribe: mailto: xwiki-dev-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws