com.bea.apps.groupspace.announcements.poller.controls
Interface AnnouncementsPollerControl

All Known Implementing Classes:
AnnouncementsPollerControlImpl

public interface AnnouncementsPollerControl

Copyright (c) 2005-2006 by BEA Systems, Inc. All Rights Reserved.


Method Summary
 long cleanExpiredAnnouncements()
          Cleans up any announcements that have been expired.
 long notifyPendingAnnouncements()
          Searches all application related announcements for all communities and sends notifications for those announcements.
 boolean sendNotification(Announcement ann, boolean updateAnnouncement)
          Sends an announcement notification based on the provided announcement.
 void sendNotification(Announcement ann, String username)
          Sends an announcement notification based on the provided announcement to the provided user only.
 

Method Detail

notifyPendingAnnouncements

Searches all application related announcements for all communities and sends notifications for those announcements.

This method should only be called from the announcement poller, using the timer services built within the application container.

Returns
the number of announcements processed.
Throws
Exception

cleanExpiredAnnouncements

Cleans up any announcements that have been expired.

Returns
the number of announcements that were deleted
Throws
Exception

sendNotification

boolean sendNotification(Announcement ann,
                         boolean updateAnnouncement)
Sends an announcement notification based on the provided announcement. A notification will only be sent based on the following criteria:
  • The announcement must be in effect (i.e. effective <= now <= expiration
  • The notification date/time on the announcement must be null.

If this criteria is not satisfied, then a notification will not be sent.

Parameters
ann - The announcement which to send the notification on.
updateAnnouncement - Indicates whether to update the notification date and timestamp property on the announcement. If false, the caller is responsible for doing so (if applicable).
Returns
true if the notification was sent, false otherwise

sendNotification

void sendNotification(Announcement ann,
                      String username)
Sends an announcement notification based on the provided announcement to the provided user only.

Parameters
ann - The announcement to send the notification on
username - The wls username of the current user (cannot be null).


Copyright © 2006 BEA Systems, Inc. All Rights Reserved