class ConfigurationModulesLoader {
	
	@SuppressWarnings("unused")
	private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationModulesLoader.class);
	

	
	public static String toJSONString(Map<String,IntegrationConfiguration> configurations) throws Exception {
		
		StringBuilder jsonModules = new StringBuilder();
		jsonModules.append("[");
		int count = 0;
		for(Object key : configurations.keySet()) {
			
			String k = (String)key;
			IntegrationConfiguration c = configurations.get(k);
			
			String jsonString = c.toJSONString();
			jsonModules.append(jsonString);
			
			count ++;
			if(count<configurations.size()) {
				jsonModules.append(",");
			}
		}
		jsonModules.append("]");
		return jsonModules.toString();
		
		
	}
	
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public static Map<String,IntegrationConfiguration> loadIntegrationConfigurations(String value) throws Exception {<FILL_FUNCTION_BODY>}

}

		
		
		Map<String,IntegrationConfiguration> modules = new HashMap<String,IntegrationConfiguration>();
		
		ObjectMapper mapper = new ObjectMapper();
		
		try {
			

            Map[] objects = mapper.readValue(value, Map[].class);

			for (Map object : objects) {


				IntegrationConfiguration configuration = new IntegrationConfiguration();

				String moduleCode = (String) object.get("moduleCode");
				if (object.get("active") != null) {
					configuration.setActive((Boolean) object.get("active"));
				}
				if (object.get("defaultSelected") != null) {
					configuration.setDefaultSelected((Boolean) object.get("defaultSelected"));
				}
				if (object.get("environment") != null) {
					configuration.setEnvironment((String) object.get("environment"));
				}
				configuration.setModuleCode(moduleCode);

				modules.put(moduleCode, configuration);

				if (object.get("integrationKeys") != null) {
					Map<String, String> confs = (Map<String, String>) object.get("integrationKeys");
					configuration.setIntegrationKeys(confs);
				}

				if (object.get("integrationKeys") != null) {
					Map<String, List<String>> options = (Map<String, List<String>>) object.get("integrationOptions");
					configuration.setIntegrationOptions(options);
				}


			}
            
            return modules;

  		} catch (Exception e) {
  			throw new ServiceException(e);
  		}
  		

	
	
<no_super_class>