1 17 18 package org.apache.geronimo.deployment; 19 20 import java.util.Collection ; 21 import java.util.Iterator ; 22 23 import javax.xml.namespace.QName ; 24 25 import org.apache.geronimo.common.DeploymentException; 26 import org.apache.geronimo.kernel.repository.Environment; 27 import org.apache.xmlbeans.XmlObject; 28 29 32 public class NamespaceDrivenBuilderCollection extends AbstractBuilderCollection { 33 34 public NamespaceDrivenBuilderCollection(Collection builders, final QName basePlanElementName) { 35 super(builders, basePlanElementName); 36 } 37 38 public void buildEnvironment(XmlObject container, Environment environment) throws DeploymentException { 39 for (Iterator iterator = builders.iterator(); iterator.hasNext();) { 40 NamespaceDrivenBuilder builder = (NamespaceDrivenBuilder) iterator.next(); 41 builder.buildEnvironment(container, environment); 42 } 43 } 44 45 public void build(XmlObject container, DeploymentContext applicationContext, DeploymentContext moduleContext) throws DeploymentException { 46 for (Iterator iterator = builders.iterator(); iterator.hasNext();) { 47 NamespaceDrivenBuilder builder = (NamespaceDrivenBuilder) iterator.next(); 48 builder.build(container, applicationContext, moduleContext); 49 } 50 } 51 52 } 53 | Popular Tags |