/** * Remove a parameter from the parameters object * @param name a <code>String</code> value * @since 4.1 */ public void removeParameter( final String name ) { setParameter( name, null ); }
public String setParameter(String arg0, String arg1) throws IllegalStateException { return wrappedParameters.setParameter(arg0, arg1); }
/** * Create a <code>Parameters</code> object from a <code>Properties</code> * object. * * @param properties the Properties * @return This <code>Parameters</code> instance. */ public static Parameters fromProperties( final Properties properties ) { final Parameters parameters = new Parameters(); final Enumeration names = properties.propertyNames(); while( names.hasMoreElements() ) { final String key = names.nextElement().toString(); final String value = properties.getProperty( key ); parameters.setParameter( key, value ); } return parameters; }
/** * Create a Parameters object. * The first value of each parameter is added to the Parameters object. * @return An Parameters object - if no parameters are defined this is an * empty object. */ public static Parameters getFirstParameters(SourceParameters params) { Parameters result = new Parameters(); Iterator iter = params.getParameterNames(); String parName; while( iter.hasNext() ) { parName = (String)iter.next(); result.setParameter( parName, params.getParameter( parName ) ); } return result; }
/** * Create a Parameters object. * The first value of each parameter is added to the Parameters object. * @deprecated Use {@link AvalonSourceUtil#getFirstParameters(SourceParameters)} or * {@link #getFirstParametersMap}. * @return An Parameters object - if no parameters are defined this is an * empty object. */ public Parameters getFirstParameters() { Parameters result = new Parameters(); Iterator iter = this.getParameterNames(); String parName; while( iter.hasNext() ) { parName = (String)iter.next(); result.setParameter( parName, this.getParameter( parName ) ); } return result; }
/** * Merge parameters from another <code>Parameters</code> instance * into this. * * @param other the other Parameters * @return This <code>Parameters</code> instance. */ public Parameters merge( final Parameters other ) { checkWriteable(); final String[] names = other.getNames(); for( int i = 0; i < names.length; i++ ) { final String name = names[ i ]; String value = null; try { value = other.getParameter( name ); } catch( final ParameterException pe ) { value = null; } setParameter( name, value ); } return this; }
String name = (String) names.next(); if (name.startsWith("cocoon:cache")) { params.setParameter(name.substring("cocoon:".length()), sp.getParameter(name)); remainingParameters.removeParameter(name);
if (label.equals("value")) value = (String)stack.pop(); if (key != null && value != null) { this.configurationParameters.setParameter(key, value); key = null; value = null;
params.setParameter( name, value );
params.setParameter(SourceRefresher.PARAM_CACHE_INTERVAL, String.valueOf(source.getExpiration())); if(this.refresher == null) {
parameters.setParameter("step", currentStepAndPage.toString()); stepUIClass.setup(resolver, objectModel, src, parameters);