continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Venisse <emman...@venisse.net>
Subject Re: writing a notifier
Date Fri, 05 Oct 2007 07:15:03 GMT


Michael Masters a écrit :
> I've looked at JabberContinuumNotifier and I have some questions on how 
> I create my own notifier.
> 
> 1. Once I write my notifier by extending AbstractContinuumNotifier, how 
> do I install it. In other words, where do I put it the class file? Can I 
> jar up all my classes and place them somewhere?

To build your notifier, run 'mvn clean install' on your notifier project to create the jar
then put it under apps/continuum/webapp/WEB-INF/lib/

> 
> 2. Can someone explain how I am suppose to configure my notifier in 
> apps/continuum/conf/application.xml?

     <component>
       <role>org.codehaus.plexus.notification.notifier.Notifier</role>
       <role-hint>your_notifier_id</role-hint>
       <implementation>package.notifier_class</implementation>
     </component>
> 
> * It looks like the <requirement> tag is suppose to define some classes 
> that my notifier is dependent on. Is this true?

If you have some requirement in your class like 'ConfiguredService' declared like that in
jabber notifier class:
     /**
      * @plexus.requirement
      */
     private ConfigurationService configurationService;
you must add it in the <requirement> tag in application.xml, so plexus will set and
initialize configurationService automatically.
> 
> * What's allowed in the <configuration> tag? For example, I need things 
> like login ID, password, and URL to configure the notifier. I assume I 
> add tags for this in  <configuration>. Is this true? If so, then how do 
> I get to this information from my notifier?

The configuration part is to initialize your notifier when it is created by plexus. If in
your configuration, you add <password>myPassword</password>, plexus will initialize
the private password field 
in your class automatically.

Plexus site: http://plexus.codehaus.org

If you want to use your notifier from the UI, you'll need to add some new JSPs in the webapp
and modify some other to add your notifier.

Emmanuel


Mime
View raw message