use of org.pentaho.reporting.engine.classic.core.parameters.PlainParameter in project head by mifos.
the class PentahoParamParser method parseParam.
private AbstractPentahoParameter parseParam(ParameterDefinitionEntry paramDefEntry, ParameterContext paramContext, Map<String, AbstractPentahoParameter> selectedValues, boolean update) throws ReportDataFactoryException {
AbstractPentahoParameter result = null;
if (paramDefEntry instanceof PlainParameter) {
result = parsePlainParameter((PlainParameter) paramDefEntry);
} else if (paramDefEntry instanceof ListParameter) {
result = parseListParameter((ListParameter) paramDefEntry, paramContext, selectedValues, update);
} else {
return null;
}
result.setMandatory(paramDefEntry.isMandatory());
result.setParamName(paramDefEntry.getName());
if (null != paramDefEntry.getParameterAttribute(paramDefEntry.getParameterAttributeNamespaces()[0], "label", paramContext)) {
result.setLabelName(paramDefEntry.getParameterAttribute(paramDefEntry.getParameterAttributeNamespaces()[0], "label", paramContext).replace(":", ""));
} else {
result.setLabelName(paramDefEntry.getName());
}
return result;
}
Aggregations