Helper function for parsing the configuration of the combo-box.<p>

@param config the configuration string.
8663
private void parseConfiguration(String config) {

        CmsSelectConfigurationParser parser = new CmsSelectConfigurationParser(config);
        m_comboBox = new CmsSelectComboBox(parser.getOptions(), false);
        if (parser.getDefaultValue() != null) {
            //set the declared value selected.
            m_comboBox.setFormValueAsString(parser.getDefaultValue());
        }
        fireChangeEvent();
    }
1008297
private List<CmsRadioButton> parseConfiguration(String config) {

        // generate an empty list off radio button.
        List<CmsRadioButton> result = new LinkedList<CmsRadioButton>();

        CmsSelectConfigurationParser parser = new CmsSelectConfigurationParser(config);
        for (Map.Entry<String, String> entry : parser.getOptions().entrySet()) {
            // create a new radio button with the given name and label.
            CmsRadioButton radiobutton = new CmsRadioButton(entry.getKey(), entry.getValue());
            // add click handler.
            radiobutton.addClickHandler(new ClickHandler() {

                public void onClick(ClickEvent event) {

                    fireChangeEvent();
                }
            });
            // add this radio button to the group
            radiobutton.setGroup(m_group);
            // check if this value is default set.
            if (entry.getKey().equals(parser.getDefaultValue())) {
                radiobutton.setChecked(true);
                m_defaultRadioButton = radiobutton;
            }
            // add this radio button to the list.
            result.add(radiobutton);
        }
        return result;
    }
436538
@Modified
    protected void modified(Map<String, Object> config) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
            Tr.event(tc, "Config modified: " + this);
        }

        if (null == config) {
            return;
        }
        final String ENC = "encoding.";
        final String CONV = "converter.";
        for (Map.Entry<String, Object> entry : config.entrySet()) {
            String key = entry.getKey();
            int len = key.length();
            try {
                if (len > ENC.length() && key.startsWith(ENC)) {
                    String value = (String) entry.getValue();
                    localeMap.put(key.substring(ENC.length()), value);
                } else if (len > CONV.length() && key.startsWith(CONV)) {
                    String value = (String) entry.getValue();
                    converterMap.put(key.substring(CONV.length()).toLowerCase(),
                                     value.toLowerCase());
                }
            } catch (Throwable t) {
                FFDCFilter.processException(t,
                                            "EncodingUtils.processConfig", "1",
                                            new Object[] { key, entry.getValue() });
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Invalid property: [" + key
                                 + "]=[" + config.get(key) + "]");
                }
            }
        } // loop on the entries
    }
302735
public static void addConfig(Config config) {
		if (config == null) {
			throw new IllegalArgumentException("Config can not be null");
		}
		if (configNameToConfig.containsKey(config.getName())) {
			throw new IllegalArgumentException("Config already exists: " + config.getName());
		}
		
		configNameToConfig.put(config.getName(), config);
		
		/** 
		 * Replace the main config if current config name is MAIN_CONFIG_NAME
		 */
		if (MAIN_CONFIG_NAME.equals(config.getName())) {
			DbKit.config = config;
			Db.init(DbKit.config.getName());
		}
		
		/**
		 * The configName may not be MAIN_CONFIG_NAME,
		 * the main config have to set the first comming Config if it is null
		 */
		if (DbKit.config == null) {
			DbKit.config = config;
			Db.init(DbKit.config.getName());
		}
	}
1265002
public CmsXmlContentProperty withConfig(String config) {

        return new CmsXmlContentProperty(
            m_name,
            m_type,
            m_visibility,
            m_widget,
            config,
            m_ruleRegex,
            m_ruleType,
            m_default,
            m_niceName,
            m_description,
            m_error,
            m_preferFolder);
    }
938493
public static void init(com.typesafe.config.Config conf) {
		try {
			config = ConfigFactory.load().getConfig(PARA);

			if (conf != null) {
				config = conf.withFallback(config);
			}

			configMap = new HashMap<>();
			for (Map.Entry<String, ConfigValue> con : config.entrySet()) {
				if (con.getValue().valueType() != ConfigValueType.LIST) {
					configMap.put(con.getKey(), config.getString(con.getKey()));
				}
			}
		} catch (Exception ex) {
			logger.warn("Para configuration file 'application.(conf|json|properties)' is missing from classpath.");
			config = com.typesafe.config.ConfigFactory.empty();
		}
	}
131910
public Config getTweakedConfig(Config config, String dbModuleName)
    {
        return Config.getOverriddenConfig(config,
                new MapConfiguration(getConfigurationTweak(dbModuleName)));
    }
