com.jalios.jcms
Class NotificationThread

java.lang.Object
  extended by com.jalios.jcms.NotificationThread
All Implemented Interfaces:
Runnable

public class NotificationThread
extends Object
implements Runnable

Creates and sends customized emails to the appropriate members.

Version:
$Revision: 19040 $

Field Summary
protected  String newline
           
protected  StringBuffer output
           
protected  int period
           
static String REVISION
           
protected  javax.mail.Session session
           
protected  Thread thread
           
 
Constructor Summary
NotificationThread(int period)
           
 
Method Summary
static Map buildMemberPublicationSetMap(Set memberSet, int period)
          This methods finds for each given members the publications matching notification criterias of given period
static Set getMatchingPubSet(Member mbr, Set createSet, Set majorUpdateSet, Set allUpdateSet, int period)
           
 Set getToBeNotifiedMemberSet()
          This methods finds and return a set of members: - having a notification matching instance's period - from group having a notification matching instance's period
 void run()
           
 void sendMessages(Map mbrPubSetMap)
          Builds and sends messages containing publication notifications to corresponding members
 void start()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

thread

protected Thread thread

period

protected int period

newline

protected String newline

output

protected StringBuffer output

session

protected javax.mail.Session session
Constructor Detail

NotificationThread

public NotificationThread(int period)
Method Detail

start

public void start()

run

public void run()
Specified by:
run in interface Runnable

getToBeNotifiedMemberSet

public Set getToBeNotifiedMemberSet()
This methods finds and return a set of members: - having a notification matching instance's period - from group having a notification matching instance's period

Returns:
a set of all members which are to be notified

buildMemberPublicationSetMap

public static Map buildMemberPublicationSetMap(Set memberSet,
                                               int period)
This methods finds for each given members the publications matching notification criterias of given period

Parameters:
memberSet - the set of member we need to find publications
period - the period to match critera
Returns:
the publications matching notification criterias of given period

getMatchingPubSet

public static Set getMatchingPubSet(Member mbr,
                                    Set createSet,
                                    Set majorUpdateSet,
                                    Set allUpdateSet,
                                    int period)

sendMessages

public void sendMessages(Map mbrPubSetMap)
Builds and sends messages containing publication notifications to corresponding members



Copyright © 2001-2007 Jalios SA. All Rights Reserved.