public List<ReportParameter> getAvailableParameters(Report report) throws ProviderException { List<ReportParameter> parameters = getReportParameters(); Iterator<ReportParameter> iterator = parameters.iterator(); while (iterator.hasNext()) { ReportParameter rp = iterator.next(); Iterator<ReportParameterMap> reportIterator = report.getParameters().iterator(); while (reportIterator.hasNext()) { ReportParameterMap rpMap = reportIterator.next(); if (rp.getId().equals(rpMap.getReportParameter().getId())) { parameters.remove(rp); iterator = parameters.iterator(); } } } return parameters; }
public List<ReportParameter> getReportParameters(Report report, String type) throws ProviderException { List<ReportParameter> parameters = new ArrayList<ReportParameter>(); List<ReportParameterMap> allParameters = report.getParameters(); if (allParameters != null) { Iterator<ReportParameterMap> iterator = allParameters.iterator(); while (iterator.hasNext()) { ReportParameterMap rpMap = iterator.next(); if (rpMap.getReportParameter().getType().equals(type)) { parameters.add(rpMap.getReportParameter()); } } } return parameters; }