java.lang.Object
fr.paris.lutece.plugins.workflow.modules.appointment.service.ICalService

@Dependent @Named("workflow-appointment.iCalService") public class ICalService extends Object
Service to send iCal appointments by email
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.fortuna.ical4j.model.component.VEvent
    addAlternativeHtmlDescription(net.fortuna.ical4j.model.component.VEvent event, String description)
    Add an alternative description to process and render HTML content properly.
    static String
    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.
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ICalService

      public ICalService()
  • Method Details

    • 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 net.fortuna.ical4j.model.component.VEvent 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
      Returns:
      the event, carrying the alternative description when the content is HTML