Hi,
On Jan 11, 2010, at 11:48 AM, J. Allen Santos wrote:
What we want to do is to create an application that we could use to connect to an XWiki
Server to do certain actions whenever a user creates/modifies/updates a document in the
Wiki. Is it possible to create such an application that wouldn't require us to include
code snippets in the wiki pages/documents as stated in
http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications, or even modify a module
used by XWiki? We want it to be portable so that it can be used by any other XWiki Servers
with very minimal, or better yet, no configurations.
So I assume you're coding from Java. Yes it's possible. Everything in XWiki is
coded in Java. The tutorial shows how to write java code in a groovy page but you
don't have to use groovy for that! :)
Here's the doc:
http://code.xwiki.org/xwiki/bin/view/Modules/ObservationModule
However I see that Thomas has "forgotten" to write a quick example on
http://code.xwiki.org/xwiki/bin/view/Modules/LocalObservationModule
As you can see you have 2 options:
- in-JVM
- as distributed events
You can also look at the source code:
http://svn.xwiki.org/svnroot/xwiki/platform/core/trunk/xwiki-observation/
Hope it helps,
-Vincent
> From: vincent(a)massol.net
> Date: Mon, 11 Jan 2010 09:05:13 +0100
> To: users(a)xwiki.org
> Subject: Re: [xwiki-users] Observer
>
>
> On Jan 11, 2010, at 5:01 AM, J. Allen Santos wrote:
>
>>
>> How do I create an observer without adding a groovy code within a page?I saw this
document:
http://dev.xwiki.org/xwiki/bin/view/Drafts/GroovyNotifications but it requires
code to be added within a page.
>
> You mean how to do it from java?
>
> What do you want to achieve?
>
> Thanks
> -Vincent