org.silverpeas.dateReminder.persistent.service
Interface PersistentDateReminderService

All Known Implementing Classes:
DefaultDateReminderService

public interface PersistentDateReminderService

A service on the persistent date reminder for Silverpeas entities. It wraps the mechanism to compute and to retrieve a date reminder for a given resource handled in Silverpeas.

Author:
Cécile Bonin

Method Summary
 PersistentResourceDateReminder create(EntityReference resource, DateReminderDetail dateReminderDetail)
          Create the DateReminder of the resource referred by the specified EntityReference.
 PersistentResourceDateReminder get(EntityReference resource)
          Gets the DateReminder of the resource referred by the specified EntityReference.
 Collection<PersistentResourceDateReminder> listAllDateReminderMaturing(Date deadLine)
          Gets the DateReminder of the resource that mature.
 void remove(EntityReference resource)
          Removes quietly the DateReminder of the resource referred by the specified entity reference.
 PersistentResourceDateReminder set(EntityReference resource, DateReminderDetail dateReminderDetail)
          Set the DateReminder of the resource referred by the specified EntityReference.
 

Method Detail

get

PersistentResourceDateReminder get(EntityReference resource)
Gets the DateReminder of the resource referred by the specified EntityReference. If no date reminder exists for the resource, then PersistentResourceDateReminder#NoneDateReminder is returned.

Parameters:
resource - a reference to the resource for which a date reminder will be initialized.
Returns:
either the date reminder associated with the specified resource or NoneDateReminder if no such date reminder exists.

create

PersistentResourceDateReminder create(EntityReference resource,
                                      DateReminderDetail dateReminderDetail)
                                      throws DateReminderException
Create the DateReminder of the resource referred by the specified EntityReference.

Parameters:
resource - a reference to the resource for which a dateReminder will be set.
dateReminderDetail -
Returns:
the new date reminder created, associated with the specified resource
Throws:
DateReminderException - if an unexpected error occurs while initializing a dateReminder.

set

PersistentResourceDateReminder set(EntityReference resource,
                                   DateReminderDetail dateReminderDetail)
                                   throws DateReminderException
Set the DateReminder of the resource referred by the specified EntityReference.

Parameters:
resource - a reference to the resource for which a dateReminder will be set.
dateReminderDetail -
Returns:
the date reminder updated, associated with the specified resource
Throws:
DateReminderException - if an unexpected error occurs while initializing a dateReminder.

remove

void remove(EntityReference resource)
Removes quietly the DateReminder of the resource referred by the specified entity reference.

Parameters:
resource - the resource for which the dateReminder has to be removed.

listAllDateReminderMaturing

Collection<PersistentResourceDateReminder> listAllDateReminderMaturing(Date deadLine)
Gets the DateReminder of the resource that mature.

Parameters:
deadLine - the date which must trigger the date reminder.
Returns:
the list of date reminder that mature.


Copyright © 2016 Silverpeas. All Rights Reserved.