ArgumentNullException.validate("report", report);
ArgumentNullException.validate("processingContext", processingContext);
ArgumentNullException.validate("outputFunction", outputFunction);
final ReportParameterDefinition parameters = report.getParameterDefinition();
final DefaultParameterContext parameterContext = new DefaultParameterContext(report);
// pre-init the output-processor-metadata.
initializeProcessingContext(processingContext, report);
this.designtime =
processingContext.getOutputProcessorMetaData().isFeatureSupported(OutputProcessorFeature.DESIGNTIME);
final ReportParameterValues parameterValues;
if (designtime == false)
{
try
{
final ReportParameterValidator reportParameterValidator = parameters.getValidator();
final ValidationResult validationResult =
reportParameterValidator.validate(new ValidationResult(), parameters, parameterContext);
if (validationResult.isEmpty() == false)
{
throw new ReportParameterValidationException
("The parameters provided for this report are not valid.", validationResult);
}
parameterValues = validationResult.getParameterValues();
}
finally
{
parameterContext.close();
}
}
else
{
parameterValues = new ReportParameterValues();