Class XsltTransformerPlugin
- java.lang.Object
-
- biz.aQute.bnd.reporter.plugins.transformer.XsltTransformerPlugin
-
- All Implemented Interfaces:
ReportTransformerPlugin
public class XsltTransformerPlugin extends java.lang.Object implements ReportTransformerPlugin
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
_extI
private static java.lang.String[]
_extT
private javax.xml.transform.TransformerFactory
_transformerFactory
-
Constructor Summary
Constructors Constructor Description XsltTransformerPlugin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getHandledModelExtensions()
Get the set of file extension names corresponding to the model format that this plugin support.java.lang.String[]
getHandledTemplateExtensions()
Get the set of file extension names corresponding to the template format that this plugin support.void
transform(java.io.InputStream data, java.io.InputStream template, java.io.OutputStream output, java.util.Map<java.lang.String,java.lang.String> parameters)
Transform the model by applying the template on it and write the result to the output stream.
-
-
-
Method Detail
-
getHandledTemplateExtensions
public java.lang.String[] getHandledTemplateExtensions()
Description copied from interface:ReportTransformerPlugin
Get the set of file extension names corresponding to the template format that this plugin support.- Specified by:
getHandledTemplateExtensions
in interfaceReportTransformerPlugin
- Returns:
- one or multiple extensions name, never
null
-
getHandledModelExtensions
public java.lang.String[] getHandledModelExtensions()
Description copied from interface:ReportTransformerPlugin
Get the set of file extension names corresponding to the model format that this plugin support.- Specified by:
getHandledModelExtensions
in interfaceReportTransformerPlugin
- Returns:
- one or multiple extensions name, never
null
-
transform
public void transform(java.io.InputStream data, java.io.InputStream template, java.io.OutputStream output, java.util.Map<java.lang.String,java.lang.String> parameters) throws java.lang.Exception
Description copied from interface:ReportTransformerPlugin
Transform the model by applying the template on it and write the result to the output stream.- Specified by:
transform
in interfaceReportTransformerPlugin
- Parameters:
data
- 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:
java.lang.Exception
- if any errors occur during the transformation process
-
-