Help function to parse the configuration.<p>
@param configuration the value to be parsed.
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);
        }
    }
145781
private void parseProperty(I_CmsXmlContentLocation field) {

        CmsPropertyConfig propConfig = parseProperty(m_cms, field);
        m_propertyConfigs.add(propConfig);
    }
626028
public String resolve( Map<String, String> configuration )
    {
        StringBuilder buffer = new StringBuilder();
        append( buffer, configuration, null );
        return buffer.toString();
    }
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);
        }
    }
162623
private void parseExternalsConfig(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_SEVENZIP)) {

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

				config.setConfigParameter(ConfigurationKeys.PATH_PROGRAM_7ZIP,
						value);

			}
		}
	}
669668
private void backupXmlConfiguration(I_CmsXmlConfiguration configuration) {

        String fromName = m_baseFolder.getAbsolutePath() + File.separatorChar + configuration.getXmlFileName();
        String toDatePrefix = BACKUP_DATE_FORMAT.format(new Date());
        String toName = m_backupFolder.getAbsolutePath()
            + File.separatorChar
            + toDatePrefix
            + configuration.getXmlFileName();

        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_CREATE_CONFIG_BKP_2, fromName, toName));
        }

        try {
            CmsFileUtil.copy(fromName, toName);
        } catch (IOException e) {
            LOG.error(Messages.get().getBundle().key(Messages.LOG_CREATE_CONFIG_BKP_FAILURE_1, toName), e);
        }
    }
394847
public void setConfig(CompilerConfiguration config) {
        if (config == null) throw new NullPointerException("configuration cannot be null");
        this.config = config;
        this.groovyLoader = initGroovyLoader();
    }
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);

			}
		}
	}
549826
public CmsContainerConfiguration getConfiguration(String name) {

        Map<String, CmsContainerConfiguration> configurationsForLocale = null;
        if (m_configurations.containsKey(CmsLocaleManager.MASTER_LOCALE)) {
            configurationsForLocale = m_configurations.get(CmsLocaleManager.MASTER_LOCALE);
        } else if (!m_configurations.isEmpty()) {
            configurationsForLocale = m_configurations.values().iterator().next();
        } else {
            return null;
        }
        return configurationsForLocale.get(name);
    }
270293
public static void parseAndSetOptions(
      Configuration conf, String optionKey) {
    String optionValue = conf.get(optionKey);
    if (optionValue != null) {
      RaidNode.LOG.info("Parsing option " + optionKey);
      // Parse the option value to get key:value pairs.
      String[] keyValues = optionValue.trim().split(",");
      for (String keyValue: keyValues) {
        String[] fields = keyValue.trim().split(":");
        String key = fields[0].trim();
        String value = fields[1].trim();
        conf.set(key, value);
      }
    } else {
      RaidNode.LOG.error("Option " + optionKey + " not found");
    }
  }
1179435
private void parseDebugOutputConfig(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_DEBUG_PATH)) {

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

				config.setConfigParameter(ConfigurationKeys.LOGGING_PATH_DEBUG,
						value);

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

				Boolean enabled = Boolean.parseBoolean(nnode.getChildNodes()
						.item(0).getNodeValue());
				config.setConfigParameter(ConfigurationKeys.MODE_DEBUG_OUTPUT,
						enabled);
			}
		}
	}
680686
public void setConfiguredProperties(BeanConfiguration configuration) {
        boolean changed = false;
        final Set<ConfiguredPropertyDescriptor> properties = getDescriptor().getConfiguredProperties();
        for (ConfiguredPropertyDescriptor property : properties) {
            final Object value = configuration.getProperty(property);
            final boolean changedValue = setConfiguredPropertyIfChanged(property, value);
            if (changedValue) {
                changed = true;
            }
        }
        if (changed) {
            onConfigurationChanged();
        }
    }
1365500
public void validateConfiguration(String configuration) {

        try {
            JSONObject json = new JSONObject(configuration);
            String className = json.optString(CmsDataViewConstants.CONFIG_VIEW_CLASS);

            Class<?> cls = Class.forName(className, false, getClass().getClassLoader());
            if (!I_CmsDataView.class.isAssignableFrom(cls)) {
                throw new IllegalArgumentException(
                    "Class " + cls.getName() + " does not implement " + I_CmsDataView.class.getName());
            }
        } catch (Exception e) {
            throw new CmsWidgetConfigurationException(e);
        }

    }
267630
public void setConfigurations(Collection<? extends Configuration> configurations) {
		Assert.notNull(configurations, "Configurations must not be null");
		this.configurations = new ArrayList<>(configurations);
	}
845023
public boolean isTrue(Configuration configuration) {
        for (Clause clause : this.clauses) {
            if (!clause.isTrue(configuration)) return false;
        }

        return true;
    }
1042381
public static CmsGalleryConfigurationJSO parseConfiguration(String conf) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(conf)) {
            conf = "{}";
        }
        return (CmsGalleryConfigurationJSO)CmsDomUtil.parseJSON(conf);
    }
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;
            }
        }
    }