KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > pentaho > core > util > IParameterResolver


1 /*
2  * Copyright 2006 Pentaho Corporation. All rights reserved.
3  * This software was developed by Pentaho Corporation and is provided under the terms
4  * of the Mozilla Public License, Version 1.1, or any later version. You may not use
5  * this file except in compliance with the license. If you need a copy of the license,
6  * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho
7  * BI Platform. The Initial Developer is Pentaho Corporation.
8  *
9  * Software distributed under the Mozilla Public License is distributed on an "AS IS"
10  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. Please refer to
11  * the license for the specific language governing your rights and limitations.
12 */

13 package org.pentaho.core.util;
14
15 import java.util.regex.Matcher JavaDoc;
16
17 public interface IParameterResolver {
18
19   /**
20    * Provides a way for components to inject their own replacements of parameter markers in the
21    * provided template. This currently exposes too much of the internals of TemplateUtil IMO, but
22    * without serious surgery on the TemplateUtil, this is about the only way to accomplish the task.
23    *
24    * @param template The string containing replacement parameters
25    * @param parameterName The name of the located parameter in the template
26    * @param parameterMatcher The Regex matcher that located the parameter
27    * @param copyStart The current start to copy from the template
28    * @param result The final string with the parameter replacements inlined
29    * @return integer indicating the new copyStart to be used in the TemplateUtil in the
30    * event that the component handled the parameter. If negative, then no processing was
31    * done in the component. Any value greater than or equal to zero indicates processing
32    * happened in the component.
33    *
34    * TODO: Change this interface to make it easier to do things without exposing the internals
35    * of TemplateUtil.
36    */

37    public int resolveParameter(String JavaDoc template, String JavaDoc parameterName, Matcher JavaDoc parameterMatcher, int copyStart, StringBuffer JavaDoc result);
38    
39 }
40
Free Books   Free Magazines  
Popular Tags