class ImportExportServiceImpl implements ImportExportService, ZipFileInputManager, ApplicationContextAware {

    @Override
    public void doExport(OutputStream output, Map<String, String> exportParams, List<String> urisOfResources,
                         List<String> urisOfScheduledJobs, List<String> rolesToExport, List<String> usersToExport,
                         List<String> exportResourceTypes, String organizationId, Locale locale,
                         List<WarningDescriptor> warnings) throws ExportFailedException {

        Exporter exporter = this.getExporter();

        ExportTaskImpl task = new ExportTaskImpl();

        filterOptions(exportParams, organizationId);

        task.setExecutionContext(makeExecutionContext(locale));
        task.setParameters(createExportParameters(exportParams, urisOfResources, urisOfScheduledJobs, rolesToExport,
                usersToExport, exportResourceTypes, organizationId));
        String processorId = pathProcessorFactory.getDefaultOutputProcessor();
        PathProcessor pathProcessor = pathProcessorFactory.getProcessor(processorId);
        Properties properties = new Properties();
        properties.setProperty(propertyPathProcessorId, processorId);
        task.setOutput(new ZipStreamOutput(output, Deflater.BEST_COMPRESSION, pathProcessor, properties));
        task.setWarnings(warnings);
        startExport(exporter, task);
    }

}