Interface Exporter


public interface Exporter
An Exporter provides the ability to export a list of data objects to a supported export format.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    export(Class<?> dataObjectClass, List<? extends Object> dataObjects, String exportFormat, OutputStream outputStream)
    Exports the List of BusinessObjects to the specified ExportFormat.
    getSupportedFormats(Class<?> dataObjectClass)
    Returns a List of ExportFormats supported by this Exporter for the given DataOject class.
  • Method Details

    • export

      void export(Class<?> dataObjectClass, List<? extends Object> dataObjects, String exportFormat, OutputStream outputStream) throws IOException, ExportNotSupportedException
      Exports the List of BusinessObjects to the specified ExportFormat.

      The resulting output of the export operation should be written to the given OutputStream

      Parameters:
      dataObjectClass - the type of DataObjects being exported
      dataObjects - a List of DataObjects to export
      exportFormat - the export format in which to export the DataObjects
      outputStream - the OutputStream to write the exported data to
      Throws:
      IOException - if the process encounters an I/O issue
      ExportNotSupportedException - if the given ExportFormat is not supported
    • getSupportedFormats

      List<String> getSupportedFormats(Class<?> dataObjectClass)
      Returns a List of ExportFormats supported by this Exporter for the given DataOject class.
      Parameters:
      dataObjectClass - the class of the DataObjects being exported
      Returns:
      a List of supported ExportFormats