Initialize the supplied provider.

@param provider the provider; may not be null
@throws RepositoryException if there is a problem initializing the provider
508254
protected void doInitialize( IndexProvider provider ) throws RepositoryException {

        // Set the execution context instance ...
        Reflection.setValue(provider, "context", repository.context());
        
        // Set the environment
        Reflection.setValue(provider, "environment", repository.environment());

        provider.initialize();

        // If successful, call the 'postInitialize' method reflectively (due to inability to call directly) ...
        Method postInitialize = Reflection.findMethod(IndexProvider.class, "postInitialize");
        Reflection.invokeAccessibly(provider, postInitialize, new Object[] {});

        if (logger.isDebugEnabled()) {
            logger.debug("Successfully initialized index provider '{0}' in repository '{1}'", provider.getName(),
                         repository.name());
        }
    }
1223478
private void init(int max) {
        if ((max != INTERNAL) && (max != PROVIDER) && (max != PRIVILEGED))
            throw new IllegalArgumentException("invalid action");

        if (max == NONE)
            throw new IllegalArgumentException("missing action");

        if (getName() == null)
            throw new NullPointerException("action can't be null");

        this.max = max;
    }
832208
@Override
    protected void initializeImpl(Map<String,String> configuration)
    {
        //create configuration holder
        ConfigurationHolder configurationHolder=new ConfigurationHolderImpl(configuration);

        this.fileContentParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.FILE_CONTENT_PARAMETER_NAME_PROPERTY_KEY);
        if(this.fileContentParameter==null)
        {
            this.fileContentParameter="file";
        }
        this.fileNameParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.FILE_NAME_PARAMETER_NAME_PROPERTY_KEY);
        if(this.fileNameParameter==null)
        {
            this.fileNameParameter="filename";
        }
        this.priorityParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.PRIORITY_PARAMETER_NAME_PROPERTY_KEY);
        if(this.priorityParameter==null)
        {
            this.priorityParameter="priority";
        }
        this.targetAddressParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.TARGET_ADDRESS_PARAMETER_NAME_PROPERTY_KEY);
        if(this.targetAddressParameter==null)
        {
            this.targetAddressParameter="targetaddress";
        }
        this.targetNameParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.TARGET_NAME_PARAMETER_NAME_PROPERTY_KEY);
        if(this.targetNameParameter==null)
        {
            this.targetNameParameter="targetname";
        }
        this.senderNameParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.SENDER_NAME_PARAMETER_NAME_PROPERTY_KEY);
        if(this.senderNameParameter==null)
        {
            this.senderNameParameter="sendername";
        }
        this.senderFaxNumberParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.SENDER_FAX_NUMBER_PARAMETER_NAME_PROPERTY_KEY);
        if(this.senderFaxNumberParameter==null)
        {
            this.senderFaxNumberParameter="senderfaxnumber";
        }
        this.senderEMailParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfigurationConstants.SENDER_EMAIL_PARAMETER_NAME_PROPERTY_KEY);
        if(this.senderEMailParameter==null)
        {
            this.senderEMailParameter="senderemail";
        }
    }
656157
private void init() throws RepositoryException, RepositoryConfigurationException
   {
      List<WorkspaceEntry> wsEntries = config.getWorkspaceEntries();

      NodeTypeDataManager typeManager = (NodeTypeDataManager)this.getComponentInstanceOfType(NodeTypeDataManager.class);
      NamespaceRegistryImpl namespaceRegistry =
         (NamespaceRegistryImpl)this.getComponentInstanceOfType(NamespaceRegistry.class);

      for (WorkspaceEntry ws : wsEntries)
      {
         initWorkspace(ws);
         WorkspaceContainer workspaceContainer = getWorkspaceContainer(ws.getName());
         SearchManager searchManager =
            (SearchManager)workspaceContainer.getComponentInstanceOfType(SearchManager.class);
         //         if (searchManager != null)
         //         {
         //            typeManager.addQueryHandler(searchManager.getHandler());
         //            namespaceRegistry.addQueryHandler(searchManager.getHandler());
         //         }
         //         else
         //         {
         //            log.warn("Search manager not configured for " + ws.getName());
         //         }
      }

      SystemSearchManagerHolder searchManager =
         (SystemSearchManagerHolder)this.getComponentInstanceOfType(SystemSearchManagerHolder.class);
      //      if (searchManager != null)
      //      {
      //         typeManager.addQueryHandler(searchManager.get().getHandler());
      //         namespaceRegistry.addQueryHandler(searchManager.get().getHandler());
      //      }
      //      else
      //      {
      //         log.warn("System search manager not configured ");
      //      }

   }
555070
public void setProvider(String provider)
    {
        if (provider != null && provider.endsWith(".class"))
        {
            this.provider = provider.substring(0, provider.length() - 6);
        }
        this.provider = provider;
    }
1174702
@Override
    public synchronized void init(Map<?, ?> properties)
    {
        if (manager != null)
        {
            log.warn("Attempt to restart an already started CacheFactory. Using previously created EhCacheFactory.");
            return;
        }
        initializing = true;
        try
        {
            String configurationResourceName = null;
            if (properties != null)
            {
                configurationResourceName = (String) properties.get(NET_SF_EHCACHE_CONFIGURATION_RESOURCE_NAME);
            }
            if (configurationResourceName == null || configurationResourceName.length() == 0)
            {
                manager = CacheManager.create();
            }
            else
            {
                if (!configurationResourceName.startsWith("/"))
                {
                    configurationResourceName = "/" + configurationResourceName;
                    log.info("prepending / to " + configurationResourceName + ". It should be placed in the root"
                            + "of the classpath rather than in a package.");
                }
                URL url = loadResource(configurationResourceName);
                manager = CacheManager.create(url);
            }
        }
        catch (net.sf.ehcache.CacheException e)
        {
            if (e.getMessage().startsWith(
                    "Cannot parseConfiguration CacheManager. Attempt to create a new instance of "
                            + "CacheManager using the diskStorePath"))
            {
                throw new CacheException("Could not init EhCacheFactory.", e);
            }
            else
            {
                throw new CacheException(e);
            }
        }
        finally
        {
            initializing = false;
        }

    }
418625
public void init(Consumer<ServerBuilder> init)
  {
    Objects.requireNonNull(init);
    
    _initList.add(init);
  }
790967
@Override
  public void initialize(URI path, Configuration config) throws IOException {
    initialize(path, config, /* initSuperclass= */ true);
  }
304147
@SuppressWarnings("unchecked")
	public <T> RestBuilder addProvider(Class<? extends ContextProvider<T>> provider) {

		Assert.notNull(provider, "Missing context provider!");
		registeredProviders.put(null, provider);
		return this;
	}
457347
protected void initialize() {
        super.initialize();
        _serviceProviders = Collections.synchronizedMap(new HashMap<Class, ServiceProvider>());
        _bcsListeners = Collections.synchronizedList(new ArrayList<BeanContextServicesListener>());
    }
866632
private void init() {
        if (provider != null) {
            propertyGrid.setTarget(StringUtils.isEmpty(groupId) ? null : new Settings(groupId, provider));
        }
    }
962839
@Override
	public void initialize() {
		/*
		 * Two resource providers are defined. Each one handles a specific
		 * type of resource.
		 */
		List<IResourceProvider> providers = new ArrayList<>();
		providers.add(new PatientResourceProvider());
		providers.add(new OrganizationResourceProvider());
		setResourceProviders(providers);
		
		/*
		 * Use a narrative generator. This is a completely optional step, 
		 * but can be useful as it causes HAPI to generate narratives for
		 * resources which don't otherwise have one.
		 */
		INarrativeGenerator narrativeGen = new DefaultThymeleafNarrativeGenerator();
		getFhirContext().setNarrativeGenerator(narrativeGen);

		/*
		 * Enable CORS
		 */
		CorsConfiguration config = new CorsConfiguration();
		CorsInterceptor corsInterceptor = new CorsInterceptor(config);
		config.addAllowedHeader("Accept");
		config.addAllowedHeader("Content-Type");
		config.addAllowedOrigin("*");
		config.addExposedHeader("Location");
		config.addExposedHeader("Content-Location");
		config.setAllowedMethods(Arrays.asList("GET","POST","PUT","DELETE","OPTIONS"));
		registerInterceptor(corsInterceptor);

		/*
		 * This server interceptor causes the server to return nicely
		 * formatter and coloured responses instead of plain JSON/XML if
		 * the request is coming from a browser window. It is optional,
		 * but can be nice for testing.
		 */
		registerInterceptor(new ResponseHighlighterInterceptor());
		
		/*
		 * Tells the server to return pretty-printed responses by default
		 */
		setDefaultPrettyPrint(true);
		
	}
