1 16 package org.apache.cocoon.acting; 17 18 import org.apache.avalon.framework.configuration.Configurable; 19 import org.apache.avalon.framework.configuration.Configuration; 20 import org.apache.avalon.framework.configuration.ConfigurationException; 21 import org.apache.cocoon.util.HashMap; 22 23 30 public abstract class AbstractConfigurableAction extends AbstractAction implements Configurable { 31 32 36 protected HashMap settings = null; 37 38 48 public void configure(Configuration conf) throws ConfigurationException { 49 Configuration[] parameters = conf.getChildren(); 50 this.settings = new HashMap(parameters.length); 51 for (int i = 0; i < parameters.length; i++) { 52 String key = parameters[i].getName(); 53 String val = parameters[i].getValue(null); 54 this.settings.put(key, val); 55 } 56 } 57 } 58 | Popular Tags |