Parses the the given configuration string.<p>

@param config the configuration
169566
private void parseConfig(String config) {

        if (isValidConfig(config)) {
            String[] conf = config.split("x");
            if (conf[0].trim().equals("?")) {
                m_width = I_CmsFormatRestriction.DIMENSION_NOT_SET;
            } else {
                m_width = CmsClientStringUtil.parseInt(conf[0]);
                m_width = (m_width == 0) ? I_CmsFormatRestriction.DIMENSION_NOT_SET : m_width;
            }
            if (conf[1].trim().equals("?")) {
                m_height = I_CmsFormatRestriction.DIMENSION_NOT_SET;
            } else {
                m_height = CmsClientStringUtil.parseInt(conf[1]);
                m_height = (m_height == 0) ? I_CmsFormatRestriction.DIMENSION_NOT_SET : m_height;
            }
        }
    }
408327
protected static void loadConfigSource(ConfigArgP config, String source) {
    Properties p = loadConfig(source);
    Config c = config.getConfig();
    for(String key: p.stringPropertyNames()) {
      String value = p.getProperty(key);
      ConfigurationItem ci = config.getConfigurationItem(key);      
      if(ci!=null) { // if we recognize the key, validate it
        ci.setValue(processConfigValue(value));
      }
      c.overrideConfig(key, processConfigValue(value));     
    }
  }
685264
private void parseSQLConfig(final Node node, final ConfigSettings config)
	{

		String name, value;
		Node nnode;
		NodeList list = node.getChildNodes();

		int length = list.getLength();
		for (int i = 0; i < length; i++) {
			nnode = list.item(i);

			name = nnode.getNodeName().toUpperCase();
			if (name.equals(KEY_HOST)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				config.setConfigParameter(ConfigurationKeys.SQL_HOST, value);

			}
			else if (name.equals(KEY_DATABASE)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				config.setConfigParameter(ConfigurationKeys.SQL_DATABASE, value);

			}
			else if (name.equals(KEY_USER)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				config.setConfigParameter(ConfigurationKeys.SQL_USERNAME, value);

			}
			else if (name.equals(KEY_PASSWORD)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				config.setConfigParameter(ConfigurationKeys.SQL_PASSWORD, value);
			}
		}
	}
60212
private void parseSettingsConfig(CmsResource resource, Map<CmsUUID, List<CmsXmlContentProperty>> settingConfigs) {

        List<CmsXmlContentProperty> settingConfig = new ArrayList<>();

        try {
            CmsFile settingFile = m_cms.readFile(resource);
            CmsXmlContent settingContent = CmsXmlContentFactory.unmarshal(m_cms, settingFile);
            CmsXmlContentRootLocation location = new CmsXmlContentRootLocation(settingContent, Locale.ENGLISH);
            for (I_CmsXmlContentValueLocation settingLoc : location.getSubValues(CmsFormatterBeanParser.N_SETTING)) {
                CmsXmlContentProperty setting = CmsConfigurationReader.parseProperty(
                    m_cms,
                    settingLoc).getPropertyData();
                settingConfig.add(setting);
            }
            settingConfigs.put(resource.getStructureId(), settingConfig);
        } catch (Exception e) {
            LOG.error(e.getLocalizedMessage(), e);
        }
    }
1084439
@Override
    public void setConfiguration(
                    final Properties config
                    )
    throws ValidityException
    {
        String  pattern = config.getProperty( "pattern" );
        if (pattern == null) {
            throw new ValidityException( "no 'pattern' parameter" );
        }

        try {
            _formatter = new SimpleDateFormat( pattern );
                         //throws IllegalArgumentException
        } catch (Exception ex) {
            throw new ValidityException( "invalid 'pattern' parameter: "
                            + ex.getMessage() );
        }
    }
1262238
public void setConfigFile(final String config) {
        if (config == null) {
            throw (new IllegalArgumentException(
                    "Configuration file parameter is null"));
        }
        File file = new File(config);
        if (file.exists()) {
            if (file.isDirectory()) {
                throw new IllegalArgumentException("Folder " + config
                        + " is not a configuration file");
            }
        } else {
            throw new IllegalArgumentException("Configuration file " + config
                    + " not found");
        }
        setConfigFile(file);
    }
1361150
public void setConfig(LogFileConfiguration config) {
        this.config = config == null ? null : config.readOnlyCopy();
        if (config == null) {
            Log.w(
                DOMAIN,
                "Database.log.getFile().getConfig() is now null, meaning file logging is disabled.  "
                    + "Log files required for product support are not being generated.");
        }

        updateConfig();
    }
677481
public static String normalize(final String text, final Configuration config){
        if(text != null && config.isNormalizeLabelText()){
            return text.trim().replaceAll("[\n\r]", "").replaceAll("[\t 　]+", " ");
        }
        return text;
    }
1088023
public void setConfig(Configuration config) {
		if (config == null) {
			throw new IllegalArgumentException("Parameter config must not be null.");
		}
	    this.config = config;
	    this.loadFrom(config);
	}
