this.jobProperties = definition.getProcessingParameters().copy();
this.dataSourceFactory = (DataSourceFactory) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DATASOURCE_FACTORY);
if (this.dataSourceFactory == null)
{
throw new JobDefinitionException("DataSourceFactory must not be null.");
}
this.outputRepository = (OutputRepository) jobProperties.getProperty(ReportEngineParameterNames.OUTPUT_REPOSITORY);
if (this.outputRepository == null)
{
throw new JobDefinitionException("OutputRepository must not be null.");
}
this.inputRepository =
(InputRepository) jobProperties.getProperty(ReportEngineParameterNames.INPUT_REPOSITORY);
if (inputRepository == null)
{
throw new JobDefinitionException("InputRepository must not be null.");
}
this.outputName = (String) jobProperties.getProperty(ReportEngineParameterNames.OUTPUT_NAME);
if (outputName == null)
{
throw new JobDefinitionException("OutputName must not be null");
}
this.imageService = (ImageService) jobProperties.getProperty(ReportEngineParameterNames.IMAGE_SERVICE);
if (imageService == null)
{
throw new JobDefinitionException("A valid image-service implementation must be given.");
}
this.masterValues = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_MASTER_VALUES);
this.detailColumns = (ArrayList) jobProperties.getProperty(ReportEngineParameterNames.INPUT_DETAIL_COLUMNS);
Integer maxRows=(Integer) jobProperties.getProperty(ReportEngineParameterNames.MAXROWS);
this.resourceManager = new ResourceManager();
this.resourceManager.registerDefaults();
this.resourceManager.registerLoader(new InputRepositoryLoader(inputRepository));
try
{
this.report = parseReport(definition);
}
catch (ResourceException e)
{
throw new JobDefinitionException("Failed to parse the report.", e);
}
}