Check read params and initialize.

@throws RepositoryConfigurationException
772598
private void checkParams()
   {
      if (adminIdentity == null)
      {
         throw new IllegalArgumentException("Admin identity is not configured");
      }

      StringTokenizer listTokenizer = new StringTokenizer(adminIdentity, AccessControlList.DELIMITER);

      if (listTokenizer.countTokens() < 1)
      {
         throw new IllegalArgumentException("AccessControlList " + adminIdentity + " is empty or have a bad format");
      }

      adminIdentitys = new ArrayList<String>(listTokenizer.countTokens());

      while (listTokenizer.hasMoreTokens())
      {
         adminIdentitys.add(listTokenizer.nextToken());
      }
      if (defaultIdentity == null)
      {
         defaultIdentity = IdentityConstants.ANY;
      }

   }
1034323
@SuppressWarnings("unchecked")
	private void initInputReaders() throws Exception {
		int numGates = 0;
		//  ---------------- create the input readers ---------------------
		// in case where a logical input unions multiple physical inputs, create a union reader
		final int groupSize = this.config.getGroupSize(0);
		numGates += groupSize;
		if (groupSize == 1) {
			// non-union case
			inputReader = new MutableRecordReader<DeserializationDelegate<IT>>(
					getEnvironment().getInputGate(0),
					getEnvironment().getTaskManagerInfo().getTmpDirectories());
		} else if (groupSize > 1){
			// union case
			inputReader = new MutableRecordReader<IOReadableWritable>(
					new UnionInputGate(getEnvironment().getAllInputGates()),
					getEnvironment().getTaskManagerInfo().getTmpDirectories());
		} else {
			throw new Exception("Illegal input group size in task configuration: " + groupSize);
		}
		
		this.inputTypeSerializerFactory = this.config.getInputSerializer(0, getUserCodeClassLoader());
		@SuppressWarnings({ "rawtypes" })
		final MutableObjectIterator<?> iter = new ReaderIterator(inputReader, this.inputTypeSerializerFactory.getSerializer());
		this.reader = (MutableObjectIterator<IT>)iter;

		// final sanity check
		if (numGates != this.config.getNumInputs()) {
			throw new Exception("Illegal configuration: Number of input gates and group sizes are not consistent.");
		}
	}
653150
public static function initialize() {
		$paths = array_merge(
			array_filter(glob('src/*'), 'is_dir'),
			array_filter(glob('src-*/*'), 'is_dir'),
			array_filter(glob(__DIR__ . '/../../*/src/*/'), 'is_dir')
		);

		$db_params = array(
			"url" => Configuration::get("database.uri", "sqlite:///:memory:")
		);

		$cache = null;
		if(Configuration::get("database.cache", "false") == "false")
			$cache = new \Doctrine\Common\Cache\ArrayCache;

		$config = Setup::createAnnotationMetadataConfiguration($paths, Configuration::get("debug.database", "false") == "true", "cache", $cache);

		foreach(Modules::getAll() as $module)
			$config->addEntityNamespace($module->getShortName(), $module->getNamespace() . "\\Models");

		self::$entity_manager = EntityManager::create($db_params, $config);
	}
1030347
@PostConstruct
    public void buildRepository() {
        try {
            LOGGER.info("Using repo config (classpath): {}", repositoryConfiguration.getURL());
            getPropertiesLoader().loadSystemProperties();

            final RepositoryConfiguration config =
                    RepositoryConfiguration.read(repositoryConfiguration.getURL());
            repository = modeShapeEngine.deploy(config);

            // next line ensures that repository starts before the factory is used.
            final org.modeshape.common.collection.Problems problems =
                    repository.getStartupProblems();
            for (final org.modeshape.common.collection.Problem p : problems) {
                LOGGER.error("ModeShape Start Problem: {}", p.getMessageString());
                // TODO determine problems that should be runtime errors
            }
        } catch (final Exception e) {
            throw new RepositoryRuntimeException(e);
        }
    }
1125914
private void initialize() {
//		if (selection != null && selection.isEmpty() == false
//				&& selection instanceof IStructuredSelection) {
//			IStructuredSelection ssel = (IStructuredSelection) selection;
//			if (ssel.size() > 1)
//				return;
//			Object obj = ssel.getFirstElement();
//			if (obj instanceof IResource) {
//				IContainer container;
//				if (obj instanceof IContainer)
//					container = (IContainer) obj;
//				else
//					container = ((IResource) obj).getParent();
//				containerText.setText(container.getFullPath().toString());
//			}
//		}
		System.err.println("### Set default selected MuleVersion to index: " + muleVersionCombo.getItemCount());
		muleVersionCombo.select(muleVersionCombo.getItemCount() - 1);
	}
196043
public function initialize()
    {
        parent::initialize();

        $this->responseFormat = [
            'statusKey' => (null !== Configure::read('ApiRequest.responseFormat.statusKey')) ? Configure::read('ApiRequest.responseFormat.statusKey') : 'status',
            'statusOkText' => (null !== Configure::read('ApiRequest.responseFormat.statusOkText')) ? Configure::read('ApiRequest.responseFormat.statusOkText') : 'OK',
            'statusNokText' => (null !== Configure::read('ApiRequest.responseFormat.statusNokText')) ? Configure::read('ApiRequest.responseFormat.statusNokText') : 'NOK',
            'resultKey' => (null !== Configure::read('ApiRequest.responseFormat.resultKey')) ? Configure::read('ApiRequest.responseFormat.resultKey') : 'result',
            'messageKey' => (null !== Configure::read('ApiRequest.responseFormat.messageKey')) ? Configure::read('ApiRequest.responseFormat.messageKey') : 'message',
            'defaultMessageText' => (null !== Configure::read('ApiRequest.responseFormat.defaultMessageText')) ? Configure::read('ApiRequest.responseFormat.defaultMessageText') : 'Empty response!',
            'errorKey' => (null !== Configure::read('ApiRequest.responseFormat.errorKey')) ? Configure::read('ApiRequest.responseFormat.errorKey') : 'error',
            'defaultErrorText' => (null !== Configure::read('ApiRequest.responseFormat.defaultErrorText')) ? Configure::read('ApiRequest.responseFormat.defaultErrorText') : 'Unknown request!'
        ];

        $this->responseStatus = $this->responseFormat['statusOkText'];

        $this->loadComponent('RequestHandler');
        $this->loadComponent('RestApi.AccessControl');
    }
959556
protected void readParamsFromFile()
   {
      if (initParams != null)
      {
         nodeType =
            initParams.getValuesParam("nodetype") != null ? initParams.getValueParam("nodetype").getValue()
               : DEFAULT_NODETYPE;

         ObjectParameter param = initParams.getObjectParam("observation.config");
         observationListenerConfiguration = (ObservationListenerConfiguration)param.getObject();
      }
      else
      {
         nodeType = DEFAULT_NODETYPE;
      }

      LOG.info("NodeType from configuration file: " + getNodeType());
      if (observationListenerConfiguration != null)
      {
         LOG.info("Repository name from configuration file: "
            + (observationListenerConfiguration.getRepository() != null ? observationListenerConfiguration
               .getRepository() : "not configured, will be used the current one"));

         LOG.info("List of workspaces from configuration file: " + observationListenerConfiguration.getWorkspaces());
      }
   }
152035
@Override
	public void init() {
		RepositoryConfigurationExtension extension = new SimpleDbRepositoryConfigExtension();
		RepositoryBeanDefinitionParser repositoryBeanDefinitionParser = new RepositoryBeanDefinitionParser(extension);

		registerBeanDefinitionParser("repositories", repositoryBeanDefinitionParser);
	}
1137148
@Override
	public void init() {

		RepositoryConfigurationExtension extension = new SolrRepositoryConfigExtension();
		RepositoryBeanDefinitionParser parser = new RepositoryBeanDefinitionParser(extension);

		registerBeanDefinitionParser("repositories", parser);
		registerBeanDefinitionParser("embedded-solr-server", new EmbeddedSolrServerBeanDefinitionParser());
		registerBeanDefinitionParser("solr-client", new HttpSolrClientBeanDefinitionParser());
	}
1272750
@Override
    protected void initializeImpl()
    {
        //get encoding
        this.responseDataEncoding=this.getConfigurationValue(AbstractHTTPResponseHandler.RESPONSE_DATA_ENCODING_PROPERTY_KEY);
        if(this.responseDataEncoding==null)
        {
            this.responseDataEncoding=IOHelper.getDefaultEncoding();
        }
    }