1183206
@Override
	public void applyConfig(final ConfigSettings config)
	{
		Object o = config
				.getConfigParameter(ConfigurationKeys.VERIFICATION_DIFF);
		if (o != null) {
			controller.setEnableDiffVerification((Boolean) o);
		}
		else {
			controller.setEnableDiffVerification(false);
		}

		o = config.getConfigParameter(ConfigurationKeys.VERIFICATION_ENCODING);
		if (o != null) {
			controller.setEnableEncodingVerification((Boolean) o);
		}
		else {
			controller.setEnableEncodingVerification(false);
		}

		o = config
				.getConfigParameter(ConfigurationKeys.MODE_STATISTICAL_OUTPUT);
		if (o != null) {
			controller.setEnableStatsOutput((Boolean) o);
		}
		else {
			controller.setEnableStatsOutput(false);
		}

		o = config.getConfigParameter(ConfigurationKeys.LOGGING_PATH_DEBUG);
		if (o != null) {
			controller.setEnableDebugOutput(true);
			this.debugOutputField.setText((String) o);
		}
		else {
			controller.setEnableDebugOutput(false);
			this.debugOutputField.setText("");
		}
	}
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
1116263
protected <T> T map(Config config, Class<T> clazz) {
    return map(config, null, null, clazz);
  }
232681
@Nonnull
    public Configuration filter(Configuration config) {
        final Map<String, Object> values = Maps.newHashMap();

        for (final ConfigurationField field : fields.values()) {
            final String name = field.getName();
            final String type = field.getFieldType();
            switch (type) {
                case BooleanField.FIELD_TYPE:
                    if (config.booleanIsSet(name)) {
                        values.put(name, config.getBoolean(name));
                    }
                    break;
                case NumberField.FIELD_TYPE:
                    if (config.intIsSet(name)) {
                        values.put(name, config.getInt(name));
                    }
                    break;
                case TextField.FIELD_TYPE:
                case DropdownField.FIELD_TYPE:
                    if (config.stringIsSet(name)) {
                        values.put(name, config.getString(name));
                    }
                    break;
                default:
                    throw new IllegalStateException("Unknown field type " + type + " for configuration field \"" + name + "\". This is a bug.");
            }
        }
        return new Configuration(values);
    }
949646
@Override
	public void applyConfig(final ConfigSettings config)
	{

		Object o = config
				.getConfigParameter(ConfigurationKeys.LOGGING_PATH_DIFFTOOL);
		if (o != null) {
			this.diffToolField.setText((String) o);
		}
		else {
			this.diffToolField.setText("");
		}

		o = config
				.getConfigParameter(ConfigurationKeys.LOGGING_LOGLEVEL_DIFFTOOL);
		if (o != null) {
			this.diffToolLogLevelComboBox.setSelectedItem(o);
		}

	}
807702
public void setInputDataConfig(java.util.Collection<Channel> inputDataConfig) {
        if (inputDataConfig == null) {
            this.inputDataConfig = null;
            return;
        }

        this.inputDataConfig = new java.util.ArrayList<Channel>(inputDataConfig);
    }
696140
public static synchronized void configure(final ApiConfiguration config) {
		
		ApiConfiguration.Builder builder = ApiConfiguration.newBuilder();
		
		builder.apiUrl(config.getApiUrl());
		builder.apiKey(config.getApiKey());
		builder.application(config.getApplication());
		builder.environment(config.getEnvironment());
		
		if (config.getEnvDetail() == null)
		{
			builder.envDetail(EnvironmentDetails.getEnvironmentDetail(config.getApplication(), config.getEnvironment()));
		}
		else
		{
			builder.envDetail(config.getEnvDetail());
		}
		
		CONFIG = builder.build();
	}
988590
private void parseConfig(Element property, BeanDefinitionBuilder propertyBuilder) {
        Element config = (Element) getTagChildren("config", property).item(0);

        if (config != null) {
            Properties properties = new Properties();
            NodeList entries = getTagChildren("entry", config);

            for (int i = 0; i < entries.getLength(); i++) {
                Element entry = (Element) entries.item(i);
                String key = entry.getAttribute("key");
                String value = entry.getTextContent().trim();
                properties.put(key, value);
            }

            propertyBuilder.addPropertyValue("config", properties);
        }
    }
572867
@Override
  public synchronized void init(PlayerConfig config) {
    super.init(config);
    this.fields = new HashMap<String, FieldType>();
    String fields = config.get(FIELDS_KEY);
    if (fields == null || "".equals(fields.trim())) {
      throw new IllegalArgumentException(this.getClass().getName() + " expects configuration property " + FIELDS_KEY);
    }
    String[] fieldsWithTypes = fields.split(" ");
    for (String fieldWithType : fieldsWithTypes) {
      String[] singleField = fieldWithType.split(":");
      if (singleField.length != 2) {
        continue;
      }
      FieldType type = getFieldType(singleField[1]);
      if (type != null) {
        this.fields.put(singleField[0], type);
      }
    }
  }
967745
private void parseConfiguration(String configuration) {

        Map<String, String> configOptions = CmsWidgetUtil.parsePipeSeparatedConfigString(configuration);
        if (!configOptions.isEmpty()) {
            m_category = CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_CATEGORY, m_category);
            m_isSingleValue = !("multi".equals(
                CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_SELECTIONTYPE, "single")));
            m_children = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_PARENTSELECTION);
            m_collapsed = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_COLLAPSED);
            m_showWithRepository = CmsWidgetUtil.getBooleanOption(configOptions, CONFIGURATION_SHOW_WITH_REPOSITORY);
            m_refPath = CmsWidgetUtil.getStringOption(configOptions, CONFIGURATION_REFPATH, m_refPath);
        }
    }