Interface Exporter<T>

  • Type Parameters:
    T - The type of the resources to export.
    All Known Subinterfaces:
    ICalendarExporter
    All Known Implementing Classes:
    ICal4JExporter, ICalExporter

    public interface Exporter<T>
    An exporter of Silverpeas resource into a format of a given MIME type.

    All exporters in Silverpeas should implement this interface. An exporter in Silverpeas is defined for a specific type of resources and it has the responsibility to process the export of such types of resources into a specific format of a given MIME type.

    • Method Detail

      • exports

        void exports​(ExportDescriptor descriptor,
                     Supplier<T> supplier)
              throws ExportException
        Exports a resource of Silverpeas provided by the given supplier according to the export information carried by the specified export descriptor. The export descriptor supplies the output stream or the writer to use in the export process. Once the export is done (with success or failure), the writer and the output stream is closed.
        Parameters:
        descriptor - the export descriptor that describes how the export has to be done.
        supplier - the supplier that provides what resource to export. It starts the export process by, for example, getting the resource from the Silverpeas data source.
        Throws:
        ExportException - when an unexpected error occurs while exporting the resource.