1051095
@PostConstruct
	protected void init() throws IOException {
		// base configuration from XML file
		if (null != configurationFile) {
			log.debug("Get base configuration from {}", configurationFile);
			manager = new DefaultCacheManager(configurationFile);
		} else {
			GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder();
			builder.globalJmxStatistics().allowDuplicateDomains(true);
			manager = new DefaultCacheManager(builder.build());
		}

		if (listener == null) {
			listener = new InfinispanCacheListener();
		}
		manager.addListener(listener);

		// cache for caching the cache configurations (hmmm, sounds a bit strange)
		Map<String, Map<CacheCategory, CacheService>> cacheCache = 
				new HashMap<String, Map<CacheCategory, CacheService>>();

		// build default configuration
		if (null != defaultConfiguration) {
			setCaches(cacheCache, null, defaultConfiguration);
		}

		// build layer specific configurations
		for (Layer layer : layerMap.values()) {
			CacheInfo ci = configurationService.getLayerExtraInfo(layer.getLayerInfo(), CacheInfo.class);
			if (null != ci) {
				setCaches(cacheCache, layer, ci);
			}
		}
	}
787916
public void afterPropertiesSet() throws Exception {
		initParams = new HashMap<String, Object>(3);
		initParams.put("type", type);
		initParams.put("configPropertiesSourceClass",
				configPropertiesSourceClass);
		initParams.put("configLocation", configLocation);

		if (null == configuration && null == configLocation
				&& null == configPropertiesSourceClass)
			throw new ServletException(
					"Neither configuration nor configLocation nor configPropertiesSourceClass init params were set."
							+ " You must set at least the configuration or the configLocation param or the configPropertiesSourceClass. Please check your web.xml file");

		String fullMapping = "";
		if (StringUtils.isNotEmpty(mapping))
			fullMapping = mapping;

		if (StringUtils.isNotEmpty(controllerMapping))
			fullMapping = PathNormalizer.joinPaths(fullMapping,
					controllerMapping);

		initParams.put(JawrConstant.SERVLET_MAPPING_PROPERTY_NAME, fullMapping);
		if (mapping != null) {
			initParams.put(JawrConstant.SPRING_SERVLET_MAPPING_PROPERTY_NAME,
					PathNormalizer.asDirPath(mapping));
		}

		if (LOGGER.isDebugEnabled())
			LOGGER.debug("Initializing Jawr Controller's JawrRequestHandler");

		if (JawrConstant.BINARY_TYPE.equals(type)) {
			requestHandler = new JawrBinaryResourceRequestHandler(context, initParams,
					configuration);
		} else {
			requestHandler = new JawrRequestHandler(context, initParams,
					configuration);
		}
	}
1261503
private void initialize()
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(this, tc, "initialize");
        
    subsets = new ReliabilitySubset[maxReliabilityIndex + 1];
    subsetIDs = new long[maxReliabilityIndex + 1];
    for(int i=0;i<subsetIDs.length;i++)
    {
      subsetIDs[i] = NO_ID;             
    }
    
    createControlAdapter(); 
    
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initialize");
  }
542121
private void readAndValidateParameter (Param param) {

        try {
            param.readValue();
            param.validate();

        } catch (GeneralConfigException ex) {
            throw ex;

        } catch (Exception ex) {
            throw new GeneralConfigException("Configured value for '" + param.getName() + "' is invalid!", ex);
        }

    }
790967
@Override
  public void initialize(URI path, Configuration config) throws IOException {
    initialize(path, config, /* initSuperclass= */ true);
  }
494843
public void initConfiguration() throws CmsConfigurationException {

        for (I_CmsRepository rep : m_repositoryList) {
            if (CmsLog.INIT.isInfoEnabled()) {
                CmsLog.INIT.info(
                    Messages.get().getBundle().key(
                        Messages.INIT_ADD_REPOSITORY_2,
                        rep.getClass().getName(),
                        rep.getName()));
            }
            rep.initConfiguration();
            m_repositoryMap.put(rep.getName(), rep);
        }
        m_frozen = true;

        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_REPOSITORY_CONFIG_FINISHED_0));
        }

    }
1313105
private function initialize()
    {
        $params = $this->getParameters();

        if ($params) {
            foreach ($params as $param) {
                $setter = 'set' . str_replace(' ', '', ucwords(str_replace('-', ' ', $param->getName())));
                if (FALSE === method_exists($this, $setter)) {
                    $msg = sprintf('Unknown parameter "%s" for LocalConfigurationFilter!', $param->getName());
                    throw new BuildException($msg);
                }

                call_user_func(array($this, $setter), $param->getValue());
            }
        }

        if (NULL === $this->installTool) {
            $this->addInstallTool();
        }
    }