use of org.finra.herd.model.dto.ConfigurationValue in project herd by FINRAOS.
the class AbstractSystemJob method getJobDataMap.
/**
* Returns a job data map that contains a single hash map that is loaded with name-value pairs as per specified list of configuration values. The parameter
* names are loaded/stored in lowercase.
*
* @param configurationValues the list of configuration values
*
* @return the job data map that contains a single hash map loaded with job parameters
*/
protected JobDataMap getJobDataMap(ConfigurationValue... configurationValues) {
// Create a hash map and load it with the specified configuration values.
Map<String, String> jobParameters = new HashMap<>();
for (ConfigurationValue configurationValue : configurationValues) {
String parameterValue = configurationHelper.getProperty(configurationValue);
jobParameters.put(configurationValue.getKey().toLowerCase(), parameterValue);
}
// Create a job data map and populate it with the parameters.
JobDataMap jobDataMap = new JobDataMap();
jobDataMap.put(SYSTEM_JOB_PARAMETERS, jobParameters);
return jobDataMap;
}
Aggregations