Import all circuits from configuration.

@param circuitsConfig The circuits configuration (must not be <code>null</code>).
@return The circuits imported.
@throws LionEngineException If unable to read data.
433751
public static Map<Circuit, Collection<TileRef>> imports(Media circuitsConfig)
    {
        Check.notNull(circuitsConfig);

        final Xml root = new Xml(circuitsConfig);
        final Collection<Xml> nodesCircuit = root.getChildren(NODE_CIRCUIT);
        final Map<Circuit, Collection<TileRef>> circuits = new HashMap<>(nodesCircuit.size());

        for (final Xml nodeCircuit : nodesCircuit)
        {
            final String groupIn = nodeCircuit.readString(ATT_GROUP_IN);
            final String groupOut = nodeCircuit.readString(ATT_GROUP_OUT);
            final String circuitType = nodeCircuit.readString(ATT_CIRCUIT_TYPE);
            final CircuitType type = CircuitType.from(circuitType);
            final Circuit circuit = new Circuit(type, groupIn, groupOut);

            final Collection<Xml> nodesTileRef = nodeCircuit.getChildren(TileConfig.NODE_TILE);
            final Collection<TileRef> tilesRef = importTiles(nodesTileRef);

            circuits.put(circuit, tilesRef);
        }

        return circuits;
    }
1364925
@PublicAPI(usage = ACCESS)
    public JavaClasses importPaths(String... paths) {
        Set<Path> pathSet = new HashSet<>();
        for (String path : paths) {
            pathSet.add(Paths.get(path));
        }
        return importPaths(pathSet);
    }
1096311
public static FeaturableConfig imports(Configurer configurer)
    {
        Check.notNull(configurer);

        return imports(configurer.getRoot());
    }
647907
public static synchronized SecurityConnector getConnector( FFMQEngineSetup setup ) throws JMSException
    {
        if (connector == null)
        {
            String connectorType = setup.getSecurityConnectorType();
            try
            {
                Class<?> connectorClass = Class.forName(connectorType);
                connector = (SecurityConnector)connectorClass
                    .getConstructor(new Class[] { Settings.class })
                    .newInstance(new Object[] { setup.getSettings() });
            }
            catch (ClassNotFoundException e)
            {
                throw new FFMQException("Security connector class not found : "+connectorType,"SECURITY_ERROR",e);
            }
            catch (ClassCastException e)
            {
                throw new FFMQException("Invalid security connector class : "+connectorType,"SECURITY_ERROR",e);
            }
            catch (InstantiationException e)
            {
                throw new FFMQException("Cannot create security connector","SECURITY_ERROR",e.getCause());
            }
            catch (InvocationTargetException e)
            {
                throw new FFMQException("Cannot create security connector","SECURITY_ERROR",e.getTargetException());
            }
            catch (Exception e)
            {
                throw new FFMQException("Cannot create security connector","SECURITY_ERROR",e);
            }
        }
        return connector;
    }
912538
private void loadEngines(final JBakeConfiguration config, final ContentStore db) {
        try {
            ClassLoader cl = TemplateEngines.class.getClassLoader();
            Enumeration<URL> resources = cl.getResources("META-INF/org.jbake.parser.TemplateEngines.properties");
            while (resources.hasMoreElements()) {
                URL url = resources.nextElement();
                Properties props = new Properties();
                props.load(url.openStream());
                for (Map.Entry<Object, Object> entry : props.entrySet()) {
                    String className = (String) entry.getKey();
                    String[] extensions = ((String) entry.getValue()).split(",");
                    registerEngine(config, db, className, extensions);
                }
            }
        } catch (IOException e) {
            LOGGER.error("Error loading engines", e);
        }
    }
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);
    }
  }
65212
public static SizeConfig imports(Configurer configurer)
    {
        Check.notNull(configurer);

        return imports(configurer.getRoot());
    }
