/* (non-Javadoc)
@see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
336906
@Override
    public void afterPropertiesSet() throws Exception {
        final Map<String, Set<String>> resultAttributeMapping = this.getResultAttributeMapping();
        if (this.setReturningAttributes && resultAttributeMapping != null) {
            this.searchControls.setReturningAttributes(resultAttributeMapping.keySet().toArray(new String[resultAttributeMapping.size()]));
        }

        if (this.contextSource == null) {
            throw new BeanCreationException("contextSource must be set");
        }
    }
775317
public function afterImport()
    {
        $obj = Craft::$app->globals;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_allGlobalSets')) {
            $refProperty1 = $refObject->getProperty('_allGlobalSets');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
    }
1212740
@Override
	public void afterPropertiesSet() {

		if (this.blockingMongoOperations != null) {

			IndexOperations indexOperations = this.blockingMongoOperations.indexOps(this.collectionName);
			this.mongoSessionConverter.ensureIndexes(indexOperations);
		}
	}
898323
public void afterPropertiesSet() {
		connector = ConnectorFactory.create(olmConnectorPropertyFile, connectorName);
		connector.setResponseManager(olmAckManger);
		connector.setErrorManager(errorManager);
		connector.configure();
	}
179291
public static boolean valueChanged(Set<?> before, Set<?> after) {
        if ((before == null && after == null) || after == null) {
            return false;
        }
        if (before == null) {
            if (after.isEmpty()) {
                return false;
            } else {
                return true;
            }
        } else {
            if (before.size() != after.size()) {
                return true;
            }
            for (Object bean : after) {
                if (!before.contains(bean)) {
                    return true;
                }
            }
        }
        return false;
    }
241271
public static void rebindCasConfigurationProperties(final ConfigurationPropertiesBindingPostProcessor binder,
                                                        final ApplicationContext applicationContext) {

        val map = applicationContext.getBeansOfType(CasConfigurationProperties.class);
        val name = map.keySet().iterator().next();
        LOGGER.trace("Reloading CAS configuration via [{}]", name);
        val e = applicationContext.getBean(name);
        binder.postProcessBeforeInitialization(e, name);
        val bean = applicationContext.getAutowireCapableBeanFactory().initializeBean(e, name);
        applicationContext.getAutowireCapableBeanFactory().autowireBean(bean);
        LOGGER.debug("Reloaded CAS configuration [{}]", name);
    }
860971
public void setProperties(Map<String, Object> properties)
    {
        if (this.getTask() != null)
            this.getTask().setProperties(properties);
    }
923963
public void setProperties(Collection<String> properties) {
        if (null == this.properties) {
            this.properties = new ArrayList<>();
        }
        this.properties.clear();
        this.properties.addAll(properties);
    }
542413
@Advice.OnMethodExit
	public static void afterGetHandler(@Advice.Return Object handler) {
		SpringMvcRequestNameDeterminerTransformer.setRequestNameByHandler(handler);
	}
104278
@Override
    public final void afterPropertiesSet() throws Exception {
        if (this.getLocator() != null) {
            this.logger.warn(
                    "Static "
                            + this.getClass().getName()
                            + " reference has already been set and setInstance is being called");
        }
        this.setLocator(this);
    }
544737
public void setProperties(Map<String, Object> properties)
    {
        if (this.getParentRecordOwner() != null)
            this.getParentRecordOwner().setProperties(properties);
    }
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);
		}
	}
57341
public void afterPropertiesSet() throws Exception {
        if (loginService == null) {
            loginService = new SimpleLoginService();
            ((SimpleLoginService) loginService).setName(realm);
        }
    }
696839
@Override
	public void setBean(final Object bean) {
		BeanAndProviderBoundComponentModel model = getOrCreateComponentModel();
		model.setBean(bean);

		if (getBeanProperty() == null) {
			setBeanProperty(".");
		}
		// Remove values in scratch map
		removeBeanFromScratchMap();
	}
1228442
@Override
    public void setProperties(Property[] newProperties) {
        // unregister the listeners from previous properties
        for (Property prop : properties) {
            prop.removePropertyChangeListener(this);
        }

        // replace the current properties
        properties.clear();
        properties.addAll(Arrays.asList(newProperties));

        // add listeners
        for (Property prop : properties) {
            prop.addPropertyChangeListener(this);
        }

        buildModel();
    }
169771
public void initBeans(Object[] beans) {
        this.controllers = Arrays.stream(beans).filter(bean -> this.getController(bean) != null).map(bean -> this.getController(bean)).collect(Collectors.toList());
    }
673999
@Override
    public void afterPropertiesSet() throws Exception { // NOPMD

        final boolean isQCEnabld = isQCEnabled();

        // iterator over the list of possible external resources
        // only one of the resources should exist
        // this is to support special locations on special modules such as: Web
        // etc.
        Resource customerPropertyResource = null;

        // Resource customerXmlResource = null;

        Resource deploymentResource = null;

        Resource qcResource = null;

        if (isQCEnabld) {
            LOGGER.info("Found the ConfigurationTest class indicating that QC config is to be used instead of deployment and customer config files!");
            qcResource = validateQCResource();
        } else {
            customerPropertyResource = validateCustomerPropertyConfig();
            deploymentResource = validateDeploymentConfig();
            if (!printedToLog) {
                StringBuffer logMessageBuffer = new StringBuffer("The customer resources loaded are:");
                printResourcesLoaded(logMessageBuffer, customerPropertyResource);
                if(applicationState != null){
                    applicationState.setState(FoundationLevel.INFO, logMessageBuffer.toString());
                }

                if (deploymentResource != null) {
                    logMessageBuffer = new StringBuffer("The deployment resources loaded are:");
                    printResourcesLoaded(logMessageBuffer, deploymentResource);
                    if(applicationState != null) {
                        applicationState.setState(FoundationLevel.INFO, logMessageBuffer.toString());
                    }
                }

            }
        }
        // get all the resources of the internal property config files.
        final Resource[] internalPropertyResources = context.getResources(internalPropertyConfig);
        final List<Resource> internalPropertyResourcesList = Arrays.asList(internalPropertyResources);

        // get all the resources of the internal xml config files.
        // xml resources take precedence over the properties loaded.
        final Resource[] internalXmlResources = context.getResources(internalXmlConfig);
        final List<Resource> internalXmlResourcesList = Arrays.asList(internalXmlResources);

        if (!printedToLog) {
            final StringBuffer logMessageBuffer = new StringBuffer("The default resources loaded are:");
            printResourcesLoaded(logMessageBuffer, internalXmlResourcesList);
            printResourcesLoaded(logMessageBuffer, internalPropertyResourcesList);
            if(applicationState != null) {
                applicationState.setState(FoundationLevel.INFO, logMessageBuffer.toString());
            }
            printedToLog = true;
        }

        // order of the resources is important to maintain properly the
        // hierarchy of the configuration.

        resourcesList.addAll(internalPropertyResourcesList);

        // xml resources take precedence over the properties loaded.
        resourcesList.addAll(internalXmlResourcesList);

        if (deploymentResource != null) {
            resourcesList.add(deploymentResource);
        }

        if (customerPropertyResource != null) {
            resourcesList.add(customerPropertyResource);
        }

        // xml customer resource take precedence over the properties loaded.
        // if (customerXmlResource != null) {
        // resourcesList.add(customerXmlResource);
        // }

        if (qcResource != null) {
            resourcesList.add(qcResource);
        }

    }