Custom Notificator Help

I'm trying to create a Growl build notifier for TeamCity. I've implemented Notificator, created the build-server-plugin.xml, and put the jar into ]]>/ROOT/WEB-INF/lib. Should the new notifier just show up in the list of notification options on my user's settings page or do I need to register it with TeamCity some how? It currently doesn't show up. Any advice?



Found it. Had to get the NotificatorRegistry injected into my class.


Now I have a different question. When I register the Notificator, I specify two UserPropertyInfo values. How do I easily query for the values the user has set for these properties? In each notify...() method, I get a Set]]>. I could call SUser.getProperties(), then loop though all the specified properties looking for the specific ones I want, but that seems icky. Especially since the key for the map return by getProperties() is a PropertyKey, not a simple String. Is there no easy was get the value for the property, using the same string I create the UserPropertyInfo object with?



Initial release available:

Comments and suggestions welcome.



You can use NotificatorPropertyKey class to retrieve notifier properties from the user:

private String[] getGrowlInfo(SUser user) {
String[] info = new String[2];

PropertyKey serverKey = new NotificatorPropertyKey(getNotificatorType(), GROWL_SERVER_KEY);
PropertyKey passwordKey = new NotificatorPropertyKey(getNotificatorType(), GROWL_PASSWORD_KEY);
info[0] = user.getPropertyValue(serverKey);
info[1] = user.getPropertyValue(passwordKey);

return info;

Pavel Sher



We are gradually starting to create TeamCity plugins repository and I've added your plugin to it:

Let us know if you want to change/update the information on the page.

Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
"Develop with pleasure!"


Please sign in to leave a comment.