Wraps the internal config data into a bean which manages the lookup of inherited configurations.<p>

@param data the config data to wrap

@return the wrapper object
548463
private CmsADEConfigData wrap(CmsADEConfigDataInternal data) {

        String path = data.getBasePath();
        List<CmsADEConfigDataInternal> configList = Lists.newArrayList();
        configList.add(m_moduleConfiguration);
        if (path != null) {
            List<String> siteConfigPaths = getSiteConfigPaths(path);
            for (String siteConfigPath : siteConfigPaths) {
                CmsADEConfigDataInternal currentConfig = m_siteConfigurationsByPath.get(siteConfigPath);
                CmsResource masterConfigResource = currentConfig.getMasterConfig();
                if (currentConfig.getMasterConfig() != null) {
                    CmsADEConfigDataInternal masterConfig = m_siteConfigurations.get(
                        masterConfigResource.getStructureId());
                    if (masterConfig != null) {
                        configList.add(masterConfig);
                    } else {
                        LOG.warn(
                            "Master configuration "
                                + masterConfigResource.getRootPath()
                                + " not found for sitemap configuration in "
                                + currentConfig.getBasePath());
                    }
                }
                configList.add(currentConfig);
            }
        }
        return new CmsADEConfigData(data, this, new CmsADEConfigurationSequence(configList));
    }
480323
public BaseDataJsonFieldBo setData(JsonNode data) {
        return setData(
                data == null || data instanceof MissingNode || data instanceof NullNode ? null
                        : SerializationUtils.toJson(data));
    }
570931
public org.apache.commons.configuration.Configuration getConfiguration(ConfigurationWrapper wrapper) {
		// get input streams
		List<ISource> sources = this.locate(wrapper);
		
		// create configuration combiner
		OverrideCombiner combiner = new OverrideCombiner();
		CombinedConfiguration combined = new CombinedConfiguration(combiner);
		
		// combine configurations
		for(ISource source : sources) {
			// determine mime type in order to create proper commons object
			SupportedType type = MimeGuesser.guess(source);
			
			// if the source isn't available, continue
			if(!source.available()) {
				continue;
			}
			
			InputStream stream = source.stream();
			
			// load properties based on MIME type
			// todo: update for more commons-configuration
			// supported mime types
			if(SupportedType.XML.equals(type)) {
				XMLConfiguration xmlConfiguration = new XMLConfiguration();
				try {
					xmlConfiguration.load(stream);
					combined.addConfiguration(xmlConfiguration);
				} catch(ConfigurationException e) {
					this.logger.error("An error occurred while reading XML properties: {}", e.getMessage());	
				}
			} else {
				PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration();
				try {
					propertiesConfiguration.load(stream);
					combined.addConfiguration(propertiesConfiguration);
				} catch (ConfigurationException e) {
					this.logger.error("An error occurred while reading properties: {}", e.getMessage());
				}				
			}
			
			// close stream
			try {
				stream.close();
			} catch (IOException e) {
				this.logger.trace("Could not close old stream: {}", stream);
			}
			
			// leave on first loop if merge is on
			if(!wrapper.merge()) {
				break;
			}
		}		
		// return configuration
		return combined;
	}
1357263
public L parseSingleComponent(@Nullable C parent, @Nullable O data) {
        return mDataParser.parseSingleComponent(data, parent, this);
    }
1046335
private CmsADEConfigData getConfigData() {

        if (m_adeConfig == null) {
            m_adeConfig = OpenCms.getADEManager().lookupConfiguration(m_cms, m_cms.addSiteRoot(m_currentPageUri));
        }
        return m_adeConfig;
    }
832837
protected Object resolveProviderConfig(String exp, Map<String, ? extends Object> contextMap, LaContainer container,
            Class<?> resultType) {
        if (exp.startsWith(PROVIDER_GET) && exp.endsWith(METHOD_MARK) && exp.contains(".") && !exp.contains("\"")) {
            final String[] tokens = exp.split("\\.");
            if (tokens.length > 1) {
                Object component = null;
                BeanDesc beanDesc = null;
                for (String prop : tokens) {
                    if (prop.endsWith(METHOD_MARK)) { // method
                        if (component == null) { // e.g. getJdbcUrl() only
                            break;
                        }
                        final String methodName = prop.substring(0, prop.length() - METHOD_MARK.length());
                        component = beanDesc.invoke(component, methodName, (Object[]) null);
                        beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                    } else { // component or property
                        if (beanDesc == null) { // first element
                            if (container.hasComponentDef(prop)) { // component
                                component = container.getComponent(prop);
                                beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                            } else {
                                break;
                            }
                        } else { // next elements, property
                            final PropertyDesc propertyDesc = beanDesc.getPropertyDesc(prop);
                            if (propertyDesc != null) {
                                component = propertyDesc.getValue(component);
                                beanDesc = BeanDescFactory.getBeanDesc(component.getClass());
                            } else {
                                break;
                            }
                        }
                    }
                }
                if (component != null) {
                    return component;
                }
            }
        }
        return null;
    }
