Package net.datenwerke.eximport
Interface ExportService
- All Known Implementing Classes:
ExportServiceImpl
public interface ExportService
A service that provides access to exporting capabilities.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionconfigureExport(AbstractNode<?> node, boolean includeVariants, boolean flatten) Gets theExportConfigfor the given node.export(ExportConfig config) Exports the givenExportConfigas XML and returns its content as aStringvoidexportAsStream(ExportConfig config, OutputStream os) Exports the givenExportConfigas XML and writes the result to the supplied output stream.exportIndent(ExportConfig config) Exports the givenExportConfigas XML and returns its content as aStringproperly indendent.getExporterFor(Class<? extends Exporter> exporterType) Returns theExporterfor the given exporter typegetExporterFor(Object object) Returns the correct exporter for the given object or null if none was found.getExporterIds(Collection<Class<? extends Exporter>> exporters) Returns aCollectionofStrings holding the IDs of the given exporters
-
Method Details
-
export
Exports the givenExportConfigas XML and returns its content as aString- Parameters:
config- TheExportConfig- Returns:
- A
Stringcontaining the XML data of the exportedExportConfig
-
exportAsStream
Exports the givenExportConfigas XML and writes the result to the supplied output stream.- Parameters:
config- The configurationos- The output stream- Throws:
XMLStreamException
-
getExporterIds
Returns aCollectionofStrings holding the IDs of the given exporters- Parameters:
exporters- ACollectionofClasses holding the exporters- Returns:
- A
Collectioncontaining the exporters IDs
-
getExporterFor
Returns theExporterfor the given exporter type -
exportIndent
Exports the givenExportConfigas XML and returns its content as aStringproperly indendent.- Parameters:
config- TheExportConfig- Returns:
- A
Stringcontaining the XML data of the exportedExportConfig - See Also:
-
getExporterFor
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 theExportConfigfor 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 exportincludeVariants- 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
-