org.pentaho.platform.api.engine
Interface IParameterResolver

All Known Implementing Classes:
AbstractGenerateContentComponent, AbstractGenerateStreamContentComponent, AbstractJFreeReportComponent, BIRTReportComponent, ChartComponent, ComponentBase, ContentOutputComponent, ContentRepositoryCleaner, Custom1, EmailComponent, HelloWorldComponent, HQLBaseComponent, HQLDataComponent, HQLLookupRule, InstanceEnd, JasperReportsComponent, JavascriptRule, JFreeReportAllContentComponent, JFreeReportComponent, JFreeReportConfigParameterComponent, JFreeReportCSVComponent, JFreeReportDataComponent, JFreeReportDirectoryHtmlComponent, JFreeReportExcelComponent, JFreeReportGenerateDefinitionComponent, JFreeReportGeneratorComponent, JFreeReportHtmlComponent, JFreeReportLoadComponent, JFreeReportParametersComponent, JFreeReportPdfComponent, JFreeReportPreviewSwingComponent, JFreeReportPrintComponent, JFreeReportRTFComponent, JFreeReportStreamHtmlComponent, JFreeReportValidateParametersComponent, JFreeReportXmlComponent, JFreeReportZipHtmlComponent, JobSchedulerComponent, KettleComponent, MapParameterResolver, MDXBaseComponent, MDXDataComponent, MDXLookupRule, MondrianModelComponent, MQLRelationalDataComponent, OpenFlashChartComponent, PentahoVersionCheckComponent, PivotViewComponent, PojoComponent, PojoComponent, PrintComponent, ReportWizardSpecComponent, ResultSetCompareComponent, ResultSetCrosstabComponent, ResultSetExportComponent, ResultSetFlattenerComponent, SchedulerAdminComponent, SecureFilterComponent, SQLBaseComponent, SQLDataComponent, SQLDdlComponent, SQLExecute, SQLLookupRule, SubActionComponent, TemplateComponent, TestComponent, UtilityComponent, WebServiceLookupRule, XMLABaseComponent, XMLADataComponent, XMLALookupRule, XQueryBaseComponent, XQueryLookupRule

public interface IParameterResolver


Method Summary
 int resolveParameter(String template, String parameterName, Matcher parameterMatcher, int copyStart, StringBuffer result)
          Provides a way for components to inject their own replacements of parameter markers in the provided template.
 

Method Detail

resolveParameter

int resolveParameter(String template,
                     String parameterName,
                     Matcher parameterMatcher,
                     int copyStart,
                     StringBuffer result)
Provides a way for components to inject their own replacements of parameter markers in the provided template. This currently exposes too much of the internals of TemplateUtil IMO, but without serious surgery on the TemplateUtil, this is about the only way to accomplish the task.

Parameters:
template - The string containing replacement parameters
parameterName - The name of the located parameter in the template
parameterMatcher - The Regex matcher that located the parameter
copyStart - The current start to copy from the template
result - The final string with the parameter replacements inlined
Returns:
integer indicating the new copyStart to be used in the TemplateUtil in the event that the component handled the parameter. If negative, then no processing was done in the component. Any value greater than or equal to zero indicates processing happened in the component. TODO: Change this interface to make it easier to do things without exposing the internals of TemplateUtil.