class PDSExecutionEnvironmentService {

    public Map<String, String> buildEnvironmentMap(PDSJobConfiguration config) {

        String productId = config.getProductId();
        PDSProductSetup productSetup = serverConfigService.getProductSetupOrNull(productId);
        if (productSetup == null) {
            LOG.error("No product setup found for product id:{}", productId);
            return Collections.emptyMap();
        }

        Map<String, String> map = new LinkedHashMap<>();

        List<PDSExecutionParameterEntry> jobParams = config.getParameters();
        for (PDSExecutionParameterEntry jobParam : jobParams) {
            addJobParamDataWhenAccepted(productSetup, jobParam, map);
        }
        return map;
    }

}