Package org.silverpeas.core.reminder
Class Reminder.ReminderBuilder
- java.lang.Object
-
- org.silverpeas.core.reminder.Reminder.ReminderBuilder
-
-
Constructor Summary
Constructors Constructor Description ReminderBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Reminder.ReminderBuilder
about(ContributionIdentifier contribution)
The reminder is about the specified contribution.Reminder.ReminderBuilder
forUser(User user)
The reminders is for the specified user.DateTimeReminder
triggerAt(OffsetDateTime dateTime, ReminderProcessName processName)
Triggers the reminder at the specified date time.DurationReminder
triggerBefore(int duration, TimeUnit timeUnit, String temporalProperty, ReminderProcessName processName)
Triggers this reminder the specified duration before the given property of the contribution.DateTimeReminder
triggerFrom(String temporalProperty, ReminderProcessName processName)
Triggers the reminder from the temporal property of the contribution.Reminder.ReminderBuilder
withText(String text)
The reminder is annotated with the specified text.
-
-
-
Method Detail
-
about
public Reminder.ReminderBuilder about(ContributionIdentifier contribution)
The reminder is about the specified contribution.- Parameters:
contribution
- the unique identifier of a contribution.- Returns:
- itself.
-
forUser
public Reminder.ReminderBuilder forUser(User user)
The reminders is for the specified user.- Parameters:
user
- the user aimed by the reminder.- Returns:
- itself.
-
withText
public Reminder.ReminderBuilder withText(String text)
The reminder is annotated with the specified text.- Parameters:
text
- the text associated with the reminder.- Returns:
- itself.
-
triggerBefore
public DurationReminder triggerBefore(int duration, TimeUnit timeUnit, String temporalProperty, ReminderProcessName processName)
Triggers this reminder the specified duration before the given property of the contribution. The property must represents either a date or a date time whose the value is aTemporal
object. For example the start date of an event or the end date of the visibility of a publication.- Parameters:
duration
- the duration value prior to the temporal property of the contribution.timeUnit
- the time unit in which is expressed the duration.temporalProperty
- the temporal property of the contribution.processName
- the name of the process the reminder MUST perform when triggered.- Returns:
- a
DurationReminder
instance.
-
triggerAt
public DateTimeReminder triggerAt(OffsetDateTime dateTime, ReminderProcessName processName)
Triggers the reminder at the specified date time.- Parameters:
dateTime
- theOffsetDateTime
at which the reminder will be triggered.processName
- the name of the process the reminder MUST perform when triggered.- Returns:
- a
DateTimeReminder
instance.
-
triggerFrom
public DateTimeReminder triggerFrom(String temporalProperty, ReminderProcessName processName)
Triggers the reminder from the temporal property of the contribution.- Parameters:
temporalProperty
- the temporal property of the contribution.processName
- the name of the process the reminder MUST perform when triggered.- Returns:
- a
DateTimeReminder
instance.
-
-