Class DefaultChartBeansGenerator
- java.lang.Object
-
- org.pentaho.platform.plugin.action.chartbeans.DefaultChartBeansGenerator
-
- All Implemented Interfaces:
IChartBeansGenerator
public class DefaultChartBeansGenerator extends Object implements IChartBeansGenerator
-
-
Constructor Summary
Constructors Constructor Description DefaultChartBeansGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildEmptyOpenFlashChartHtmlFragment(String msg)StringbuildJFreeChartHtmlFragment(File imageFile, String imageMap, String imageMapName, int chartWidth, int chartHeight, String contextPath)StringbuildOpenFlashChartHtmlFragment(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.protected org.pentaho.actionsequence.dom.ActionSequenceDocumentcreateActionSequenceDocument(Set<String> parameterNameSet, String contentLinkingTemplate)Creates anActionSequenceDocumentthat will run an MQL query and pipe the results in the ChartBeansChartComponent.protected voidcreateAndRunActionSequence(org.pentaho.platform.api.engine.IPentahoSession pentahoSession, Map<String,Object> params, Map<String,Object> defaultParameterMap, String contentLinkingTemplate, OutputStream out)StringcreateChartAsHtml(org.pentaho.platform.api.engine.IPentahoSession userSession, Map<String,Object> parameterMap, String serializedChartDataDefinition, String serializedChartModel, int chartWidth, int chartHeight)Convenience method that returns a complete HTML document containing the chart.StringcreateChartAsHtml(org.pentaho.platform.api.engine.IPentahoSession userSession, Map<String,Object> parameterMap, String serializedChartDataDefinition, String serializedChartModel, int chartWidth, int chartHeight, String contentLinkingTemplate)StringgetFlashObjectFragment()StringgetFlashScriptFragment()StringgetHtmlTemplate()StringmergeJFreeChartHtmlTemplate(File imageFile, String imageMap, String imageMapName, int chartWidth, int chartHeight, String contextPath)StringmergeOpenFlashChartHtmlTemplate(String openFlashChartJson, String swfUrl)StringmergeStaticImageHtmlTemplate(String imageUrl)protected voidrunActionSequence(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)Executes an action sequence from anActionSequenceDocument.
-
-
-
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 RuntimeExceptionExecutes an action sequence from anActionSequenceDocument.- Parameters:
pentahoSession- currentIPentahoSessionparameterProviders- map of parameter providers; there should a single entry with "request" as the keyoutputHandler- output handlerdoc- action sequence document- Throws:
RuntimeException- if anything goes wrong
-
createActionSequenceDocument
protected org.pentaho.actionsequence.dom.ActionSequenceDocument createActionSequenceDocument(Set<String> parameterNameSet, String contentLinkingTemplate)
Creates anActionSequenceDocumentthat will run an MQL query and pipe the results in the ChartBeansChartComponent.- Parameters:
parameterNameSet- set of parameter names that appear in the MQL query- Returns:
- doc
-
buildEmptyOpenFlashChartHtmlFragment
public String buildEmptyOpenFlashChartHtmlFragment(String msg)
- Specified by:
buildEmptyOpenFlashChartHtmlFragmentin interfaceIChartBeansGenerator
-
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:
buildOpenFlashChartHtmlFragmentin interfaceIChartBeansGenerator
-
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
-
createChartAsHtml
public String createChartAsHtml(org.pentaho.platform.api.engine.IPentahoSession userSession, Map<String,Object> parameterMap, String serializedChartDataDefinition, String serializedChartModel, int chartWidth, int chartHeight) throws IOException
Description copied from interface:IChartBeansGeneratorConvenience method that returns a complete HTML document containing the chart. Resource references point back to the BI Server.- Specified by:
createChartAsHtmlin interfaceIChartBeansGenerator- Throws:
IOException
-
mergeOpenFlashChartHtmlTemplate
public String mergeOpenFlashChartHtmlTemplate(String openFlashChartJson, String swfUrl)
- Specified by:
mergeOpenFlashChartHtmlTemplatein interfaceIChartBeansGenerator
-
mergeJFreeChartHtmlTemplate
public String mergeJFreeChartHtmlTemplate(File imageFile, String imageMap, String imageMapName, int chartWidth, int chartHeight, String contextPath)
- Specified by:
mergeJFreeChartHtmlTemplatein interfaceIChartBeansGenerator
-
mergeStaticImageHtmlTemplate
public String mergeStaticImageHtmlTemplate(String imageUrl)
- Specified by:
mergeStaticImageHtmlTemplatein interfaceIChartBeansGenerator
-
getHtmlTemplate
public String getHtmlTemplate()
- Specified by:
getHtmlTemplatein interfaceIChartBeansGenerator
-
getFlashScriptFragment
public String getFlashScriptFragment()
- Specified by:
getFlashScriptFragmentin interfaceIChartBeansGenerator
-
getFlashObjectFragment
public String getFlashObjectFragment()
- Specified by:
getFlashObjectFragmentin interfaceIChartBeansGenerator
-
-