public TypeValuePair evaluate(final FormulaContext context, final ParameterCallback parameters) throws EvaluationException { if (parameters.getParameterCount() != 3) { throw EvaluationException.getInstance(LibFormulaErrorValue.ERROR_ARGUMENTS_VALUE); } // 0: Configuration-indicator (gives the pattern indirectly) never the pattern itself // 1: the report-path // 2: the parameter as 2d-array (name value pairs) final TypeRegistry typeRegistry = context.getTypeRegistry(); final String configIndicator = typeRegistry.convertToText(parameters.getType(0), parameters.getValue(0)); String path; try { path = typeRegistry.convertToText(parameters.getType(1), parameters.getValue(1)); } catch (EvaluationException ee) { if (LibFormulaErrorValue.ERROR_NA_VALUE.equals(ee.getErrorValue())) { path = null; } else { throw ee; } } final ArrayCallback parameter = typeRegistry.convertToArray(parameters.getType(2), parameters.getValue(2)); final LinkCustomizer pattern = createLinkCustomizer(configIndicator); return new TypeValuePair( TextType.TYPE, pattern.format( context, configIndicator, path, computeParameterEntries(parameter, typeRegistry))); }