Interface ExportService

All Known Implementing Classes:
ExportServiceImpl

public interface ExportService
A service that provides access to exporting capabilities.
See Also:
  • Method Details

    • export

      String export(ExportConfig config)
      Exports the given ExportConfig as XML and returns its content as a String
      Parameters:
      config - The ExportConfig
      Returns:
      A String containing the XML data of the exported ExportConfig
    • exportAsStream

      void exportAsStream(ExportConfig config, OutputStream os) throws XMLStreamException
      Exports the given ExportConfig as XML and writes the result to the supplied output stream.
      Parameters:
      config - The configuration
      os - The output stream
      Throws:
      XMLStreamException
    • getExporterIds

      Collection<String> getExporterIds(Collection<Class<? extends Exporter>> exporters)
      Returns a Collection of Strings holding the IDs of the given exporters
      Parameters:
      exporters - A Collection of Classes holding the exporters
      Returns:
      A Collection containing the exporters IDs
    • getExporterFor

      Exporter getExporterFor(Class<? extends Exporter> exporterType)
      Returns the Exporter for the given exporter type
      Parameters:
      exporterType - The Class of the exporter type
      Returns:
      The Exporter for the given type
    • exportIndent

      String exportIndent(ExportConfig config)
      Exports the given ExportConfig as XML and returns its content as a String properly indendent.
      Parameters:
      config - The ExportConfig
      Returns:
      A String containing the XML data of the exported ExportConfig
      See Also:
    • getExporterFor

      Exporter getExporterFor(Object object)
      Returns the correct exporter for the given object or null if none was found.
      Parameters:
      object - The object to be exported
      Returns:
      The exporter
    • configureExport

      Optional<ExportConfig> configureExport(AbstractNode<?> node, boolean includeVariants, boolean flatten)
      Gets the ExportConfig for the given node. If the given node is a report, the includeVariants parameter is taken into account. If not, it is ignored.
      Parameters:
      node - the node to export
      includeVariants - if the node to export is a report and includeVariants is true, the report variants are exported as well.
      flatten - if the tree should be flattened, i.e. all folders should be stripped away.
      Returns:
      the export configuration