All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.mosip.testrig.apirig.utils.MasterDataConfigManager Maven / Gradle / Ivy

The newest version!
package io.mosip.testrig.apirig.utils;

import java.util.HashMap;
import java.util.Map;
import java.util.Properties;

import org.apache.log4j.Logger;

import io.mosip.testrig.apirig.testrunner.MosipTestRunner;

public class MasterDataConfigManager extends ConfigManager{
	private static final Logger LOGGER = Logger.getLogger(MasterDataConfigManager.class);
	
	public static void init() {
		Map moduleSpecificPropertiesMap = new HashMap<>();
		// Load scope specific properties
		try {
			String path = MosipTestRunner.getGlobalResourcePath() + "/config/masterdata.properties";
			Properties props = getproperties(path);
			// Convert Properties to Map and add to moduleSpecificPropertiesMap
			for (String key : props.stringPropertyNames()) {
				moduleSpecificPropertiesMap.put(key, props.getProperty(key));
			}
		} catch (Exception e) {
			LOGGER.error(e.getMessage());
		}
		// Add module specific properties as well.
		init(moduleSpecificPropertiesMap);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy