Class DefaultDateReminderService
- java.lang.Object
-
- org.silverpeas.core.datereminder.persistence.service.DefaultDateReminderService
-
- All Implemented Interfaces:
PersistentDateReminderService
@Service @Singleton public class DefaultDateReminderService extends Object implements PersistentDateReminderService
The default implementation of thePersistentDateReminderService
interface.- Author:
- Cécile Bonin
-
-
Constructor Summary
Constructors Constructor Description DefaultDateReminderService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PersistentResourceDateReminder
create(EntityReference resource, DateReminderDetail dateReminderDetail)
Create the DateReminder of the resource referred by the specifiedEntityReference
.PersistentResourceDateReminder
get(EntityReference resource)
Gets the DateReminder of the resource referred by the specifiedEntityReference
.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 specifiedEntityReference
.
-
-
-
Method Detail
-
get
public PersistentResourceDateReminder get(EntityReference resource)
Description copied from interface:PersistentDateReminderService
Gets the DateReminder of the resource referred by the specifiedEntityReference
. If no date reminder exists for the resource, thenPersistentResourceDateReminder#NoneDateReminder
is returned.- Specified by:
get
in interfacePersistentDateReminderService
- 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.
- See Also:
PersistentDateReminderService.get(EntityReference)
-
create
public PersistentResourceDateReminder create(EntityReference resource, DateReminderDetail dateReminderDetail) throws DateReminderException
Description copied from interface:PersistentDateReminderService
Create the DateReminder of the resource referred by the specifiedEntityReference
.- Specified by:
create
in interfacePersistentDateReminderService
- Parameters:
resource
- a reference to the resource for which a dateReminder will be set.- Returns:
- the new date reminder created, associated with the specified resource
- Throws:
DateReminderException
- if an error occurs while creating a date reminder.- See Also:
PersistentDateReminderService.create(EntityReference, DateReminderDetail)
-
set
public PersistentResourceDateReminder set(EntityReference resource, DateReminderDetail dateReminderDetail) throws DateReminderException
Description copied from interface:PersistentDateReminderService
Set the DateReminder of the resource referred by the specifiedEntityReference
.- Specified by:
set
in interfacePersistentDateReminderService
- Parameters:
resource
- a reference to the resource for which a dateReminder will be set.- Returns:
- the date reminder updated, associated with the specified resource
- Throws:
DateReminderException
- if an error occurs while setting a date reminder.- See Also:
PersistentDateReminderService.set(EntityReference, DateReminderDetail)
-
remove
public void remove(EntityReference resource)
Description copied from interface:PersistentDateReminderService
Removes quietly the DateReminder of the resource referred by the specified entity reference.- Specified by:
remove
in interfacePersistentDateReminderService
- Parameters:
resource
- the resource for which the dateReminder has to be removed.- See Also:
PersistentDateReminderService.remove(EntityReference)
-
listAllDateReminderMaturing
public Collection<PersistentResourceDateReminder> listAllDateReminderMaturing(Date deadLine)
Description copied from interface:PersistentDateReminderService
Gets the DateReminder of the resource that mature.- Specified by:
listAllDateReminderMaturing
in interfacePersistentDateReminderService
- Parameters:
deadLine
- the date which must trigger the date reminder.- Returns:
- the list of date reminder that mature.
- See Also:
PersistentDateReminderService.listAllDateReminderMaturing(Date)
-
-