org.silverpeas.dateReminder.persistent.service
Class DefaultDateReminderService

java.lang.Object
  extended by org.silverpeas.dateReminder.persistent.service.DefaultDateReminderService
All Implemented Interfaces:
PersistentDateReminderService

@Service(value="persistentDateReminderService")
public class DefaultDateReminderService
extends Object
implements PersistentDateReminderService

The default implementation of the PersistentDateReminderService interface.

Author:
Cécile Bonin

Constructor Summary
DefaultDateReminderService()
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDateReminderService

public DefaultDateReminderService()
Method Detail

get

public PersistentResourceDateReminder get(EntityReference resource)
Description copied from interface: PersistentDateReminderService
Gets the DateReminder of the resource referred by the specified EntityReference. If no date reminder exists for the resource, then PersistentResourceDateReminder#NoneDateReminder is returned.

Specified by:
get in interface PersistentDateReminderService
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(org.silverpeas.EntityReference)

create

@Transactional(propagation=REQUIRED)
public PersistentResourceDateReminder create(EntityReference resource,
                                                           DateReminderDetail dateReminderDetail)
                                      throws DateReminderException
Description copied from interface: PersistentDateReminderService
Create the DateReminder of the resource referred by the specified EntityReference.

Specified by:
create in interface PersistentDateReminderService
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(org.silverpeas.EntityReference, DateReminderDetail)

set

@Transactional(propagation=REQUIRED)
public PersistentResourceDateReminder set(EntityReference resource,
                                                        DateReminderDetail dateReminderDetail)
                                   throws DateReminderException
Description copied from interface: PersistentDateReminderService
Set the DateReminder of the resource referred by the specified EntityReference.

Specified by:
set in interface PersistentDateReminderService
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(org.silverpeas.EntityReference, DateReminderDetail)

remove

@Transactional(propagation=REQUIRED)
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 interface PersistentDateReminderService
Parameters:
resource - the resource for which the dateReminder has to be removed.
See Also:
PersistentDateReminderService.remove(org.silverpeas.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 interface PersistentDateReminderService
Parameters:
deadLine - the date which must trigger the date reminder.
Returns:
the list of date reminder that mature.
See Also:
PersistentDateReminderService.listAllDateReminderMaturing(Date)


Copyright © 2016 Silverpeas. All Rights Reserved.