Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.apps.groupspace.announcements.poller.controls
Class AnnouncementsPollerControlImpl

    java.lang.Object
      com.bea.apps.groupspace.announcements.poller.controls.AnnouncementsPollerControlImpl

All Implemented Interfaces
  AnnouncementsPollerControl, Serializable

    public class AnnouncementsPollerControlImpl

extends Object
implements AnnouncementsPollerControl, Serializable

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

See Also
  Serialized Form

Field Summary
`protected AnnouncementsPollerCmxControl` | `announcementsBeanX`
`protected org.apache.beehive.controls.api.context.ControlBeanContext` | `controlContext` Control context

Constructor Summary
`AnnouncementsPollerControlImpl()`

Method Summary
`long` | `cleanExpiredAnnouncements()` Searches for all expired application announcements and physically removes them from CM.
`long` | `notifyPendingAnnouncements()` Searches all application related announcements for all communities and sends notifications for those announcements.
`void` | `onCreate()` Put any other init params here.
`void` | `remove(Announcement ann)`
`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.
`void` | `update(Announcement ann)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### controlContext

    protected org.apache.beehive.controls.api.context.ControlBeanContext controlContext

  Control context

### announcementsBeanX

    protected AnnouncementsPollerCmxControl announcementsBeanX

Constructor Detail

### AnnouncementsPollerControlImpl

    public AnnouncementsPollerControlImpl()

Method Detail

### update

    public void update(Announcement ann)
                throws AuthorizationException,
                       NoSuchNodeException,
                       NoSuchPropertyException,
                       RepositoryException

  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `NoSuchPropertyException`
    `RepositoryException`

### remove

    public void remove(Announcement ann)
                throws AuthorizationException,
                       NoSuchNodeException,
                       NoSuchPropertyException,
                       RepositoryException

  Throws
    `AuthorizationException`
    `NoSuchNodeException`
    `NoSuchPropertyException`
    `RepositoryException`

### notifyPendingAnnouncements

    public long notifyPendingAnnouncements()
                                    throws Exception

  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.

  Specified by:
    `notifyPendingAnnouncements` in interface `AnnouncementsPollerControl`
  Returns
    the number of announcements that were processed.
  Throws
    `Exception`

### cleanExpiredAnnouncements

    public long cleanExpiredAnnouncements()
                                   throws Exception

  Searches for all expired application announcements and physically removes them from CM.

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

  Specified by:
    `cleanExpiredAnnouncements` in interface `AnnouncementsPollerControl`
  Returns
    the number of announcements that were deleted.
  Throws
    `Exception`

### sendNotification

    public 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.
  - The announcement must be created within the context of a community.

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

  Specified by:
    `sendNotification` in interface `AnnouncementsPollerControl`
  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

    public void sendNotification(Announcement ann,
                                 String username)

  Sends an announcement notification based on the provided announcement to the provided user only.

  Specified by:
    `sendNotification` in interface `AnnouncementsPollerControl`
  Parameters
    `ann` - The announcement to send the notification on (required).
    `username` - The wls username of the current user (required).

### onCreate

    public void onCreate()
                  throws org.apache.beehive.controls.api.ControlException

  Put any other init params here. Note they can go on the control interface annotations. See the CM_Control.java file for an example of declaring parameters, and the CM_ControlImpl.jcs file for accessing those parameters

  Throws
    `org.apache.beehive.controls.api.ControlException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved