Configures component by passing configuration parameters.

@param config configuration parameters to be set.
@throws ConfigException when component is in illegal state or configuration
validation fails.
550089
public void configure(ConfigParams config) throws ConfigException {
		_timeout = config.getAsLongWithDefault("timeout", _timeout);
		_maxSize = config.getAsLongWithDefault("max_size", _maxSize);
	}
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;
            }
        }
    }
547607
private void configure(Object obj, XmlParser.Node cfg, int i) throws ClassNotFoundException,
            NoSuchMethodException, InvocationTargetException, IllegalAccessException
    {
        XmlParser.Node node = null;
        try
        {
            for (; i < cfg.size(); i++)
            {
                Object o = cfg.get(i);
                if (o instanceof String) continue;
                node = (XmlParser.Node) o;

                String tag = node.getTag();
                if ("Set".equals(tag))
                    set(obj, node);
                else if ("Put".equals(tag))
                    put(obj, node);
                else if ("Call".equals(tag))
                    call(obj, node);
                else if ("Get".equals(tag))
                    get(obj, node);
                else if ("New".equals(tag))
                    newObj(obj, node);
                else if ("Ref".equals(tag))
                    refObj(obj, node);
                else
                    throw new IllegalStateException("Unknown tag: " + tag);
            }
        }
        catch(InvocationTargetException e)
        {
            log.warn("Exception at "+node.toString(),e.getTargetException());
            throw e;
        }
        catch (Error e)
        {
            log.debug(node);
            throw e;
        }
        catch (Exception e)
        {
            log.debug(node);
            if (e instanceof NoSuchMethodException) throw (NoSuchMethodException) e;
            if (e instanceof InvocationTargetException) throw (InvocationTargetException) e;
            if (e instanceof IllegalAccessException) throw (IllegalAccessException) e;
            if (e instanceof RuntimeException) throw (RuntimeException) e;
        }
    }
1001720
public function configure( Config $config )
    {
        parent::configure($config);

        $this->_field_order    = $this->processMacro($config->getList('field_order', []));
        $this->_delimiter      = $this->processMacro($config->getInteger('delimiter', 0));
        $this->_double_quoted  = $this->processMacro($config->getBoolean('double_quoted', false));
        $this->_eol_code       = $this->processMacro($config->getInteger('eol_code', 0));
    }
921684
public static function setConfig($config)
	{
		//set the error file path
		self::$errorFilePath = dirname(dirname(__FILE__)) . '/Exceptions/';

		//set the config array
		self::$config = $config; 

	}
503508
protected function registerErrorHandler(&$config)
    {
        if (Zilf_ENABLE_ERROR_HANDLER) {
            if (!isset($config['components']['errorHandler']['class'])) {
                echo "Error: no errorHandler component is configured.\n";
                exit(1);
            }
            $this->set('errorHandler', $config['components']['errorHandler']);
            unset($config['components']['errorHandler']);
            $this->getErrorHandler()->register();
        }
    }
286353
public function setConfiguration($config) {
		if(!($config instanceof Config))
			$config = new Config($config);
		$this->config = $config;
	}
1211558
private function validateBooleans($config): void
    {
        // Check boolean parameters
        if (! Validator::key('overwrite', Validator::boolType())->validate($config)) {
            throw new InvalidConfigException('"overwrite" parameter must be set as a boolean.');
        }
        if (! Validator::key('backup', Validator::boolType())->validate($config)) {
            throw new InvalidConfigException('"backup" parameter must be set as a boolean.');
        }
        if (! Validator::key('ignore', Validator::boolType())->validate($config)) {
            throw new InvalidConfigException('"ignore" parameter must be set as a boolean.');
        }
    }
675255
@Override
	public void configure(ConfigParams config) throws ConfigException {
		ConfigParams dependencies = config.getSection("dependencies");
		for (String name : dependencies.keySet()) {
			String locator = dependencies.get(name);
			if (locator == null)
				continue;

			try {
				Descriptor descriptor = Descriptor.fromString(locator);
				if (descriptor != null)
					_dependencies.put(name, descriptor);
				else
					_dependencies.put(name, locator);
			} catch (Exception ex) {
				_dependencies.put(name, locator);
			}
		}
	}
148958
final
  public void configureImpl(Object bean) // , ConfigType<?> type)
    throws ConfigException
  {
    Objects.requireNonNull(bean);
    //Objects.requireNonNull(type);
    
    try {
      //type.beforeConfigure(bean);
      
      // ioc/23e7
      InjectContext env = InjectContextImpl.CONTEXT;
      injectTop(bean, env);
    
      //type.init(bean);
    } finally {
      //type.afterConfigure(bean);
    }
  }
237295
public function configure($config)
    {
        foreach ((array)$config as $key => $value) {
            $this->setConfig($key, $value);
        }
    }
1142183
public final void configure(Object bean)
  {
    Objects.requireNonNull(bean);
    
    Thread thread = Thread.currentThread();
    ClassLoader loader = thread.getContextClassLoader();
    
    /*
    ContextConfig oldContext = ContextConfig.getCurrent();
    
    try {
      ContextConfig.setCurrent(new ContextConfig(new Config()));
      
      ConfigType<?> type = TypeFactoryConfig.getType(bean);

      configure(bean, type);
    } finally {
      ContextConfig.setCurrent(oldContext);
    }
    */
  }
8663
private void parseConfiguration(String config) {

        CmsSelectConfigurationParser parser = new CmsSelectConfigurationParser(config);
        m_comboBox = new CmsSelectComboBox(parser.getOptions(), false);
        if (parser.getDefaultValue() != null) {
            //set the declared value selected.
            m_comboBox.setFormValueAsString(parser.getDefaultValue());
        }
        fireChangeEvent();
    }
575026
public function setConfig(ConfigInterface $config)
    {
        // get keys & flip
        $configKeys = array_flip($config->keys());
        // put default config
        foreach ($this->defaultConfiguration as $key => $value) {
            if (!isset($configKeys[$key])) {
                $config->set($key, $value);
            }
        }

        $this->config = $config;
    }
157927
public void configure(ConfigParams config) {
		ConfigParams parameters = config.getSection("parameters");
		if (parameters.size() > 0) {
			_parameters = parameters;
		}
	}
879665
@Override
	public void configure(ConfigParams config) {
		_name = config.getAsStringWithDefault("name", _name);
		_name = config.getAsStringWithDefault("info.name", _name);

		_description = config.getAsStringWithDefault("description", _description);
		_description = config.getAsStringWithDefault("info.description", _description);

		_properties = config.getSection("properties");

	}
450928
@Override
    public void setConstraintMappings(Configuration<?> config) throws IOException {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "setConstraintMappings", config);
        }
        InputStream inputStream = null;
        ClassLoader ccl = getContextClassLoader();

        for (String fileName : getConstraintMapping()) {
            // get an inputstream to the file
            inputStream = ccl.getResource(fileName).openStream();

            // if debugging then dump out the input stream to make sure it is valid
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                inputStream = dumpInputStream(inputStream);
                if (inputStream == null) {
                    // we ran into trouble while dumping the stream... try again
                    inputStream = ccl.getResource(fileName).openStream();
                }
            }
            config.addMapping(inputStream);
            // add to list so we can close the inputStreams  later.
            mapFileInputStreams.add(inputStream);
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "setConstraintMappings");
        }
    }