1 5 package xdoclet.modules.ibm.websphere.ejb; 6 7 import xdoclet.XDocletException; 8 9 import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask; 10 11 32 public class WebSphereSubTask extends AbstractEjbDeploymentDescriptorSubTask 33 { 34 private static String WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE = "resources/ibm-ejb-jar-bnd_xmi.xdt"; 35 36 private static String WEBSPHERE_DD_BND_FILE_NAME = "ibm-ejb-jar-bnd.xmi"; 37 38 private static String WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE = "resources/ibm-ejb-jar-ext_xmi.xdt"; 39 40 private static String WEBSPHERE_DD_EXT_FILE_NAME = "ibm-ejb-jar-ext.xmi"; 41 42 private static String WEBSPHERE_SCHEMA_TEMPLATE_FILE = "resources/Schema_dbxmi.xdt"; 43 44 private static String WEBSPHERE_DD_SCHEMA_FILE_NAME = "Schema.dbxmi"; 45 46 49 private String datasource; 50 51 54 private String currentBackendId; 55 56 public WebSphereSubTask() 57 { 58 setUseIds(true); 59 } 60 61 66 public String getDatasource() 67 { 68 return datasource; 69 } 70 71 76 public String getCurrentBackendId() 77 { 78 return currentBackendId; 79 } 80 81 87 public void setDatasource(String datasource) 88 { 89 this.datasource = datasource; 90 } 91 92 98 public void setCurrentBackendId(String backendId) 99 { 100 this.currentBackendId = backendId; 101 } 102 103 108 public void validateOptions() throws XDocletException 109 { 110 } 114 115 120 public void execute() throws XDocletException 121 { 122 setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_BND_TEMPLATE_FILE)); 123 setDestinationFile(WEBSPHERE_DD_BND_FILE_NAME); 124 startProcess(); 125 126 setTemplateURL(getClass().getResource(WEBSPHERE_DEFAULT_EXT_TEMPLATE_FILE)); 127 setDestinationFile(WEBSPHERE_DD_EXT_FILE_NAME); 128 startProcess(); 129 130 133 if (atLeastOneCmpEntityBeanExists()) { 134 setTemplateURL(getClass().getResource(WEBSPHERE_SCHEMA_TEMPLATE_FILE)); 135 setDestinationFile(WEBSPHERE_DD_SCHEMA_FILE_NAME); 136 startProcess(); 137 } 138 } 139 140 145 protected void engineStarted() throws XDocletException 146 { 147 } 148 } 149 | Popular Tags |