1 19 20 package org.netbeans.tests.j2eeserver.plugin.jsr88; 21 22 import java.io.*; 23 import java.util.Collection ; 24 import java.util.HashSet ; 25 import javax.enterprise.deploy.model.*; 26 import javax.enterprise.deploy.shared.*; 27 import javax.enterprise.deploy.spi.*; 28 import javax.enterprise.deploy.spi.exceptions.*; 29 30 31 35 public class DepConfig implements DeploymentConfiguration { 36 37 DeployableObject dobj; 38 DepManager manager; 39 Collection beans = new HashSet (); 40 41 42 public DepConfig(DeployableObject dobj, DepManager manager) { 43 this.dobj = dobj; this.manager = manager; 44 } 45 46 public DConfigBeanRoot getDConfigBeanRoot(DDBeanRoot bean) throws ConfigurationException { 47 ModuleType type = bean.getType(); 48 if(type == ModuleType.EAR) { 49 EarConfigBean ret = new EarConfigBean(bean, this); 50 beans.add(ret); 51 return ret; 52 } 53 if(type == ModuleType.EJB) { 54 EjbModuleConfigBean ret = new EjbModuleConfigBean(bean, 55 this); 56 beans.add(ret); 57 return ret; 58 } 59 if(type == ModuleType.WAR) { 60 WebModuleConfigBean ret = new WebModuleConfigBean(bean, 61 this); 62 beans.add(ret); 63 return ret; 64 } 65 return null; 66 } 67 68 public DeployableObject getDeployableObject() { 69 return dobj; 70 } 71 72 public void removeDConfigBean(DConfigBeanRoot dConfigBeanRoot) throws BeanNotFoundException { 73 } 74 75 public void restore(InputStream inputStream) throws ConfigurationException { 76 } 77 78 public DConfigBeanRoot restoreDConfigBean(InputStream inputStream, DDBeanRoot dDBeanRoot) throws ConfigurationException { 79 throw new ConfigurationException(); 80 } 81 82 public void save(OutputStream outputStream) throws ConfigurationException { 83 } 84 85 public void saveDConfigBean(OutputStream outputStream, DConfigBeanRoot dConfigBeanRoot) throws ConfigurationException { 86 } 87 88 } 89 | Popular Tags |