Package aQute.bnd.service.reporter
Interface ReportTransformerPlugin
@ProviderType
public interface ReportTransformerPlugin
This plugin transform an input model by applying a template on it.
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Get the set of file extension names corresponding to the model format that this plugin support.String[]
Get the set of file extension names corresponding to the template format that this plugin support.void
transform
(InputStream model, InputStream template, OutputStream output, Map<String, String> parameters) Transform the model by applying the template on it and write the result to the output stream.
-
Method Details
-
getHandledTemplateExtensions
String[] getHandledTemplateExtensions()Get the set of file extension names corresponding to the template format that this plugin support.- Returns:
- one or multiple extensions name, never
null
-
getHandledModelExtensions
String[] getHandledModelExtensions()Get the set of file extension names corresponding to the model format that this plugin support.- Returns:
- one or multiple extensions name, never
null
-
transform
void transform(InputStream model, InputStream template, OutputStream output, Map<String, String> parameters) throws ExceptionTransform the model by applying the template on it and write the result to the output stream.- Parameters:
model
- an input stream that contains the model, must not benull
template
- an input stream that contains the template, must not benull
output
- the output stream to write the transformation result, must not benull
parameters
- a map of parameters and their value that must be provided to the template engine, must not benull
- Throws:
Exception
- if any errors occur during the transformation process
-