1 16 package org.apache.cocoon.portal.components.modules.input; 17 18 import java.util.Collections ; 19 import java.util.Iterator ; 20 import java.util.Map ; 21 22 import org.apache.avalon.framework.configuration.Configuration; 23 import org.apache.avalon.framework.configuration.ConfigurationException; 24 import org.apache.avalon.framework.service.ServiceException; 25 import org.apache.avalon.framework.service.ServiceManager; 26 import org.apache.avalon.framework.service.Serviceable; 27 import org.apache.avalon.framework.thread.ThreadSafe; 28 import org.apache.cocoon.components.modules.input.InputModule; 29 30 33 public abstract class AbstractModule 34 implements InputModule, Serviceable, ThreadSafe { 35 36 39 protected ServiceManager manager; 40 41 44 public void service(ServiceManager manager) throws ServiceException { 45 this.manager = manager; 46 } 47 48 51 public Iterator getAttributeNames(Configuration modeConf, Map objectModel) { 52 return Collections.EMPTY_LIST.iterator(); 53 } 54 55 58 public Object [] getAttributeValues(String name, Configuration modeConf, Map objectModel) 59 throws ConfigurationException { 60 Object [] result = new Object [1]; 61 result[0] = this.getAttribute(name, modeConf, objectModel); 62 return result; 63 } 64 } 65 | Popular Tags |