1114503
public void initialize()
    {
        super.initialize();

        //
        // Register the ResourceContext provider on all new ControlContainerContext instances.
        //
        addService(org.apache.beehive.controls.api.context.ResourceContext.class,
                   ResourceContextImpl.getProvider());
    }
1059893
@Override
	public void init(EntityManager entityManager, Object entity) {
		
		// Initialisation des parametres
		this.entityManager = entityManager;
		this.entity = entity;
	}
460442
public void init(ObjectMapper objectMapper) {
        if (resultFactory == null) {
            resultFactory = new ImmediateResultFactory();
        }
        PreconditionUtil.verifyEquals(InitializedState.NOT_INITIALIZED, initializedState, "already initialized");
        this.initializedState = InitializedState.INITIALIZING;
        this.objectMapper = objectMapper;
        this.objectMapper.registerModules(getJacksonModules());
        typeParser.setObjectMapper(objectMapper);

        initializeModules();

        if (isServer) {
            applyRepositoryRegistrations();
            applyResourceRegistrations();
        }

        ExceptionMapperLookup exceptionMapperLookup = getExceptionMapperLookup();
        ExceptionMapperRegistryBuilder mapperRegistryBuilder = new ExceptionMapperRegistryBuilder();
        exceptionMapperRegistry = mapperRegistryBuilder.build(exceptionMapperLookup);

        filterBehaviorProvider =
                new ResourceFilterDirectoryImpl(aggregatedModule.getResourceFilters(), httpRequestContextProvider,
                        resourceRegistry);
        this.initializedState = InitializedState.INITIALIZED;
    }
634795
@Override
    protected void initializeProvider(InterceptorProvider provider, Bus bus) {
        super.initializeProvider(provider, bus);

        FlowIdProducerIn<Message> flowIdProducerIn = new FlowIdProducerIn<Message>();
        provider.getInInterceptors().add(flowIdProducerIn);
        provider.getInFaultInterceptors().add(flowIdProducerIn);

        FlowIdProducerOut<Message> flowIdProducerOut = new FlowIdProducerOut<Message>();
        provider.getOutInterceptors().add(flowIdProducerOut);
        provider.getOutFaultInterceptors().add(flowIdProducerOut);

        WireTapIn wireTapIn = new WireTapIn(logMessageContent, logMessageContentOverride);
        provider.getInInterceptors().add(wireTapIn);
        provider.getInInterceptors().add(epi);
        provider.getInFaultInterceptors().add(epi);

        WireTapOut wireTapOut = new WireTapOut(epi, logMessageContent, logMessageContentOverride);
        provider.getOutInterceptors().add(wireTapOut);
        provider.getOutFaultInterceptors().add(wireTapOut);

    }
771328
public void initialize(ClassLoader classLoader)
    {
        ComponentAnnotationLoader loader = new ComponentAnnotationLoader();
        loader.initialize(this, classLoader);

        // Extension point to allow component to manipulate ComponentManager initialized state.
        try {
            List<ComponentManagerInitializer> initializers = this.getInstanceList(ComponentManagerInitializer.class);
            for (ComponentManagerInitializer initializer : initializers) {
                initializer.initialize(this);
            }
        } catch (ComponentLookupException e) {
            // Should never happen
            this.logger.error("Failed to lookup ComponentManagerInitializer components", e);
        }
    }