List of usage examples for org.apache.commons.configuration.beanutils XMLBeanDeclaration XMLBeanDeclaration
public XMLBeanDeclaration(HierarchicalConfiguration config)
XMLBeanDeclaration
and initializes it from the given configuration. From source file:org.ssh.comm.conf.CustomConfigurationBuilder.java
/** * Registers providers defined in the configuration. * // w ww .j a v a 2 s .c o m * @throws ConfigurationException * if an error occurs */ protected void registerConfiguredProviders() throws ConfigurationException { List<HierarchicalConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_PROVIDERS); for (HierarchicalConfiguration config : nodes) { XMLBeanDeclaration decl = new XMLBeanDeclaration(config); String key = config.getString(KEY_PROVIDER_KEY); addConfigurationProvider(key, (ConfigurationProvider) BeanHelper.createBean(decl)); } }
From source file:org.ssh.comm.conf.CustomConfigurationBuilder.java
/** * Registers StrLookups defined in the configuration. * /*from w w w . ja va 2s. c o m*/ * @throws ConfigurationException * if an error occurs */ protected void registerConfiguredLookups() throws ConfigurationException { List<HierarchicalConfiguration> nodes = configurationsAt(KEY_CONFIGURATION_LOOKUPS); for (HierarchicalConfiguration config : nodes) { XMLBeanDeclaration decl = new XMLBeanDeclaration(config); String key = config.getString(KEY_LOOKUP_KEY); StrLookup lookup = (StrLookup) BeanHelper.createBean(decl); BeanHelper.setProperty(lookup, "configuration", this); ConfigurationInterpolator.registerGlobalLookup(key, lookup); this.getInterpolator().registerLookup(key, lookup); } }
From source file:org.ssh.comm.conf.CustomConfigurationBuilder.java
protected void initFileSystem() throws ConfigurationException { if (getMaxIndex(FILE_SYSTEM) == 0) { HierarchicalConfiguration config = configurationAt(FILE_SYSTEM); XMLBeanDeclaration decl = new XMLBeanDeclaration(config); setFileSystem((FileSystem) BeanHelper.createBean(decl)); }//from w w w .java2 s .c o m }