本文整理了Java中org.apache.avalon.framework.configuration.Configuration.getValue()
方法的一些代码示例,展示了Configuration.getValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Configuration.getValue()
方法的具体详情如下:
包路径:org.apache.avalon.framework.configuration.Configuration
类名称:Configuration
方法名:getValue
[英]Return the String
value of the node.
[中]返回节点的String
值。
代码示例来源:origin: plutext/docx4j
try {
fontManager.setFontBaseURL(
cfg.getChild("font-base").getValue(null));
} catch (MalformedURLException mfue) {
LogUtil.handleException(log, mfue, true);
代码示例来源:origin: org.apache.cocoon/cocoon-sitemap-impl
/**
* Splits the value of a Configuration in a Collection of Strings. Splitting
* occurs at space characters (incl. line breaks) and comma.
*
* @return a collection of Strings, or null if <code>config</code> has no value.
*/
private Collection getStringCollection(Configuration config) {
String s = config.getValue(null);
return (s == null) ? null : Arrays.asList(StringUtils.split(s, ", \t\n\r"));
}
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-cache
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration config) throws ConfigurationException
{
this.cacheCheckFrequency = config.getChild("cacheCheckFrequency")
.getValueAsLong(DEFAULT_CACHE_CHECK_FREQUENCY);
this.cacheName = config.getChild("cacheName").getValue(DEFAULT_CACHE_NAME);
this.configFile = config.getChild("configurationFile").getValue(null);
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-yaafi
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration) throws ConfigurationException {
super.configure(configuration);
this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH);
this.toStringBuilderClassName = configuration.getChild("toStringBuilderClass")
.getValue(ArgumentToStringBuilderImpl.class.getName());
this.monitorAllExceptions = configuration.getChild("monitorAllExceptions").getValueAsBoolean(true);
}
代码示例来源:origin: org.apache.turbine/fulcrum-yaafi
/**
* @return Returns the componentConfigurationPropertiesLocation.
*/
protected String getLocation()
{
return configuration.getChild("location").getValue(COMPONENT_CONFIG_PROPERTIES_VALUE );
}
代码示例来源:origin: org.apache.turbine/fulcrum-yaafi
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration) throws ConfigurationException
{
super.configure(configuration);
this.maxArgLength = configuration.getChild("maxArgLength").getValueAsInteger(MAX_ARG_LENGTH);
this.toStringBuilderClassName = configuration.getChild("toStringBuilderClass").getValue(ArgumentToStringBuilderImpl.class.getName());
this.monitorAllExceptions = configuration.getChild("monitorAllExceptions").getValueAsBoolean(true);
}
代码示例来源:origin: org.apache.cocoon/cocoon-core
public void configure(Configuration configuration) throws ConfigurationException {
/* Read configuration nodes for recursive, parallel, recursive-parallel */
this.defaultRecursive = configuration.getChild("recursive").getValueAsBoolean(false);
this.defaultParallel = configuration.getChild("parallel").getValueAsBoolean(false);
this.defaultRecursiveParallel = configuration.getChild("recursive-parallel").getValueAsBoolean(false);
/* Read configuration node for thread pool name */
this.threadPool = configuration.getChild("thread-pool").getValue("default");
this.defaultKey = configuration.getChild("key").getValue(null);
}
代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-logger
/**
* Helper method to obtain the subject line to use from the given
* configuration object.
*
* @param config a <code>Configuration</code> instance
* @return subject line
*/
private String getSubject( Configuration config )
throws ConfigurationException
{
return config.getChild( "subject" ).getValue();
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-security-api
/**
* Avalon component lifecycle method
*/
@Override
public void configure(Configuration conf) throws ConfigurationException
{
algorithm = conf.getChild("algorithm").getValue();
cipher = conf.getChild("cipher").getValue();
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-yaafi
/**
* @return Returns the componentConfigurationPropertiesLocation.
*/
protected String getLocation()
{
return configuration.getChild("location").getValue(COMPONENT_CONFIG_PROPERTIES_VALUE );
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-security-api
/**
* Avalon Service lifecycle method
*/
public void configure(Configuration conf) throws ConfigurationException
{
className = conf.getChild(CLASS_NAME_KEY).getValue();
}
/**
代码示例来源:origin: org.apache.cocoon/cocoon-flowscript-impl
public void configure(Configuration config) throws ConfigurationException {
super.configure(config);
String loadOnStartup = config.getChild("load-on-startup").getValue(null);
if (loadOnStartup != null) {
register(loadOnStartup);
}
String debugger = config.getChild("debugger").getValue(null);
enableDebugger = "enabled".equalsIgnoreCase(debugger);
}
代码示例来源:origin: org.apache.cocoon/cocoon-pipeline-components
/**
* Get the current <code>Configuration</code> instance used by this
* <code>Configurable</code>.
*/
public void configure(Configuration configuration)
throws ConfigurationException {
super.configure(configuration);
this.configuredSerializerName = configuration.getChild(SERIALIZER_ATTRIBUTE).getValue(DEFAULT_SERIALIZER);
}
代码示例来源:origin: org.apache.fulcrum/fulcrum-yaafi
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration) throws ConfigurationException {
Configuration[] interceptorConfigList = configuration.getChild("interceptors").getChildren("interceptor");
this.defaultInterceptorList = new String[interceptorConfigList.length];
for (int i = 0; i < interceptorConfigList.length; i++) {
this.defaultInterceptorList[i] = interceptorConfigList[i].getValue();
}
}
代码示例来源:origin: org.apache.cocoon/cocoon-sitemap-impl
public void configure(Configuration config) throws ConfigurationException {
super.configure(config);
this.nameAttr = config.getChild("name-attribute").getValue("name");
}
代码示例来源:origin: org.apache.turbine/fulcrum-yaafi
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
*/
public void configure(Configuration configuration) throws ConfigurationException
{
Configuration[] interceptorConfigList = configuration.getChild("interceptors").getChildren("interceptor");
this.defaultInterceptorList = new String[interceptorConfigList.length];
for( int i=0; i<interceptorConfigList.length; i++ )
{
this.defaultInterceptorList[i] = interceptorConfigList[i].getValue();
}
}
代码示例来源:origin: org.apache.excalibur.containerkit/excalibur-logger
/**
* Create a LogTarget based on a Configuration
*/
public final LogTarget createTarget( final Configuration configuration )
throws ConfigurationException
{
final Configuration confFilename = configuration.getChild( "filename" );
final String filename = getFilename( confFilename.getValue() );
final File file = new File( filename );
final LogTarget logtarget = createTarget( file, configuration );
return logtarget;
}
代码示例来源:origin: org.apache.cocoon/cocoon-sitemap-impl
/**
* @see org.apache.cocoon.components.modules.input.AbstractInputModule#getAttribute(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)
*/
public Object getAttribute(String name, Configuration modeConf, Map objectModel)
throws ConfigurationException {
Object contextObj = getContextObject(modeConf, objectModel);
if (modeConf != null) {
name = modeConf.getChild("parameter").getValue(this.parameter != null ? this.parameter : name);
}
return JXPathHelper.getAttributeValue(name, modeConf, this.configuration, contextObj);
}
代码示例来源:origin: org.apache.cocoon/cocoon-sitemap-impl
/**
* @see org.apache.cocoon.components.modules.input.AbstractInputModule#getAttributeValues(java.lang.String, org.apache.avalon.framework.configuration.Configuration, java.util.Map)
*/
public Object[] getAttributeValues(String name, Configuration modeConf, Map objectModel)
throws ConfigurationException {
Object contextObj = getContextObject(modeConf, objectModel);
if (modeConf != null) {
name = modeConf.getChild("parameter").getValue(this.parameter != null ? this.parameter : name);
}
return JXPathHelper.getAttributeValues(name, modeConf, this.configuration, contextObj);
}
代码示例来源:origin: net.sf.barcode4j/barcode4j
/**
* @see org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
*/
public void configure(Configuration cfg) throws ConfigurationException {
//Module width (MUST ALWAYS BE FIRST BECAUSE QUIET ZONE MAY DEPEND ON IT)
Length mw = new Length(cfg.getChild("module-width").getValue("0.33mm"), "mm");
getUPCEANBean().setModuleWidth(mw.getValueAsMillimeter());
super.configure(cfg);
//Checksum mode
getUPCEANBean().setChecksumMode(ChecksumMode.byName(
cfg.getChild("checksum").getValue(ChecksumMode.CP_AUTO.getName())));
}
内容来源于网络,如有侵权,请联系作者删除!