1 17 18 package org.apache.geronimo.j2ee.deployment; 19 20 import java.util.Collection ; 21 import java.util.Iterator ; 22 import java.util.Map ; 23 24 import javax.xml.namespace.QName ; 25 26 import org.apache.geronimo.common.DeploymentException; 27 import org.apache.geronimo.deployment.AbstractBuilderCollection; 28 import org.apache.geronimo.kernel.config.Configuration; 29 import org.apache.geronimo.kernel.repository.Environment; 30 import org.apache.xmlbeans.XmlObject; 31 32 35 public class NamingBuilderCollection extends AbstractBuilderCollection implements NamingBuilder { 36 37 public NamingBuilderCollection(Collection builders, final QName basePlanElementName) { 38 super(builders, basePlanElementName); 39 } 40 41 public void buildEnvironment(XmlObject specDD, XmlObject plan, Environment environment) throws DeploymentException { 42 for (Iterator iterator = builders.iterator(); iterator.hasNext();) { 43 NamingBuilder namingBuilder = (NamingBuilder) iterator.next(); 44 namingBuilder.buildEnvironment(specDD, plan, environment); 45 } 46 } 47 48 public void initContext(XmlObject specDD, XmlObject plan, Configuration localConfiguration, Configuration remoteConfiguration, Module module) throws DeploymentException { 49 for (Iterator iterator = builders.iterator(); iterator.hasNext();) { 50 NamingBuilder namingBuilder = (NamingBuilder) iterator.next(); 51 namingBuilder.initContext(specDD, plan, localConfiguration, remoteConfiguration, module); 52 } 53 } 54 55 public void buildNaming(XmlObject specDD, XmlObject plan, Configuration localContext, Configuration remoteContext, Module module, Map componentContext) throws DeploymentException { 56 for (Iterator iterator = builders.iterator(); iterator.hasNext();) { 57 NamingBuilder namingBuilder = (NamingBuilder) iterator.next(); 58 namingBuilder.buildNaming(specDD, plan, localContext, remoteContext, module, componentContext); 59 } 60 } 61 62 } 63 | Popular Tags |