1026764
@Transactional
    @Override
    public void importData(ExternalStylesheetDescriptor data) {
        final String stylesheetName = data.getName();
        final String uri = data.getUri();

        IStylesheetDescriptor stylesheetDescriptor =
                this.stylesheetDescriptorDao.getStylesheetDescriptorByName(stylesheetName);
        if (stylesheetDescriptor == null) {
            stylesheetDescriptor =
                    this.stylesheetDescriptorDao.createStylesheetDescriptor(stylesheetName, uri);
        } else {
            stylesheetDescriptor.setStylesheetResource(uri);
        }

        stylesheetDescriptor.setUrlNodeSyntaxHelperName(data.getUrlSyntaxHelper());
        stylesheetDescriptor.setDescription(data.getDescription());

        final List<ExternalOutputPropertyDescriptor> extOutputProperties =
                data.getOutputProperties();
        final List<IOutputPropertyDescriptor> outputPropertyDescriptors =
                new ArrayList<IOutputPropertyDescriptor>(extOutputProperties.size());
        for (final ExternalOutputPropertyDescriptor extOutputProperty : extOutputProperties) {
            final String name = extOutputProperty.getName();
            final Scope scope = Scope.valueOf(extOutputProperty.getScope().name());
            final OutputPropertyDescriptorImpl outputPropertyDescriptor =
                    new OutputPropertyDescriptorImpl(name, scope);
            outputPropertyDescriptor.setDefaultValue(extOutputProperty.getDefaultValue());
            outputPropertyDescriptor.setDescription(extOutputProperty.getDescription());

            outputPropertyDescriptors.add(outputPropertyDescriptor);
        }
        stylesheetDescriptor.setOutputPropertyDescriptors(outputPropertyDescriptors);

        final List<ExternalStylesheetParameterDescriptor> extStylesheetParameters =
                data.getStylesheetParameters();
        final List<IStylesheetParameterDescriptor> stylesheetParameterDescriptors =
                new ArrayList<IStylesheetParameterDescriptor>(extOutputProperties.size());
        for (final ExternalStylesheetParameterDescriptor extStylesheetParameter :
                extStylesheetParameters) {
            final String name = extStylesheetParameter.getName();
            final Scope scope = Scope.valueOf(extStylesheetParameter.getScope().name());
            final StylesheetParameterDescriptorImpl stylesheetParameterDescriptor =
                    new StylesheetParameterDescriptorImpl(name, scope);
            stylesheetParameterDescriptor.setDefaultValue(extStylesheetParameter.getDefaultValue());
            stylesheetParameterDescriptor.setDescription(extStylesheetParameter.getDescription());

            stylesheetParameterDescriptors.add(stylesheetParameterDescriptor);
        }
        stylesheetDescriptor.setStylesheetParameterDescriptors(stylesheetParameterDescriptors);

        final List<ExternalLayoutAttributeDescriptor> extLayoutAttributes =
                data.getLayoutAttributes();
        final List<ILayoutAttributeDescriptor> layoutAttributeDescriptors =
                new ArrayList<ILayoutAttributeDescriptor>(extOutputProperties.size());
        for (final ExternalLayoutAttributeDescriptor extLayoutAttribute : extLayoutAttributes) {
            final String name = extLayoutAttribute.getName();
            final Scope scope = Scope.valueOf(extLayoutAttribute.getScope().name());
            final LayoutAttributeDescriptorImpl layoutAttributeDescriptor =
                    new LayoutAttributeDescriptorImpl(name, scope);
            layoutAttributeDescriptor.setDefaultValue(extLayoutAttribute.getDefaultValue());
            layoutAttributeDescriptor.setDescription(extLayoutAttribute.getDescription());
            layoutAttributeDescriptor.setTargetElementNames(
                    new LinkedHashSet<String>(extLayoutAttribute.getTargetElements()));

            layoutAttributeDescriptors.add(layoutAttributeDescriptor);
        }
        stylesheetDescriptor.setLayoutAttributeDescriptors(layoutAttributeDescriptors);

        this.stylesheetDescriptorDao.updateStylesheetDescriptor(stylesheetDescriptor);
    }
