Class ICalService


  • public class ICalService
    extends java.lang.Object
    Service to send iCal appointments by email
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String BEAN_NAME
      The name of the bean of this service
    • Constructor Summary

      Constructors 
      Constructor Description
      ICalService()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addAlternativeHtmlDescription​(net.fortuna.ical4j.model.component.VEvent event, java.lang.String description)
      Add an alternative description to process and render HTML content properly.
      static java.lang.String formatICalendarDescription​(java.lang.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...
      static ICalService getService()
      Get an instance of the service
      void sendAppointment​(java.lang.String strEmailAttendee, java.lang.String strEmailOptionnal, java.lang.String strSubject, java.lang.String strBodyContent, java.lang.String strLocation, java.lang.String strSenderName, java.lang.String strSenderEmail, fr.paris.lutece.plugins.appointment.web.dto.AppointmentDTO appointment, boolean bCreate)
      Send an appointment to a user by email.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • BEAN_NAME

        public static final java.lang.String BEAN_NAME
        The name of the bean of this service
        See Also:
        Constant Field Values
    • 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​(java.lang.String strEmailAttendee,
                                    java.lang.String strEmailOptionnal,
                                    java.lang.String strSubject,
                                    java.lang.String strBodyContent,
                                    java.lang.String strLocation,
                                    java.lang.String strSenderName,
                                    java.lang.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 java.lang.String formatICalendarDescription​(java.lang.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,
                                                  java.lang.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