Class ICalExporter
- java.lang.Object
-
- org.silverpeas.core.importexport.ical.ICalExporter
-
- All Implemented Interfaces:
Exporter<ExportableCalendar>
@Singleton public class ICalExporter extends Object implements Exporter<ExportableCalendar>
An exporter of calendar events into a file in the iCal format.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
exports(ExportDescriptor descriptor, Supplier<ExportableCalendar> supplier)
Exports the specified events with a writer in the iCal format.protected ICalCodec
getICalCodec()
Gets the iCalCodec used to encode calendar events in iCal formatted text.
-
-
-
Method Detail
-
getICalCodec
protected ICalCodec getICalCodec()
Gets the iCalCodec used to encode calendar events in iCal formatted text.- Returns:
- an iCal codec.
-
exports
public void exports(ExportDescriptor descriptor, Supplier<ExportableCalendar> supplier) throws ExportException
Exports the specified events with a writer in the iCal format. If no events are specified, then a NoDataToExportException is thrown as no export can be done. The writer with which the events have to be exported is provided by the specified export descriptor.- Specified by:
exports
in interfaceExporter<ExportableCalendar>
- Parameters:
supplier
- a supplier of the calendar to export.descriptor
- the export descriptor in which is passed the writer with which the events should be exported.- Throws:
ExportException
- if the export fails (an IO issue occurs with the writer, no events to export, ...).
-
-