Package net.datenwerke.eximport
Class ExportServiceImpl
java.lang.Object
net.datenwerke.eximport.ExportServiceImpl
- All Implemented Interfaces:
ExportService
-
Constructor Summary
ConstructorsConstructorDescriptionExportServiceImpl(ExImportHelperService eiHelper, ExportSupervisorFactory exportSupervisorFactory, HookHandlerService hookHandler) -
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>> exporterTypes) Returns aCollectionofStrings holding the IDs of the given exporters
-
Constructor Details
-
Method Details
-
export
Description copied from interface:ExportServiceExports the givenExportConfigas XML and returns its content as aString- Specified by:
exportin interfaceExportService- Parameters:
config- TheExportConfig- Returns:
- A
Stringcontaining the XML data of the exportedExportConfig
-
exportIndent
Description copied from interface:ExportServiceExports the givenExportConfigas XML and returns its content as aStringproperly indendent.- Specified by:
exportIndentin interfaceExportService- Parameters:
config- TheExportConfig- Returns:
- A
Stringcontaining the XML data of the exportedExportConfig - See Also:
-
exportAsStream
Description copied from interface:ExportServiceExports the givenExportConfigas XML and writes the result to the supplied output stream.- Specified by:
exportAsStreamin interfaceExportService- Parameters:
config- The configurationos- The output stream- Throws:
XMLStreamException
-
getExporterIds
Description copied from interface:ExportServiceReturns aCollectionofStrings holding the IDs of the given exporters- Specified by:
getExporterIdsin interfaceExportService- Parameters:
exporterTypes- ACollectionofClasses holding the exporters- Returns:
- A
Collectioncontaining the exporters IDs
-
getExporterFor
Description copied from interface:ExportServiceReturns theExporterfor the given exporter type- Specified by:
getExporterForin interfaceExportService- Parameters:
exporterType- TheClassof the exporter type- Returns:
- The
Exporterfor the given type
-
getExporterFor
Description copied from interface:ExportServiceReturns the correct exporter for the given object or null if none was found.- Specified by:
getExporterForin interfaceExportService- Parameters:
object- The object to be exported- Returns:
- The exporter
-
configureExport
public Optional<ExportConfig> configureExport(AbstractNode<?> node, boolean includeVariants, boolean flatten) Description copied from interface:ExportServiceGets theExportConfigfor the given node. If the given node is a report, the includeVariants parameter is taken into account. If not, it is ignored.- Specified by:
configureExportin interfaceExportService- 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
-