1 22 package org.jboss.deployment; 23 24 import org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeployer; 25 import org.jboss.deployers.spi.DeploymentException; 26 import org.jboss.deployers.spi.deployer.DeploymentUnit; 27 import org.jboss.metadata.WebMetaData; 28 import org.jboss.metadata.web.WebMetaDataObjectFactory; 29 import org.jboss.xb.binding.ObjectModelFactory; 30 31 38 public class WebAppParsingDeployer extends ObjectModelFactoryDeployer<WebMetaData> 39 { 40 41 private String webXmlPath = "web.xml"; 42 43 public WebAppParsingDeployer() 44 { 45 super(WebMetaData.class); 46 } 47 48 54 public String getWebXmlPath() 55 { 56 return webXmlPath; 57 } 58 65 public void setWebXmlPath(String webXmlPath) 66 { 67 this.webXmlPath = webXmlPath; 68 } 69 70 74 @Override 75 protected ObjectModelFactory getObjectModelFactory(WebMetaData root) 76 { 77 return new WebMetaDataObjectFactory(); 78 } 79 80 84 @Override 85 public void deploy(DeploymentUnit unit) throws DeploymentException 86 { 87 createMetaData(unit, webXmlPath, null); 88 } 89 90 } 91 | Popular Tags |