Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Caleb James DeLisle
If you're talking about an eventListener in a groovy script, I think
it's done with a scheduler. You can look at Vincent's IRC bot which
does that very thing.
http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-applications/trunk/ircbot/src/main/resources/IRC/


Caleb James DeLisle


Rieken, Joshua wrote:
 Hello,
 
 I need to find the best way of registering an event listener automatically on 
 wiki startup. Right now I have to manually register the listener in a manner 
 similar to the one illustrated in the Groovy Notification Tutorial 
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial).
 
 Thanks in advance for any help.
 
 - Joshua
 
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users
 

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Vincent Massol
Hi Joshua,

If your listener is located in a jar in WEB-INF/lib then it'll get registered 
automatically. Make sure it's registered properly as a component.

If you're talking about registering some event listener defined in a page using 
the groovy macro then it's harder. You could have a scheduler job that 
regularly checks if it's started and if not start it. You could also have a 
page that remember to call after each xwiki restart (you'd do a wget on it in 
your start/restart script).

Thanks
-Vincent

On Feb 24, 2010, at 4:52 PM, Rieken, Joshua wrote:

 Hello,
 
 I need to find the best way of registering an event listener automatically on 
 wiki startup. Right now I have to manually register the listener in a manner 
 similar to the one illustrated in the Groovy Notification Tutorial 
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial).
 
 Thanks in advance for any help.
 
 - Joshua
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Jerome Velociter
On 2/24/10 5:24 PM, Caleb James DeLisle wrote:
 If you're talking about an eventListener in a groovy script, I think
 it's done with a scheduler. You can look at Vincent's IRC bot which
 does that very thing.
 http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-applications/trunk/ircbot/src/main/resources/IRC/

We should probably think about initializable scripts to avoid having 
to perform this scheduler trick.

An object of class XWiki.InitializableScript with a script text area?

Jerome.



 Caleb James DeLisle


 Rieken, Joshua wrote:
 Hello,

 I need to find the best way of registering an event listener automatically 
 on wiki startup. Right now I have to manually register the listener in a 
 manner similar to the one illustrated in the Groovy Notification Tutorial 
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial).

 Thanks in advance for any help.

 - Joshua

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users


 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Vincent Massol

On Feb 24, 2010, at 5:30 PM, Jerome Velociter wrote:

 On 2/24/10 5:24 PM, Caleb James DeLisle wrote:
 If you're talking about an eventListener in a groovy script, I think
 it's done with a scheduler. You can look at Vincent's IRC bot which
 does that very thing.
 http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-applications/trunk/ircbot/src/main/resources/IRC/
 
 We should probably think about initializable scripts to avoid having 
 to perform this scheduler trick.
 
 An object of class XWiki.InitializableScript with a script text area?

Yes we have this need that we've discussed with Thomas in the past. I don't 
think we have a jira issue if you want to create one.

Thanks
-Vincent

 Jerome.
 
 
 
 Caleb James DeLisle
 
 
 Rieken, Joshua wrote:
 Hello,
 
 I need to find the best way of registering an event listener automatically 
 on wiki startup. Right now I have to manually register the listener in a 
 manner similar to the one illustrated in the Groovy Notification Tutorial 
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial).
 
 Thanks in advance for any help.
 
 - Joshua
___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Jerome Velociter
On 2/24/10 5:49 PM, Vincent Massol wrote:

 On Feb 24, 2010, at 5:30 PM, Jerome Velociter wrote:

 On 2/24/10 5:24 PM, Caleb James DeLisle wrote:
 If you're talking about an eventListener in a groovy script, I think
 it's done with a scheduler. You can look at Vincent's IRC bot which
 does that very thing.
 http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-applications/trunk/ircbot/src/main/resources/IRC/

 We should probably think about initializable scripts to avoid having
 to perform this scheduler trick.

 An object of class XWiki.InitializableScript with a script text area?

 Yes we have this need that we've discussed with Thomas in the past. I don't 
 think we have a jira issue if you want to create one.

http://jira.xwiki.org/jira/browse/XWIKI-4936

Jerome.


 Thanks
 -Vincent

 Jerome.



 Caleb James DeLisle


 Rieken, Joshua wrote:
 Hello,

 I need to find the best way of registering an event listener automatically 
 on wiki startup. Right now I have to manually register the listener in a 
 manner similar to the one illustrated in the Groovy Notification Tutorial 
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial).

 Thanks in advance for any help.

 - Joshua
 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users


Re: [xwiki-users] Registering an event listener automatically

2010-02-24 Thread Rieken, Joshua
Thanks for the responses, everyone.

I really like this idea, Jerome. I see the JIRA issue here:

http://jira.xwiki.org/jira/browse/XWIKI-4936

I'll make time to look into implementing it myself. I may need some help, 
however, so I'll probably be asking some questions. :-)

-Joshua

 -Original Message-
 From: users-boun...@xwiki.org
 [mailto:users-boun...@xwiki.org] On Behalf Of Jerome Velociter
 Sent: Wednesday, February 24, 2010 10:31 AM
 To: users@xwiki.org
 Subject: Re: [xwiki-users] Registering an event listener automatically

 On 2/24/10 5:24 PM, Caleb James DeLisle wrote:
  If you're talking about an eventListener in a groovy
 script, I think
  it's done with a scheduler. You can look at Vincent's IRC bot which
  does that very thing.
 
 http://svn.xwiki.org/svnroot/xwiki/platform/xwiki-applications/trunk/i
  rcbot/src/main/resources/IRC/

 We should probably think about initializable scripts to
 avoid having to perform this scheduler trick.

 An object of class XWiki.InitializableScript with a script
 text area?

 Jerome.

 
 
  Caleb James DeLisle
 
 
  Rieken, Joshua wrote:
  Hello,
 
  I need to find the best way of registering an event
 listener automatically on wiki startup. Right now I have to
 manually register the listener in a manner similar to the one
 illustrated in the Groovy Notification Tutorial
 (http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotif
 icationTutorial).
 
  Thanks in advance for any help.
 
  - Joshua
 
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users
 
 
  ___
  users mailing list
  users@xwiki.org
  http://lists.xwiki.org/mailman/listinfo/users

 ___
 users mailing list
 users@xwiki.org
 http://lists.xwiki.org/mailman/listinfo/users

___
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users