994627
@Override
  public final Object lazyGet(
    final String pBeanName) throws Exception {
    if (this.isReconfiguring) {
      throw new ExceptionWithCode(ExceptionWithCode.SYSTEM_RECONFIGURING,
        "system_reconfiguring");
    }
    if (this.isReinitializing) {
      // locking:
      synchronized (this) {
        if (this.isReinitializing) {
          init(); //complex initializing inner factories delegate
          this.isReinitializing = false;
        }
      }
    }
    setLastRequestTime(new Date().getTime());
    Object bean = this.beansMap.get(pBeanName);
    // see in beige-common:
    // org.beigesoft.test.DoubleCkeckLockingWrApTest
    if (bean == null) {
      // locking:
      synchronized (this) {
        // make sure again whether it's null after locking:
        bean = this.beansMap.get(pBeanName);
        if (bean == null) {
          if (getHandlerEntityRequestName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetHandlerEntityRequest();
          } else if (getHndlEntityFileReportReqName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetHndlEntityFileReportReq();
          } else if (getSrvOrmName().equals(pBeanName)) {
            bean = lazyGetSrvOrm();
          } else if (getSessionTrackerName().equals(pBeanName)) {
            bean = lazyGetSessionTracker();
          } else if (getImportFullDatabaseCopyName().equals(pBeanName)) {
            bean = lazyGetImportFullDatabaseCopy();
          } else if (getDatabaseWriterName().equals(pBeanName)) {
            bean = lazyGetDbWriterFullCopy();
          } else if (getMailSenderName().equals(pBeanName)) {
            bean = lazyGetMailSender();
          } else if (getHndlI18nRequestName().equals(pBeanName)) {
            bean = lazyGetHndlI18nRequest();
          } else if (getUtilXmlName().equals(pBeanName)) {
            bean = lazyGetUtilXml();
          } else if (getSecureLoggerName().equals(pBeanName)) {
            bean = lazyGetSecureLogger();
          } else if (getLoggerName().equals(pBeanName)) {
            bean = lazyGetLogger();
          } else if (getMngSoftwareName().equals(pBeanName)) {
            bean = lazyGetMngSoftware();
          } else if (getSrvI18nName().equals(pBeanName)) {
            bean = lazyGetSrvI18n();
          } else if (getUtlJspName().equals(pBeanName)) {
            bean = lazyGetUtlJsp();
          } else if (getSrvDatabaseName().equals(pBeanName)) {
            bean = lazyGetSrvDatabase();
          } else if (getHlpEntitiesPageName().equals(pBeanName)) {
            bean = lazyGetHlpEntitiesPage();
          } else if (getSrvNumberToStringName().equals(pBeanName)) {
            bean = lazyGetSrvNumberToString();
          } else if (getSrvDateName().equals(pBeanName)) {
            bean = lazyGetSrvDate();
          } else if (getSrvPageName().equals(pBeanName)) {
            bean = lazyGetSrvPage();
          } else if (getFillEntityFromReqName().equals(pBeanName)) {
            bean = lazyGetFillEntityFromReq();
          } else if (getMngUvdSettingsName().equals(pBeanName)) {
            bean = lazyGetMngUvdSettings();
          } else if (getUtlPropertiesName().equals(pBeanName)) {
            bean = lazyGetUtlProperties();
          } else if (getUtlReflectionName().equals(pBeanName)) {
            bean = lazyGetUtlReflection();
          } else if (getMngSettingsGetDbCopyName().equals(pBeanName)) {
            bean = lazyGetMngSettingsGetDbCopy();
          } else if (getHldFieldsCnvTfsNamesName().equals(pBeanName)) {
            bean = lazyGetHldFieldsCnvTfsNames();
          } else if (getFctConvertersToFromStringName().equals(pBeanName)) {
            bean = lazyGetFctConvertersToFromString();
          } else if (getFctFillersObjectFieldsName().equals(pBeanName)) {
            bean = lazyGetFctFillersObjectFields();
          } else if (getHolderRapiSettersName().equals(pBeanName)) {
            bean = lazyGetHolderRapiSetters();
          } else if (getHolderRapiGettersName().equals(pBeanName)) {
            bean = lazyGetHolderRapiGetters();
          } else if (getHolderRapiFieldsName().equals(pBeanName)) {
            bean = lazyGetHolderRapiFields();
          } else if (getHlpInsertUpdateName().equals(pBeanName)) {
            bean = lazyGetHlpInsertUpdate();
          } else if (getFillerEntitiesFromRsName().equals(pBeanName)) {
            bean = lazyGetFillerEntitiesFromRs();
          } else if (getFctBnCnvBnFromRsName().equals(pBeanName)) {
            bean = lazyGetFctBnCnvBnFromRs();
          } else if (getFctBnCnvIbnToColumnValuesName().equals(pBeanName)) {
            bean = lazyGetFctBnCnvIbnToColumnValues();
          } else if (getCsvReaderName().equals(pBeanName)) {
            bean = lazyGetCsvReader();
          } else if (getSrvSqlEscapeName().equals(pBeanName)) {
            bean = lazyGetSrvSqlEscape();
          } else if (getHldCnvToColumnsValuesNamesName().equals(pBeanName)) {
            bean = lazyGetHldCnvToColumnsValuesNames();
          } else if (getPrepareDbAfterFullImportName().equals(pBeanName)) {
            bean = lazyGetPrepareDbAfterFullImport();
          } else if (getHldCnvFromRsNamesName().equals(pBeanName)) {
            bean = lazyGetHldCnvFromRsNames();
          } else if (getFctBcFctSimpleEntitiesName().equals(pBeanName)) {
            bean = this.factoryBldServices.lazyGetFctBcFctSimpleEntities();
          } else if (getFctBcCnvEntityToColumnsValuesName().equals(pBeanName)) {
            bean = lazyGetFctBcCnvEntityToColumnsValues();
          } else {
            bean = lazyGetOtherBean(pBeanName);
            if (bean == null && this.factoryOverBeans != null) {
                bean = this.factoryOverBeans.lazyGet(pBeanName);
            }
          }
        }
      }
    }
    if (bean == null) {
      throw new ExceptionWithCode(ExceptionWithCode.CONFIGURATION_MISTAKE,
        "There is no bean with name " + pBeanName);
    }
    return bean;
  }
