Class ICalService


  • public class ICalService
    extends Object
    Service to send iCal appointments by email
    • Constructor Detail

      • ICalService

        public ICalService()
    • Method Detail

      • getService

        public static ICalService getService()
        Get an instance of the service
        Returns:
        An instance of the bean of this service
      • sendAppointment

        public void sendAppointment​(String strEmailAttendee,
                                    String strEmailOptionnal,
                                    String strSubject,
                                    String strBodyContent,
                                    String strLocation,
                                    String strSenderName,
                                    String strSenderEmail,
                                    fr.paris.lutece.plugins.appointment.web.dto.AppointmentDTO appointment,
                                    boolean bCreate)
        Send an appointment to a user by email.
        Parameters:
        strEmailAttendee - Comma separated list of users that will attend the appointment
        strEmailOptionnal - Comma separated list of users that will be invited to the appointment, but who are not required.
        strSubject - The subject of the appointment.
        strBodyContent - The body content that describes the appointment
        strLocation - The location of the appointment
        strSenderName - The name of the sender
        strSenderEmail - The email of the sender
        appointment - The appointment
        bCreate - True to notify the creation of the appointment, false to notify its removal
      • formatICalendarDescription

        public static String formatICalendarDescription​(String strDescription)
        Format the String containing the description of a calendar invite to respect the ICalendar specifications: 75 characters per line, CRLF + white-space at the start of new lines... ( c.f. iCalendar RFC5545 )
        Parameters:
        strDescription - The calendar's invite description to format
        Returns:
        the formated description, or the value of the original description if the formatting was not necessary
      • addAlternativeHtmlDescription

        public void addAlternativeHtmlDescription​(net.fortuna.ical4j.model.component.VEvent event,
                                                  String description)
        Add an alternative description to process and render HTML content properly. This should only be used if there is HTML in the description
        Parameters:
        event - The Calendar Event being created
        description - The description of the Event