org.apache.agila.services.notification
Class AbstractNotificationService

java.lang.Object
  extended by org.apache.agila.services.notification.AbstractNotificationService
All Implemented Interfaces:
NotificationService
Direct Known Subclasses:
NotificationServiceImpl, NotificationServiceImpl

public abstract class AbstractNotificationService
extends java.lang.Object
implements NotificationService

Version:
$Id: $
Author:
Geir Magnusson Jr.

Constructor Summary
AbstractNotificationService()
           
 
Method Summary
protected abstract  NotificationImpl createNew(UserID userID, java.lang.String msg)
          Creates a new notification
 void dismissNotification(NotificationID id)
          Dismiss a notification.
protected abstract  NotificationImpl get(NotificationID id)
          Query the specific notification.
protected abstract  java.util.List getForUserID(UserID id)
          Query all notifications for a given user.
 Notification getNotification(NotificationID id)
          Get notification.
 java.util.List getNotificationsForUser(UserID id)
           
 NotificationID notify(UserID userID, java.lang.String message)
          Create a notification for a designated user.
protected abstract  boolean save(Notification notification)
          Update the notification info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractNotificationService

public AbstractNotificationService()
Method Detail

getNotificationsForUser

public java.util.List getNotificationsForUser(UserID id)
Specified by:
getNotificationsForUser in interface NotificationService

dismissNotification

public void dismissNotification(NotificationID id)
Dismiss a notification.

Specified by:
dismissNotification in interface NotificationService
Parameters:
id - the id of the notification to be dismissed

getNotification

public Notification getNotification(NotificationID id)
Get notification.

Specified by:
getNotification in interface NotificationService
Parameters:
id - the id of the notification to be retrieved

notify

public NotificationID notify(UserID userID,
                             java.lang.String message)
Create a notification for a designated user.

Specified by:
notify in interface NotificationService
Parameters:
userID - the user to notify
message - the notification message
Returns:
the id of the new notification

createNew

protected abstract NotificationImpl createNew(UserID userID,
                                              java.lang.String msg)
Creates a new notification

Parameters:
userID -
msg -
Returns:

save

protected abstract boolean save(Notification notification)
Update the notification info.

Parameters:
notification -
Returns:
true - successful update, false - failed update

get

protected abstract NotificationImpl get(NotificationID id)
Query the specific notification.

Parameters:
id -
Returns:

getForUserID

protected abstract java.util.List getForUserID(UserID id)
Query all notifications for a given user.

Parameters:
id -
Returns:


Copyright © 2004-2005 The Apache Software Foundation. All Rights Reserved.