1265002
public CmsXmlContentProperty withConfig(String config) {

        return new CmsXmlContentProperty(
            m_name,
            m_type,
            m_visibility,
            m_widget,
            config,
            m_ruleRegex,
            m_ruleType,
            m_default,
            m_niceName,
            m_description,
            m_error,
            m_preferFolder);
    }
121618
public void doRuntimeConfiguration(RuntimeSpringConfiguration springConfig) {
        ApplicationContext context = springConfig.getUnrefreshedApplicationContext();
        AutowireCapableBeanFactory autowireCapableBeanFactory = context.getAutowireCapableBeanFactory();
        if(autowireCapableBeanFactory instanceof ConfigurableListableBeanFactory) {
            ConfigurableListableBeanFactory beanFactory = (ConfigurableListableBeanFactory)autowireCapableBeanFactory;
            ConversionService existingConversionService = beanFactory.getConversionService();
            ConverterRegistry converterRegistry;
            if(existingConversionService == null) {
                GenericConversionService conversionService = new GenericConversionService();
                converterRegistry = conversionService;
                beanFactory.setConversionService(conversionService);
            }
            else {
                converterRegistry = (ConverterRegistry)existingConversionService;
            }

            converterRegistry.addConverter(new Converter<NavigableMap.NullSafeNavigator, Object>() {
                @Override
                public Object convert(NavigableMap.NullSafeNavigator source) {
                    return null;
                }
            });
        }
        checkInitialised();
        for (GrailsPlugin plugin : pluginList) {
            if (plugin.supportsCurrentScopeAndEnvironment() && plugin.isEnabled(context.getEnvironment().getActiveProfiles())) {
                plugin.doWithRuntimeConfiguration(springConfig);
            }
        }
    }
297595
public static AVIMConversationMemberInfo createInstance(Map<String, Object> data) {
    if (null == data) {
      return null;
    }
    String conversationId = (String)data.get(ATTR_CONVID);
    String memberId = (String)data.get(ATTR_MEMBERID);
    String roleStr = (String)data.get(ATTR_ROLE);
    String objectId = (String)data.get(ATTR_OJBECTID);
    ConversationMemberRole role = ConversationMemberRole.fromString(roleStr);
    return new AVIMConversationMemberInfo(objectId, conversationId, memberId, role);
  }
457404
public void setData(final List data) {
		// Bean properties to render
		String[] properties = new String[]{"colour", "shape", "animal"};

		simpleTable.setDataModel(new SimpleBeanListTableDataModel(properties, data));
	}
489922
public function config($data)
    {
        $items = is_array($data) ? $data : array();

        $config = new Provider\Configuration($items);

        if (is_string($data))
        {
            $config->load($data);
        }

        $interface = ProviderInterface::CONFIG;

        return $this->set($interface, $config);
    }
