org.pentaho.platform.plugin.action.chartbeans
Class ChartBeansGeneratorUtil

java.lang.Object
  extended by org.pentaho.platform.plugin.action.chartbeans.ChartBeansGeneratorUtil

public class ChartBeansGeneratorUtil
extends Object

Takes all inputs necessary to generate a chart and passes them to the ChartBeans engine (via an xaction).


Method Summary
static String buildEmptyOpenFlashChartHtmlFragment(String msg)
           
static String createChartAsHtml(IPentahoSession userSession, Map<String,Object> parameterMap, String serializedChartDataDefinition, String serializedChartModel, int chartWidth, int chartHeight)
           
static String createChartAsHtml(IPentahoSession userSession, Map<String,Object> parameterMap, String serializedChartDataDefinition, String serializedChartModel, int chartWidth, int chartHeight, String contentLinkingTemplate)
           
static String mergeJFreeChartHtmlTemplate(File imageFile, String imageMap, String imageMapName, int chartWidth, int chartHeight, String contextPath)
           
static String mergeOpenFlashChartHtmlTemplate(String openFlashChartJson, String swfUrl)
          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.
static String mergeStaticImageHtmlTemplate(String imageUrl)
          Returns a complete HTML document that references a static image held in a temporary file on the server.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createChartAsHtml

public static String createChartAsHtml(IPentahoSession userSession,
                                       Map<String,Object> parameterMap,
                                       String serializedChartDataDefinition,
                                       String serializedChartModel,
                                       int chartWidth,
                                       int chartHeight)
                                throws IOException
Throws:
IOException

createChartAsHtml

public static String createChartAsHtml(IPentahoSession userSession,
                                       Map<String,Object> parameterMap,
                                       String serializedChartDataDefinition,
                                       String serializedChartModel,
                                       int chartWidth,
                                       int chartHeight,
                                       String contentLinkingTemplate)
                                throws IOException
Throws:
IOException

mergeJFreeChartHtmlTemplate

public static String mergeJFreeChartHtmlTemplate(File imageFile,
                                                 String imageMap,
                                                 String imageMapName,
                                                 int chartWidth,
                                                 int chartHeight,
                                                 String contextPath)

mergeStaticImageHtmlTemplate

public static String mergeStaticImageHtmlTemplate(String imageUrl)
Returns a complete HTML document that references a static image held in a temporary file on the server.

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


mergeOpenFlashChartHtmlTemplate

public static String mergeOpenFlashChartHtmlTemplate(String openFlashChartJson,
                                                     String swfUrl)
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.


buildEmptyOpenFlashChartHtmlFragment

public static String buildEmptyOpenFlashChartHtmlFragment(String msg)