Creates a deep copy of a property configuration map.<p>

@param propConfig the property configuration which should be copied

@return a copy of the property configuration
331255
public static Map<String, CmsXmlContentProperty> copyPropertyConfiguration(
        Map<String, CmsXmlContentProperty> propConfig) {

        Map<String, CmsXmlContentProperty> result = new LinkedHashMap<String, CmsXmlContentProperty>();
        for (Map.Entry<String, CmsXmlContentProperty> entry : propConfig.entrySet()) {
            String key = entry.getKey();
            CmsXmlContentProperty propDef = entry.getValue();
            result.put(key, propDef.copy());
        }
        return result;
    }
231678
@Override
    public List<BeanPropertyWriter> changeProperties(SerializationConfig config,
                                                     BeanDescription beanDesc,
                                                     List<BeanPropertyWriter> beanProperties)
    {
        final List<BeanPropertyWriter> keptProperties = new ArrayList<>();
        for (BeanPropertyWriter w : beanProperties)
        {
            if (keepProperty(w))
            {
                keptProperties.add(w);
            }
        }

        return keptProperties;
    }
1085176
public Map<String, CmsXmlContentProperty> getPropertyConfigurationAsMap() {

        Map<String, CmsXmlContentProperty> result = new LinkedHashMap<String, CmsXmlContentProperty>();
        for (CmsPropertyConfig propConf : getPropertyConfiguration()) {
            result.put(propConf.getName(), propConf.getPropertyData());
        }
        return result;
    }
1352107
@SuppressWarnings("unchecked")
  public static <T extends ComponentConfig<T>> T createComponent(JsonObject config) {
    return (T) serializer.deserializeObject(config, ComponentConfig.class);
  }
1323174
public void setConfig(Config config) {
        if (mapperHelper == null) {
            mapperHelper = new MapperHelper();
        }
        mapperHelper.setConfig(config);
    }
171169
Configuration copy(Configuration configuration) {
    Configuration copy = new Configuration();
    copy.restoreState(configuration);
    return copy;
  }
1075882
public static Configuration copyConfiguration(final Configuration original) {
		Configuration copy = new MapConfiguration(new HashMap<String, Object>());

		for (Iterator<?> i = original.getKeys(); i.hasNext();) {
			String key = (String) i.next();
			Object value = original.getProperty(key);

			if (value instanceof List) {
				value = new ArrayList((List) value);
			}

			copy.setProperty(key, value);
		}

		return copy;
	}
104925
public static Object mergeObject(Object config, Class clazz) {
        merge(config);
        return convertMapToObj((Map<String, Object>) config, clazz);
    }
260432
static Map<String, JDBConnection> connectionMapFromConfig(Config config) throws InitializationException {

      final Config globalPropertyConfig;
      if(config.hasPath("acp.property")) {
         globalPropertyConfig = config.getObject("acp.property").toConfig();
      } else if(config.hasPath("property")) {
         globalPropertyConfig = config.getObject("property").toConfig();
      } else {
         globalPropertyConfig = null;
      }


      final Config connectionsConfig;
      if(config.hasPath("acp.connection")) {
         connectionsConfig = config.getObject("acp.connection").toConfig();
      } else if(config.hasPath("connection")) {
         connectionsConfig = config.getObject("connection").toConfig();
      } else {
         return Collections.emptyMap();
      }

      Map<String, JDBConnection> connectionMap = Maps.newLinkedHashMap();

      for(String connectionName : uniquePrefixSet(connectionsConfig)) {
         Config connectionConfig = connectionsConfig.getObject(connectionName).toConfig();
         connectionMap.put(connectionName, createConnection(connectionName, connectionConfig, globalPropertyConfig));
      }

      return connectionMap;
   }
400525
public static IDataSource create(JsonObject config) throws DataSourceCreationException {
        String title = config.getAsJsonPrimitive("title").getAsString();
        String description = config.getAsJsonPrimitive("description").getAsString();
        String typeName = config.getAsJsonPrimitive("type").getAsString();
        
        JsonObject settings = config.getAsJsonObject("settings");

        final IDataSourceType type = DataSourceTypesRegistry.getType(typeName);
        if ( type == null )
            throw new UnknownDataSourceTypeException(typeName);

        return type.createDataSource( title, description, settings );
    }
363248
public function createFromArray($config)
    {
        foreach ($config as $property => $value) {
            $this->{$property} = $value;
        }

        return $this;
    }
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);
    }
1071802
public Configuration withProperties(java.util.Map<String, String> properties) {
        setProperties(properties);
        return this;
    }
52073
public ConfigPropertyType<AdminobjectType<T>> getOrCreateConfigProperty()
   {
      List<Node> nodeList = childNode.get("config-property");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new ConfigPropertyTypeImpl<AdminobjectType<T>>(this, "config-property", childNode, nodeList.get(0));
      }
      return createConfigProperty();
   }
367503
private Map<PropertyKey, Map<Optional<String>, List<String>>> generateConfMap() {
    Map<PropertyKey, Map<Optional<String>, List<String>>> confMap = new HashMap<>();
    fillConfMap(confMap, mMasterStore.getConfMap());
    fillConfMap(confMap, mWorkerStore.getConfMap());
    return confMap;
  }
32150
@Nonnull
	public static Configuration createConfiguration(Properties properties) {
		final Configuration configuration = new Configuration();

		final Set<String> propertyNames = properties.stringPropertyNames();

		for (String propertyName : propertyNames) {
			configuration.setString(propertyName, properties.getProperty(propertyName));
		}

		return configuration;
	}
919337
public static TopologyAPI.Config.Builder getConfigBuilder(Config config) {
    TopologyAPI.Config.Builder cBldr = TopologyAPI.Config.newBuilder();
    Set<String> apiVars = config.getApiVars();
    for (String key : config.keySet()) {
      if (key == null) {
        LOG.warning("ignore: null config key found");
        continue;
      }
      Object value = config.get(key);
      if (value == null) {
        LOG.warning("ignore: config key " + key + " has null value");
        continue;
      }
      TopologyAPI.Config.KeyValue.Builder b = TopologyAPI.Config.KeyValue.newBuilder();
      b.setKey(key);
      if (apiVars.contains(key)) {
        b.setType(TopologyAPI.ConfigValueType.STRING_VALUE);
        b.setValue(value.toString());
      } else {
        b.setType(TopologyAPI.ConfigValueType.JAVA_SERIALIZED_VALUE);
        b.setSerializedValue(ByteString.copyFrom(serialize(value)));
      }
      cBldr.addKvs(b);
    }

    return cBldr;
  }