com.xpn.xwiki.plugin.watchlist
Class WatchListNotifier

java.lang.Object
  extended by com.xpn.xwiki.plugin.watchlist.WatchListNotifier

public class WatchListNotifier
extends java.lang.Object

Utility class used by the watchlist plugin to send notifications to users. The current implementation offers email notifications only.

Version:
$Id: WatchListNotifier.java 22905 2009-08-25 14:17:34Z jvdrean $

Field Summary
static java.lang.String DEFAULT_EMAIL_TEMPLATE
          Wiki page which contains the default watchlist email template.
static java.lang.String XWIKI_USER_CLASS
          XWiki User Class.
static java.lang.String XWIKI_USER_CLASS_FIRST_NAME_PROP
          XWiki User Class first name property name.
static java.lang.String XWIKI_USER_CLASS_LAST_NAME_PROP
          XWiki User Class last name property name.
 
Constructor Summary
WatchListNotifier()
           
 
Method Summary
 void sendEmailNotification(java.lang.String subscriber, java.util.List<WatchListEvent> events, java.lang.String emailTemplate, java.util.Date previousFireTime, com.xpn.xwiki.XWikiContext context)
          Sends the email notifying the subscriber that the updatedDocuments have been changed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EMAIL_TEMPLATE

public static final java.lang.String DEFAULT_EMAIL_TEMPLATE
Wiki page which contains the default watchlist email template.

See Also:
Constant Field Values

XWIKI_USER_CLASS

public static final java.lang.String XWIKI_USER_CLASS
XWiki User Class.

See Also:
Constant Field Values

XWIKI_USER_CLASS_FIRST_NAME_PROP

public static final java.lang.String XWIKI_USER_CLASS_FIRST_NAME_PROP
XWiki User Class first name property name.

See Also:
Constant Field Values

XWIKI_USER_CLASS_LAST_NAME_PROP

public static final java.lang.String XWIKI_USER_CLASS_LAST_NAME_PROP
XWiki User Class last name property name.

See Also:
Constant Field Values
Constructor Detail

WatchListNotifier

public WatchListNotifier()
Method Detail

sendEmailNotification

public void sendEmailNotification(java.lang.String subscriber,
                                  java.util.List<WatchListEvent> events,
                                  java.lang.String emailTemplate,
                                  java.util.Date previousFireTime,
                                  com.xpn.xwiki.XWikiContext context)
                           throws com.xpn.xwiki.XWikiException
Sends the email notifying the subscriber that the updatedDocuments have been changed.

Parameters:
subscriber - user to notify
events - list of events
emailTemplate - email template to use
previousFireTime - last time the notification was fired
context - the XWiki context
Throws:
com.xpn.xwiki.XWikiException - if mail sending fails


Copyright © 2004-2010 XWiki. All Rights Reserved.