public class ExportServiceImpl extends java.lang.Object implements ExportService
| Constructor and Description |
|---|
ExportServiceImpl(ExImportHelperService eiHelper,
ExportSupervisorFactory exportSupervisorFactory,
HookHandlerService hookHandler) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<ExportConfig> |
configureExport(AbstractNode<?> node,
boolean includeVariants,
boolean flatten)
Gets the
ExportConfig for the given node. |
java.lang.String |
export(ExportConfig config)
Exports the given
ExportConfig as XML and returns its content as a
String |
void |
exportAsStream(ExportConfig config,
java.io.OutputStream os)
Exports the given
ExportConfig as XML and writes the result to the
supplied output stream. |
java.lang.String |
exportIndent(ExportConfig config)
Exports the given
ExportConfig as XML and returns its content as a
String properly indendent. |
Exporter |
getExporterFor(java.lang.Class<? extends Exporter> exporterType)
Returns the
Exporter for the given exporter type |
Exporter |
getExporterFor(java.lang.Object object)
Returns the correct exporter for the given object or null if none was found.
|
java.util.Collection<java.lang.String> |
getExporterIds(java.util.Collection<java.lang.Class<? extends Exporter>> exporterTypes)
Returns a
Collection of Strings holding the IDs of the given
exporters |
public ExportServiceImpl(ExImportHelperService eiHelper, ExportSupervisorFactory exportSupervisorFactory, HookHandlerService hookHandler)
public java.lang.String export(ExportConfig config)
ExportServiceExportConfig as XML and returns its content as a
Stringexport in interface ExportServiceconfig - The ExportConfigString containing the XML data of the exported
ExportConfigpublic java.lang.String exportIndent(ExportConfig config)
ExportServiceExportConfig as XML and returns its content as a
String properly indendent.exportIndent in interface ExportServiceconfig - The ExportConfigString containing the XML data of the exported
ExportConfigOutputKeys.INDENTpublic void exportAsStream(ExportConfig config, java.io.OutputStream os) throws javax.xml.stream.XMLStreamException
ExportServiceExportConfig as XML and writes the result to the
supplied output stream.exportAsStream in interface ExportServiceconfig - The configurationos - The output streamjavax.xml.stream.XMLStreamExceptionpublic java.util.Collection<java.lang.String> getExporterIds(java.util.Collection<java.lang.Class<? extends Exporter>> exporterTypes)
ExportServiceCollection of Strings holding the IDs of the given
exportersgetExporterIds in interface ExportServiceexporterTypes - A Collection of Classes holding the
exportersCollection containing the exporters IDspublic Exporter getExporterFor(java.lang.Class<? extends Exporter> exporterType)
ExportServiceExporter for the given exporter typegetExporterFor in interface ExportServiceexporterType - The Class of the exporter typeExporter for the given typepublic Exporter getExporterFor(java.lang.Object object)
ExportServicegetExporterFor in interface ExportServiceobject - The object to be exportedpublic java.util.Optional<ExportConfig> configureExport(AbstractNode<?> node, boolean includeVariants, boolean flatten)
ExportServiceExportConfig for the given node. If the given node is a
report, the includeVariants parameter is taken into account. If not, it is
ignored.configureExport in interface ExportServicenode - 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.