1353625
@Modified
    protected void modified(Map<String, Object> config) {
        if (null == config || config.isEmpty()) {
            return;
        }

        // config dictionaries are case-insensitive but case preserving per spec.
        // The default value type is String, unless a different type is indicated in metatype.

        setContextRootNotFoundMessage((String) config.get(PROP_VHOST_NOT_FOUND));

        enableWelcomePage(MetatypeUtils.parseBoolean(CONFIG_ALIAS,
                                                     PROP_ENABLE_WELCOME_PAGE,
                                                     config.get(PROP_ENABLE_WELCOME_PAGE),
                                                     true));

        setPadContextRootNotFoundMessage(MetatypeUtils.parseBoolean(CONFIG_ALIAS,
                                                                    PROP_PAD_VHOST_NOT_FOUND,
                                                                    config.get(PROP_PAD_VHOST_NOT_FOUND),
                                                                    false));

        origHeaderOrigin = MetatypeUtils.parseStringArray(CONFIG_ALIAS,
                                                          PROP_TRUSTED_PRIVATE_HEADER_ORIGIN,
                                                          config.get(PROP_TRUSTED_PRIVATE_HEADER_ORIGIN),
                                                          new String[] { "*" });

        origSensitiveHeaderOrigin = MetatypeUtils.parseStringArray(CONFIG_ALIAS,
                                                                   PROP_TRUSTED_SENSITIVE_HEADER_ORIGIN,
                                                                   config.get(PROP_TRUSTED_SENSITIVE_HEADER_ORIGIN),
                                                                   new String[] { "none" });

        parseTrustedPrivateHeaderOrigin(origHeaderOrigin, origSensitiveHeaderOrigin);
    }
927760
public void generateXml(Element parent, I_CmsConfigurationParameterHandler config) {

        if (config != null) {
            Element elem = parent.addElement(m_name);
            for (String attrName : m_attrs) {
                String value = config.getConfiguration().get(attrName);
                if (value != null) {
                    elem.addAttribute(attrName, value);
                }
            }
        }
    }
929164
private void parseOutputConfig(final Node node, final ConfigSettings config)
	{

		String name;
		Long lValue;
		Boolean bValue;
		Node nnode;
		NodeList list = node.getChildNodes();

		int length = list.getLength();
		for (int i = 0; i < length; i++) {
			nnode = list.item(i);

			name = nnode.getNodeName().toUpperCase();
			if (name.equals(KEY_OUTPUT_MODE)) {

				OutputType oValue = OutputType.parse(nnode.getChildNodes()
						.item(0).getNodeValue());
				config.setConfigParameter(ConfigurationKeys.MODE_OUTPUT, oValue);

			}
			else if (name.equals(KEY_PATH)) {

				String path = nnode.getChildNodes().item(0).getNodeValue();
				path = path.substring(1, path.length() - 1);

				config.setConfigParameter(
						ConfigurationKeys.PATH_OUTPUT_SQL_FILES, path);

			}
			else if (name.equals(KEY_OUTPUT_DATAFILE)) {
				bValue = Boolean.parseBoolean(nnode.getChildNodes().item(0)
						.getNodeValue());
				config.setConfigParameter(
						ConfigurationKeys.MODE_DATAFILE_OUTPUT, bValue);
			}
			else if (name.equals(KEY_LIMIT_SQL_FILE_SIZE)) {

				lValue = Long.parseLong(nnode.getChildNodes().item(0)
						.getNodeValue());
				config.setConfigParameter(
						ConfigurationKeys.LIMIT_SQL_FILE_SIZE, lValue);

			}
			else if (name.equals(KEY_LIMIT_SQL_ARCHIVE_SIZE)) {

				lValue = Long.parseLong(nnode.getChildNodes().item(0)
						.getNodeValue());
				config.setConfigParameter(
						ConfigurationKeys.LIMIT_SQL_ARCHIVE_SIZE, lValue);

			}
			else if (name.equals(KEY_MODE_ZIP_COMPRESSION_ENABLED)) {

				bValue = Boolean.parseBoolean(nnode.getChildNodes().item(0)
						.getNodeValue());
				config.setConfigParameter(
						ConfigurationKeys.MODE_ZIP_COMPRESSION_ENABLED, bValue);

			}
			else if (name.equals(KEY_MODE_BINARY_OUTPUT_ENABLED)) {

				bValue = Boolean.parseBoolean(nnode.getChildNodes().item(0)
						.getNodeValue());
				config.setConfigParameter(
						ConfigurationKeys.MODE_BINARY_OUTPUT_ENABLED, bValue);

			}
			else if (name.equals(SUBSECTION_SQL)) {

				parseSQLConfig(nnode, config);

			}
		}
	}
564061
public void configure(Configuration configuration){
		setConfiguration(Objects.requireNonNull(configuration));

		setValueFactory(null);

		resetInputFields();
		resetResultFields();
	}
389471
public void setConfig(Config config) {
        this.config = config;
        if(config.getResolveClass() != null){
            try {
                EntityHelper.setResolve(config.getResolveClass().newInstance());
            } catch (Exception e) {
                throw new MapperException("创建 " + config.getResolveClass().getCanonicalName()
                        + " 实例失败，请保证该类有默认的构造方法!", e);
            }
        }
        if(config.getMappers() != null && config.getMappers().size() > 0){
            for (Class mapperClass : config.getMappers()) {
                registerMapper(mapperClass);
            }
        }
    }
23181
private void parseLoggingConfig(final Node node, final ConfigSettings config)
	{

		String name;
		String value;
		Node nnode;
		NodeList list = node.getChildNodes();

		int length = list.getLength();
		for (int i = 0; i < length; i++) {
			nnode = list.item(i);

			name = nnode.getNodeName().toUpperCase();
			if (name.equals(KEY_ROOT_FOLDER)) {

				value = nnode.getChildNodes().item(0).getNodeValue();
				value = value.substring(1, value.length() - 1);

				config.setConfigParameter(
						ConfigurationKeys.LOGGING_PATH_DIFFTOOL, value);

			}
			else if (name.equals(SUBSUBSECTION_DIFF_TOOL)) {

				parseLoggerConfig(nnode, config, null,
						ConfigurationKeys.LOGGING_LOGLEVEL_DIFFTOOL);

			}
		}
	}
96337
public void config(String msg) {
        if (Level.CONFIG.intValue() < levelValue) {
            return;
        }
        log(Level.CONFIG, msg);
    }
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);
        }
    }