Creates the configuration hierarchy for the provided configuration.

@param aConfig
@return configuration hierarchy
6812
@Nonnull
  private static CalendarHierarchy _createConfigurationHierarchy (@Nonnull final Configuration aConfig,
                                                                  @Nullable final CalendarHierarchy aParent)
  {
    final ECountry eCountry = ECountry.getFromIDOrNull (aConfig.getHierarchy ());
    final CalendarHierarchy aHierarchy = new CalendarHierarchy (aParent, aConfig.getHierarchy (), eCountry);
    for (final Configuration aSubConfig : aConfig.getSubConfigurations ())
    {
      final CalendarHierarchy aSubHierarchy = _createConfigurationHierarchy (aSubConfig, aHierarchy);
      aHierarchy.addChild (aSubHierarchy);
    }
    return aHierarchy;
  }
98499
public static Config newConfig(String confName) {
        Config c = new Config();
        c.parse(confName);
        return c;
    }
260830
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public ArtifactoryConfiguration newConfiguration(@RequestBody ArtifactoryConfiguration configuration) {
        return configurationService.newConfiguration(configuration);
    }
1153011
protected RepositoryConfig createRepositoryConfiguration() throws ConfigurationException, IOException {

        final File jcrHome = getOuterRule().getRoot();
        final URL cfgUrl = this.getConfigUrl();
        assertNotNull("No Repository Configuration found", cfgUrl);

        return RepositoryConfig.create(cfgUrl.openStream(), jcrHome.getAbsolutePath());
    }
166410
static Settings create(final ConfigItemSet viewSettings, final ConfigItemMapEntrySet firstView,
                                 final ConfigItemSet configurationSettings) {
        final List<ConfigBlock> rootBlocks = new ArrayList<ConfigBlock>();
        final ConfigItemMapIndexed views = new ConfigItemMapIndexed("Views");
        final Map<String, ConfigItemMapEntrySet> viewById = new HashMap<String, ConfigItemMapEntrySet>();
        final ConfigItemMapNamed tablesMap = new ConfigItemMapNamed("Tables");

        return new Settings(rootBlocks, viewSettings, views, viewById, firstView, tablesMap, configurationSettings);
    }
1327129
public static LayersConfig getLayersConfig(final File repoRoot) throws IOException {
        final File layersList = new File(repoRoot, LAYERS_CONF);
        if (!layersList.exists()) {
            return new LayersConfig();
        }
        final Properties properties = PatchUtils.loadProperties(layersList);
        return new LayersConfig(properties);
    }
1286355
public static DynamicConfigGenerator createDynamicConfigGenerator(Config config) {
    String dynamicConfigGeneratorClassName =
        ConfigUtils.getString(config, ConfigurationKeys.DYNAMIC_CONFIG_GENERATOR_CLASS_KEY,
            ConfigurationKeys.DEFAULT_DYNAMIC_CONFIG_GENERATOR_CLASS_KEY);

    try {
      ClassAliasResolver<DynamicConfigGenerator> aliasResolver =
          new ClassAliasResolver<>(DynamicConfigGenerator.class);
      return aliasResolver.resolveClass(dynamicConfigGeneratorClassName).newInstance();
    } catch (ReflectiveOperationException e) {
      throw new RuntimeException("Could not construct DynamicConfigGenerator " +
          dynamicConfigGeneratorClassName, e);
    }
  }
935154
def make_config(self, instance_relative: bool = False) -> Config:
        """"""
        config = self.config_class(
            self.instance_path if instance_relative else self.root_path,
            DEFAULT_CONFIG,
        )
        config['ENV'] = get_env()
        config['DEBUG'] = get_debug_flag()
        return config
954010
public static HierarchicalConfiguration getHierarchicalConfiguration(final Configuration configuration) {
        if (configuration instanceof CompositeConfiguration) {
            final CompositeConfiguration compositeConfig = (CompositeConfiguration) configuration;
            for (int i = 0; i < compositeConfig.getNumberOfConfigurations(); i++) {
                if (compositeConfig.getConfiguration(i) instanceof HierarchicalConfiguration) {
                    return (HierarchicalConfiguration) compositeConfig.getConfiguration(i);
                }
            }
        }
        // maybe I need to send a runtime exception ??
        // throw new
        // ConfigurationRuntimeException("no hierarchical configuration was defined");
        return null;
    }
96026
public OperationFuture<LoadBalancer> create(LoadBalancerConfig config) {
        String dataCenterId = dataCenterService.findByRef(config.getDataCenter()).getId();

        LoadBalancerMetadata loadBalancer = loadBalancerClient.create(
            dataCenterId,
            new LoadBalancerRequest()
                .name(config.getName())
                .description(config.getDescription())
                .status(config.getStatus())
        );

        LoadBalancer loadBalancerRef = LoadBalancer.refById(loadBalancer.getId(), DataCenter.refById(dataCenterId));

        return new OperationFuture<>(
            loadBalancerRef,
            new SequentialJobsFuture(
                () -> new CreateLoadBalancerJobFuture(this, loadBalancerRef),
                () -> addLoadBalancerPools(config, loadBalancerRef)
            )
        );
    }
224877
public Configuration getConfiguration() {
		final Configuration conf = new Configuration();
		for (Map.Entry<String, String> entry : data.entrySet()) {
			conf.setString(entry.getKey(), entry.getValue());
		}
		return conf;
	}