408075
def create_circuit_type(name):
    '''
    
    '''
    nb_circuit_type = get_('circuits', 'circuit-types', slug=slugify(name))
    if nb_circuit_type:
        return False
    else:
        payload = {
            'name': name,
            'slug': slugify(name)
        }
        circuit_type = _add('circuits', 'circuit-types', payload)
        if circuit_type:
            return {'circuits': {'circuit-types': {circuit_type['id']: payload}}}
        else:
            return circuit_type
354599
function ()
		{
			this.e.log&&this.e.log('Importing from config...','system');
			var importConfig = this.getConfig('import');
			var cb = this.getComponent('classBuilder');
			var validScript = /[\w|\W]+\.[js|coffee]+$/;

			for (i in importConfig)
			{
				var path = this.modulePath+importConfig[i];
				if (fs.existsSync(path))
				{
					this.e.log&&this.e.log('Importing '+path+'...','system');
					var classes = fs.readdirSync(path);
					for (c in classes)
					{

						if (!validScript.test(classes[c]))
							continue;

						var className = classes[c].split('.')[0];
						cb.addSource(className,path+classes[c]);
						cb.classes[c]=cb.buildClass(className);
					}
				}
			}
		}
10312
static JmxConfig from(Config config) {
    try {
      ObjectName query = new ObjectName(config.getString("query"));
      List<JmxMeasurementConfig> ms = new ArrayList<>();
      for (Config cfg : config.getConfigList("measurements")) {
        ms.add(JmxMeasurementConfig.from(cfg));
      }
      return new JmxConfig(query, ms);
    } catch (Exception e) {
      throw new IllegalArgumentException("invalid mapping config", e);
    }
  }
1209540
public static Force imports(Configurer configurer)
    {
        Check.notNull(configurer);

        return imports(configurer.getRoot());
    }
1307216
public static SurfaceConfig imports(Configurer configurer)
    {
        Check.notNull(configurer);

        return imports(configurer.getRoot());
    }
1068107
private synchronized void create(CatalogContext catalogContext) {
        try {
            Map<String, ImportConfiguration> newProcessorConfig = loadNewConfigAndBundles(catalogContext);
            restartImporters(newProcessorConfig);
        } catch (final Exception e) {
            VoltDB.crashLocalVoltDB("Error creating import processor", true, e);
        }
    }
305649
public static void addImport( Instance instance, String componentOrFacetName, Import imp ) {

		Collection<Import> imports = instance.getImports().get( componentOrFacetName );
		if(imports == null) {
			imports = new LinkedHashSet<Import> ();
			instance.getImports().put( componentOrFacetName, imports );
		}

		if( ! imports.contains( imp ))
			imports.add( imp );
	}
360403
public CircuitBreakerRegistry createCircuitBreakerRegistry(CircuitBreakerConfigurationProperties circuitBreakerProperties) {
		Map<String, CircuitBreakerConfig> configs = circuitBreakerProperties.getConfigs()
				.entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey,
						entry -> circuitBreakerProperties.createCircuitBreakerConfig(entry.getValue())));

		return CircuitBreakerRegistry.of(configs);
	}
1259548
public java.util.List<String> getImports() {
        if (imports == null) {
            imports = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return imports;
    }
114147
protected String loadOnlyConfig(final Class<T> cl) {
    try {
      /* Load up the config */

      ConfigurationStore cs = getStore();

      List<String> configNames = cs.getConfigs();

      if (configNames.isEmpty()) {
        error("No configuration on path " + cs.getLocation());
        return "No configuration on path " + cs.getLocation();
      }

      if (configNames.size() != 1) {
        error("1 and only 1 configuration allowed");
        return "1 and only 1 configuration allowed";
      }

      String configName = configNames.iterator().next();

      cfg = getConfigInfo(cs, configName, cl);

      if (cfg == null) {
        error("Unable to read configuration");
        return "Unable to read configuration";
      }

      setConfigName(configName);

      return null;
    } catch (Throwable t) {
      error("Failed to load configuration: " + t.getLocalizedMessage());
      error(t);
      return "failed";
    }
  }