40658
public function getConfigData($data = null) {
        if ($data !== null && isset($this->_config[$data])) {
            return $this->_config[$data];
        } elseif ($data === null) {
            return $this->_config;
        } else {
            throw new ConfigException("Error while requesting config value: " . $data);
        }
    }
905301
public static <T> Collection<T> convertAllBeanDataToObjects(Collection<? extends BeanData> data) {
        return Collections2.transform(data, new BeanDataToObjectFunction<T>());
    }
365186
public static Config getOverriddenConfig(@Nonnull final Config config, @Nullable final AbstractConfiguration ... overrideConfigurations)
    {
        if (overrideConfigurations == null || overrideConfigurations.length == 0) {
            return config;
        }

        final CombinedConfiguration cc = new CombinedConfiguration(new OverrideCombiner());

        int index  = 0;
        final AbstractConfiguration first = config.config.getNumberOfConfigurations() > 0 ?
            AbstractConfiguration.class.cast(config.config.getConfiguration(index)) // cast always succeeds, internally this returns cd.getConfiguration() which is AbstractConfiguration
            : null;


        // If the passed in configuration has a system config, add this as the very first one so
        // that system properties override still works.
        if(first != null && first.getClass() == SystemConfiguration.class) {
            cc.addConfiguration(first);
            index++;
        }
        else {
            // Otherwise, if any of the passed in configuration objects is a SystemConfiguration,
            // put that at the very beginning.
            for (AbstractConfiguration c : overrideConfigurations) {
                if (c.getClass() == SystemConfiguration.class) {
                    cc.addConfiguration(c);
                }
            }
        }

        for (AbstractConfiguration c : overrideConfigurations) {
            if (c.getClass() != SystemConfiguration.class) {
                cc.addConfiguration(c); // Skip system configuration objects, they have been added earlier.
            }
        }

        // Finally, add the existing configuration elements at lowest priority.
        while (index < config.config.getNumberOfConfigurations()) {
            final AbstractConfiguration c = AbstractConfiguration.class.cast(config.config.getConfiguration(index++));
            if (c.getClass() != SystemConfiguration.class) {
                cc.addConfiguration(c);
            }
        }

        return new Config(cc);
    }
1237164
private final CMConfigData getCMConfigData(AbstractConnectionFactoryService cfSvc, ResourceInfo refInfo) {
        final boolean trace = TraceComponent.isAnyTracingEnabled();
        if (trace && tc.isEntryEnabled())
            Tr.entry(this, tc, "getCMConfigData");

        // Defaults for direct lookup
        int auth = J2CConstants.AUTHENTICATION_APPLICATION;
        int branchCoupling = ResourceRefInfo.BRANCH_COUPLING_UNSET;
        int commitPriority = 0;
        int isolation = Connection.TRANSACTION_NONE;
        int sharingScope;
        String loginConfigName = null;
        HashMap<String, String> loginConfigProps = null;
        String resRefName = null;

        if (refInfo != null) {
            if (refInfo.getAuth() == ResourceRef.AUTH_CONTAINER)
                auth = J2CConstants.AUTHENTICATION_CONTAINER;

            branchCoupling = refInfo.getBranchCoupling();
            commitPriority = refInfo.getCommitPriority();
            isolation = refInfo.getIsolationLevel();
            loginConfigName = refInfo.getLoginConfigurationName();
            loginConfigProps = toHashMap(refInfo.getLoginPropertyList());
            resRefName = refInfo.getName();
            sharingScope = refInfo.getSharingScope();
        } else {
            if (properties != null) {
                Object enableSharingForDirectLookups = properties.get("enableSharingForDirectLookups");
                sharingScope = enableSharingForDirectLookups == null
                               || (Boolean) enableSharingForDirectLookups ? ResourceRefInfo.SHARING_SCOPE_SHAREABLE : ResourceRefInfo.SHARING_SCOPE_UNSHAREABLE;
            } else {
                sharingScope = ResourceRefInfo.SHARING_SCOPE_SHAREABLE;
            }
        }

        CMConfigData cmConfig = new CMConfigDataImpl(cfSvc.getJNDIName(), sharingScope, isolation, auth, cfSvc.getID(), loginConfigName, loginConfigProps, resRefName, commitPriority, branchCoupling, null // no mmProps
        );

        if (trace && tc.isEntryEnabled())
            Tr.exit(this, tc, "getCMConfigData", cmConfig);
        return cmConfig;
    }