public interface ExportService
ImportService
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>> exporters)
Returns a
Collection of String s holding the IDs of the given
exporters |
java.lang.String export(ExportConfig config)
ExportConfig
as XML and returns its content as a
String
config
- The ExportConfig
String
containing the XML data of the exported
ExportConfig
void exportAsStream(ExportConfig config, java.io.OutputStream os) throws javax.xml.stream.XMLStreamException
ExportConfig
as XML and writes the result to the
supplied output stream.config
- The configurationos
- The output streamjavax.xml.stream.XMLStreamException
java.util.Collection<java.lang.String> getExporterIds(java.util.Collection<java.lang.Class<? extends Exporter>> exporters)
Collection
of String
s holding the IDs of the given
exportersexporters
- A Collection
of Class
es holding the
exportersCollection
containing the exporters IDsExporter getExporterFor(java.lang.Class<? extends Exporter> exporterType)
Exporter
for the given exporter typeexporterType
- The Class
of the exporter typeExporter
for the given typejava.lang.String exportIndent(ExportConfig config)
ExportConfig
as XML and returns its content as a
String
properly indendent.config
- The ExportConfig
String
containing the XML data of the exported
ExportConfig
OutputKeys.INDENT
Exporter getExporterFor(java.lang.Object object)
object
- The object to be exportedjava.util.Optional<ExportConfig> configureExport(AbstractNode<?> node, boolean includeVariants, boolean flatten)
ExportConfig
for the given node. If the given node is a
report, the includeVariants parameter is taken into account. If not, it is
ignored.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.