Class DefaultChartBeansGenerator

    • Constructor Detail

      • DefaultChartBeansGenerator

        public DefaultChartBeansGenerator()
    • Method Detail

      • createAndRunActionSequence

        protected void createAndRunActionSequence​(org.pentaho.platform.api.engine.IPentahoSession pentahoSession,
                                                  Map<String,​Object> params,
                                                  Map<String,​Object> defaultParameterMap,
                                                  String contentLinkingTemplate,
                                                  OutputStream out)
      • runActionSequence

        protected void runActionSequence​(org.pentaho.platform.api.engine.IPentahoSession pentahoSession,
                                         Map<String,​org.pentaho.platform.api.engine.IParameterProvider> parameterProviders,
                                         org.pentaho.platform.api.engine.IOutputHandler outputHandler,
                                         org.pentaho.actionsequence.dom.ActionSequenceDocument doc)
                                  throws RuntimeException
        Executes an action sequence from an ActionSequenceDocument.
        Parameters:
        pentahoSession - current IPentahoSession
        parameterProviders - map of parameter providers; there should a single entry with "request" as the key
        outputHandler - output handler
        doc - action sequence document
        Throws:
        RuntimeException - if anything goes wrong
      • createActionSequenceDocument

        protected org.pentaho.actionsequence.dom.ActionSequenceDocument createActionSequenceDocument​(Set<String> parameterNameSet,
                                                                                                     String contentLinkingTemplate)
        Creates an ActionSequenceDocument that will run an MQL query and pipe the results in the ChartBeans ChartComponent.
        Parameters:
        parameterNameSet - set of parameter names that appear in the MQL query
        Returns:
        doc
      • buildOpenFlashChartHtmlFragment

        public String buildOpenFlashChartHtmlFragment​(String openFlashChartJson,
                                                      String swfUrl,
                                                      String chartWidth,
                                                      String chartHeight)
        Does this method belong in ChartBeansGeneratorUtil? ChartBeansGeneratorUtil may be more of a convenience for executing the default ActionSequence, if this is to hold true, this method probably needs a new home more central to the ChartBeans code. Returns a complete HTML document that references an Open Flash Chart SWF resource that resides on the server along with the data that should be displayed in the chart (via a JavaScript function that returns a JSON string).

        Only exposed for debugging (i.e. hosted mode) purposes.

        Specified by:
        buildOpenFlashChartHtmlFragment in interface IChartBeansGenerator
      • buildJFreeChartHtmlFragment

        public String buildJFreeChartHtmlFragment​(File imageFile,
                                                  String imageMap,
                                                  String imageMapName,
                                                  int chartWidth,
                                                  int chartHeight,
                                                  String contextPath)
      • createChartAsHtml

        public String createChartAsHtml​(org.pentaho.platform.api.engine.IPentahoSession userSession,
                                        Map<String,​Object> parameterMap,
                                        String serializedChartDataDefinition,
                                        String serializedChartModel,
                                        int chartWidth,
                                        int chartHeight,
                                        String contentLinkingTemplate)
                                 throws IOException
        Throws:
        IOException