Class CVElementJsonHandler

  • All Implemented Interfaces:
    net.sf.jasperreports.engine.export.GenericElementHandler, net.sf.jasperreports.engine.export.GenericElementJsonHandler

    public class CVElementJsonHandler
    extends CVElementAbstractGenericHandler
    implements net.sf.jasperreports.engine.export.GenericElementJsonHandler
    Author:
    Giulio Toffoli (gt78@users.sourceforge.net)
    • Constructor Detail

      • CVElementJsonHandler

        public CVElementJsonHandler()
    • Method Detail

      • getJsonFragment

        public String getJsonFragment​(net.sf.jasperreports.engine.export.JsonExporterContext context,
                                      net.sf.jasperreports.engine.JRGenericPrintElement element)
        Creates the main component configuration. This also includes the information about which renderer to use.
        Specified by:
        getJsonFragment in interface net.sf.jasperreports.engine.export.GenericElementJsonHandler
        Parameters:
        context -
        element -
        Returns:
      • createConfigurationForJSON

        public static Map<String,​Object> createConfigurationForJSON​(Map<String,​Object> configuration,
                                                                          net.sf.jasperreports.engine.export.HtmlResourceHandler htmlResourceHandler)
        Clean the configuration object. This function removes objects in the configuration map that are not convertible in JSON (script object and design element). It also adds some useful properties for the element such as width, height and all the elements properties in form of property.xyz
        Parameters:
        configuration -
        Returns:
      • getResourceURL

        protected static String getResourceURL​(String scriptResourceLocation,
                                               net.sf.jasperreports.engine.export.HtmlResourceHandler htmlResourceHandler)