1 23 package org.hammurapi; 24 25 import java.util.ArrayList ; 26 import java.util.Collection ; 27 import java.util.Iterator ; 28 29 import com.pavelvlasov.config.ConfigurationException; 30 import com.pavelvlasov.config.Parameterizable; 31 32 37 public class ParameterizableInspectorBase extends InspectorBase implements Parameterizable { 38 private Collection configurators=new ArrayList (); 39 40 44 protected void addConfigurator(Parameterizable configurator) { 45 configurators.add(configurator); 46 } 47 48 49 55 public boolean setParameter(String name, Object value) throws ConfigurationException { 56 Iterator it=configurators.iterator(); 57 while (it.hasNext()) { 58 if (((Parameterizable) it.next()).setParameter(name, value)) { 59 return true; 60 } 61 } 62 return false; 63 } 64 } 65 | Popular Tags |