com.silverpeas.export.ical
Class ICalExporter

java.lang.Object
  extended by com.silverpeas.export.ical.ICalExporter
All Implemented Interfaces:
Exporter<ExportableCalendar>

@Named
public class ICalExporter
extends Object
implements Exporter<ExportableCalendar>

An exporter of calendar events into a file in the iCal format.


Method Summary
 void export(ExportDescriptor descriptor, ExportableCalendar calendar)
          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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

export

public void export(ExportDescriptor descriptor,
                   ExportableCalendar calendar)
            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:
export in interface Exporter<ExportableCalendar>
Parameters:
calendar - 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, ...).

getICalCodec

protected ICalCodec getICalCodec()
Gets the iCalCodec used to encode calendar events in iCal formatted text.

Returns:
an iCal codec.


Copyright © 2016 Silverpeas. All Rights Reserved.