Class ICal4JRecurrenceCodec


  • @Technical
    @Bean
    @Singleton
    public class ICal4JRecurrenceCodec
    extends Object
    A codec to encode/decode iCal4J recurrence with Silverpeas event recurrence.
    • Constructor Detail

      • ICal4JRecurrenceCodec

        @Inject
        public ICal4JRecurrenceCodec​(ICal4JDateCodec iCal4JDateCodec)
    • Method Detail

      • convertExceptionDates

        public net.fortuna.ical4j.model.DateList convertExceptionDates​(CalendarEvent event)
        Converts the exception dates from a calendar event with a recurrence rule.

        The presence of an exception date must be verified before calling this method.

        Parameters:
        event - a recurrent calendar event.
        Returns:
        the converted exception dates.
      • encode

        public net.fortuna.ical4j.model.Recur encode​(CalendarEvent event)
        Encodes the recurrence of the specified Silverpeas calendar event into an iCal4J recurrence.

        The presence of the recurrence rule must be verified before calling this method.

        Parameters:
        event - a recurrent calendar event.
        Returns:
        the encoded iCal4J recurrence.
        Throws:
        SilverpeasRuntimeException - if the encoding fails.
      • encode

        public net.fortuna.ical4j.model.WeekDay encode​(DayOfWeek dayOfWeek)
      • decode

        public Recurrence decode​(net.fortuna.ical4j.model.component.VEvent vEvent)
        Decodes the recurrence of the specified iCal4J event into a Silverpeas event recurrence.
        The presence of an exception date must be verified before calling this method.
        Parameters:
        vEvent - the iCal4J event source which contains recurrence data.
        Returns:
        the decoded Silverpeas event recurrence.
        Throws:
        SilverpeasRuntimeException - if the encoding fails.