1301574
def create_hierarchy(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.create_bin
        return Hierarchy(
            self._provider_manager,
            self._get_provider_session('hierarchy_admin_session').create_hierarchy(*args, **kwargs),
            self._runtime,
            self._proxy)
1030127
public static Builder from(XmlMultiConfiguration config) {
    return new Builder() {
      @Override
      public Builder withManager(String identity, Configuration configuration) {
        Map<String, Config> configurations = new HashMap<>(config.configurations);
        configurations.put(identity, new SingleConfig(configuration));
        return from(new XmlMultiConfiguration(configurations));
      }

      @Override
      public Builder withoutManager(String identity) {
        Map<String, Config> configurations = config.configurations;
        configurations.remove(identity);
        return from(new XmlMultiConfiguration(configurations));
      }

      @Override
      public Variant withManager(String identity) {
        Map<String, Configuration> variants = new HashMap<>();

        Config current = config.configurations.get(identity);
        if (current instanceof VariantConfig) {
          variants.putAll(((VariantConfig) current).configs);
        } else if (current != null) {
          throw new IllegalStateException("Existing non-variant configuration cannot be replaced - it must be removed first.");
        }

        return new Variant() {
          @Override
          public Variant withoutVariant(String variant) {
            variants.remove(variant);
            return this;
          }

          @Override
          public Variant variant(String variant, Configuration configuration) {
            variants.put(variant, configuration);
            return this;
          }

          @Override
          public Builder withoutManager(String identity) {
            return from(build()).withoutManager(identity);
          }

          @Override
          public Builder withManager(String identity, Configuration configuration) {
            return from(build()).withManager(identity, configuration);
          }

          @Override
          public Variant withManager(String identity) {
            return from(build()).withManager(identity);
          }

          @Override
          public XmlMultiConfiguration build() {
            Map<String, Config> configurations = new HashMap<>(config.configurations);
            configurations.put(identity, new VariantConfig(variants));
            return new XmlMultiConfiguration(configurations);
          }
        };
      }

      @Override
      public XmlMultiConfiguration build() {
        return config;
      }
    };
  }
1247322
def configure(aConfig,aCmdOptions = nil,aOptions = nil)
      config_to_read = {}
			if aConfig.is_a?(String)
				aConfig = MiscUtils.canonize_path(aConfig)
				logger.info "Job file: #{aConfig}"
				op = {:basepath => File.dirname(aConfig)}
				xmlString = MiscUtils.string_from_file(aConfig)
				xmlString = XmlUtils2.clean_data(xmlString)
				xml = XmlUtils.get_xml_root(xmlString)
				return configure(xml,aCmdOptions,op)
			end

			if @config
				config_as_hash = nil
				case aConfig
					when nil then ;	# do nothing
					when Hash,::ConfigClass then config_as_hash = aConfig
					when REXML::Element then
						config_as_hash = XmlUtils.read_simple_items(aConfig,'/Yore/SimpleItems')
						config.xmlRoot = aConfig 	# overwriting previous! perhaps should merge
					else
						raise StandardError.new('unsupported type')
				end
				config_as_hash.each{|n,v| config_to_read[n.to_sym] = v} if config_as_hash					# merge given new values
			else
				@config = ConfigXmlClass.new(DEFAULT_CONFIG,aConfig)
			end		
      aCmdOptions.each{|k,v| config_to_read[k.to_sym] = v} if aCmdOptions		# merge command options
      config_to_read.merge!(aOptions) if aOptions														# merge options
			config.read(config_to_read)
			config[:basepath] = MiscUtils.canonize_path(config[:basepath],Dir.pwd)

			expand_app_option()
    end
146325
public OperationFuture<Group> create(GroupConfig groupConfig) {
        checkNotNull(groupConfig, "GroupConfig must be not null");
        checkNotNull(groupConfig.getName(), "Name of GroupConfig must be not null");
        checkNotNull(groupConfig.getParentGroup(), "ParentGroup of GroupConfig must be not null");

        GroupMetadata group = client.createGroup(
                converter.createGroupRequest(groupConfig, idByRef(groupConfig.getParentGroup()),
                    groupConfig.getCustomFields() == null || groupConfig.getCustomFields().size() == 0 ?
                        null : client.getCustomFields()
                ));

        return new OperationFuture<>(
            Group.refById(group.getId()),
            new NoWaitingJobFuture()
        );
    }
1157923
protected function createCommonHierarchy($collectionName, IMetadata $metadata, array $config)
    {
        if (!isset($config['class'])) {
            $config['class'] = $this->defaultCommonHierarchyClass;
        }

        return $this->getPrototype(
            $config['class'],
            ['umi\orm\collection\ICommonHierarchy']
        )
        ->createInstance([$collectionName, $metadata, $this->selectorFactory]);
    }
919309
private void createSubgroups(GroupHierarchyConfig config, String groupId) {
        config.getSubitems().forEach(cfg -> {
            if (cfg instanceof GroupHierarchyConfig) {
                GroupMetadata curGroup = findGroup((GroupHierarchyConfig) cfg, groupId);
                String subGroupId;
                if (curGroup != null) {
                    subGroupId = curGroup.getId();
                } else {
                    subGroupId = create(converter.createGroupConfig((GroupHierarchyConfig) cfg, groupId))
                        .getResult()
                        .as(GroupByIdRef.class)
                        .getId();
                }
                createSubgroups((GroupHierarchyConfig) cfg, subGroupId);
            } else if (cfg instanceof CreateServerConfig) {
                ((CreateServerConfig) cfg).group(Group.refById(groupId));
            } else {
                ((CompositeServerConfig) cfg).getServer().group(Group.refById(groupId));
            }
        });
    }