Class XsltTransformerPlugin

    • 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  
    • 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • _extT

        private static final java.lang.String[] _extT
      • _extI

        private static final java.lang.String[] _extI
      • _transformerFactory

        private final javax.xml.transform.TransformerFactory _transformerFactory
    • Constructor Detail

      • XsltTransformerPlugin

        public XsltTransformerPlugin()
    • 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 interface ReportTransformerPlugin
        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 interface ReportTransformerPlugin
        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 interface ReportTransformerPlugin
        Parameters:
        data - an input stream that contains the model, must not be null
        template - an input stream that contains the template, must not be null
        output - the output stream to write the transformation result, must not be null
        parameters - a map of parameters and their value that must be provided to the template engine, must not be null
        Throws:
        java.lang.Exception - if any errors occur during the transformation process