com.jalios.jcms
Class NotificationThread
java.lang.Object
com.jalios.jcms.NotificationThread
- All Implemented Interfaces:
- Runnable
public class NotificationThread
- extends Object
- implements Runnable
Creates and sends customized emails to the appropriate members.
- Retrieve all groups and all members having requested notification for the period
being currently handled.
- Retrieve all changes between now and now minus period
- Builds a set containing each member either belonging to a matching group or having the matching period
('matching' means the 'period' attribute value equals the current period)
- For each member:
If the member's attribute 'inheritsFromGroupsNotificationCriteria' is true:
- Retrieves all groups this member belongs to
- For each group which has indeed a period that is equal to the current processed period:
- Retrieves the notification selection criteria of the group and executes the query,
whith 'member' as loggedMember attribute of the QueryHandler
- Puts the result of the query in the publications set associated with this member
via a member|publications Map (as these publications are gathered in a set, there is no doublon)
For each query the user has chosen:
- Apply the query to the set of changed or created publications
- Matching publications are selected only if not previously selected
- The map user|publications is completed
- When all members have been processed, messages are sent.
- Version:
- $Revision: 23983 $
Constructor Summary |
NotificationThread(int period)
Constructor, creates a new notification thread for the specified period. |
Method Summary |
void |
run()
|
void |
start()
Starts the Notification Thread. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
REVISION
public static final String REVISION
- See Also:
- Constant Field Values
NotificationThread
public NotificationThread(int period)
- Constructor, creates a new notification thread for the specified period.
This constructors will not perform any heavy processing,
you must invoke method start() to launch thread.
- Parameters:
period
- a period constant from : NotificationManager.MINUTED
,
NotificationManager.HOURLY
, NotificationManager.DAILY
,
NotificationManager.WEEKLY
or NotificationManager.MONTHLY
start
public void start()
- Starts the Notification Thread.
run
public void run()
- Specified by:
run
in interface Runnable
Copyright © 2001-2010 Jalios SA. All Rights Reserved.