org.sakaiproject.component.legacy.notification
Interface BaseNotificationService.Storage

All Known Implementing Classes:
DbNotificationService.DbStorage
Enclosing interface:
BaseNotificationService

protected static interface BaseNotificationService.Storage

Storage


Method Summary
 void cancel(NotificationEdit notification)
          Cancel the changes and release the lock.
 boolean check(String id)
          Check if a notification by this id exists.
 void close()
          Close.
 void commit(NotificationEdit notification)
          Commit the changes and release the lock.
 NotificationEdit edit(String id)
          Get a lock on the notification with this id, or null if a lock cannot be gotten.
 Notification get(String id)
          Get the notification with this id, or null if not found.
 List getAll()
          Get a List of all notifications.
 List getAll(String function)
          Get a List of all the notifications that are interested in this Event function.
 void open()
          Open and be ready to read / write.
 NotificationEdit put(String id)
          Add a new notification with this id.
 void remove(NotificationEdit notification)
          Remove this notification.
 

Method Detail

open

public void open()
Open and be ready to read / write.


close

public void close()
Close.


check

public boolean check(String id)
Check if a notification by this id exists.

Parameters:
id - The notification id.
Returns:
true if a nitificaion by this id exists, false if not.

put

public NotificationEdit put(String id)
Add a new notification with this id.

Parameters:
id - The notification id.
Returns:
The locked notification with this id, or null if in use.

get

public Notification get(String id)
Get the notification with this id, or null if not found.

Parameters:
id - The notification id.
Returns:
The notification with this id, or null if not found.

getAll

public List getAll(String function)
Get a List of all the notifications that are interested in this Event function.

Parameters:
function - The Event function
Returns:
The List (Notification) of all the notifications that are interested in this Event function.

getAll

public List getAll()
Get a List of all notifications.

Returns:
The List (Notification) of all notifications.

edit

public NotificationEdit edit(String id)
Get a lock on the notification with this id, or null if a lock cannot be gotten.

Parameters:
id - The user id.
Returns:
The locked Notification with this id, or null if this records cannot be locked.

commit

public void commit(NotificationEdit notification)
Commit the changes and release the lock.


cancel

public void cancel(NotificationEdit notification)
Cancel the changes and release the lock.


remove

public void remove(NotificationEdit notification)
Remove this notification.