try { fontManager.setFontBaseURL( cfg.getChild("font-base").getValue(null)); } catch (MalformedURLException mfue) { LogUtil.handleException(log, mfue, true);
/** * 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")); } }
/** * @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); }
/** * @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); }
/** * @return Returns the componentConfigurationPropertiesLocation. */ protected String getLocation() { return configuration.getChild("location").getValue(COMPONENT_CONFIG_PROPERTIES_VALUE ); }
/** * @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); }
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); }
/** * 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(); }
/** * @return Returns the componentConfigurationPropertiesLocation. */ protected String getLocation() { return configuration.getChild("location").getValue(COMPONENT_CONFIG_PROPERTIES_VALUE ); }
/** * Avalon Service lifecycle method */ public void configure(Configuration conf) throws ConfigurationException { className = conf.getChild(CLASS_NAME_KEY).getValue(); } /**
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); }
/** * 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); }
/** * @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(); } }
public void configure(Configuration config) throws ConfigurationException { super.configure(config); this.nameAttr = config.getChild("name-attribute").getValue("name"); }
/** * @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(); } }
/** * 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; }
/** * @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); }
/** * @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); }
/** * @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()))); }