1 5 package xdoclet.modules.orion.ejb; 6 7 import xdoclet.modules.ejb.dd.AbstractEjbDeploymentDescriptorSubTask; 8 9 27 public class OrionSubTask extends AbstractEjbDeploymentDescriptorSubTask 28 { 29 private final static String ORION_DD_FILE_NAME = "orion-ejb-jar.xml"; 30 31 private final static String ORION_DD_PUBLICID = "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN"; 32 33 private final static String ORION_DD_SYSTEMID = "http://www.orionserver.com/dtds/orion-ejb-jar.dtd"; 34 35 private final static String ORION_DTD_FILE_NAME = "resources/orion-ejb-jar.dtd"; 36 37 private static String DEFAULT_TEMPLATE_FILE = "resources/orion.xdt"; 38 39 private String version = OrionVersionTypes.VERSION_1_6_0; 40 41 44 public OrionSubTask() 45 { 46 setTemplateURL(getClass().getResource(DEFAULT_TEMPLATE_FILE)); 47 setDestinationFile(ORION_DD_FILE_NAME); 48 49 setPublicId(ORION_DD_PUBLICID); 50 setSystemId(ORION_DD_SYSTEMID); 51 setDtdURL(getClass().getResource(ORION_DTD_FILE_NAME)); 52 } 53 54 59 public String getVersion() 60 { 61 return this.version; 62 } 63 64 69 public void setVersion(OrionVersionTypes version) 70 { 71 this.version = version.getValue(); 72 } 73 74 78 public static class OrionVersionTypes extends org.apache.tools.ant.types.EnumeratedAttribute 79 { 80 public final static String VERSION_1_5_0 = "1.5.0"; 81 public final static String VERSION_1_5_1 = "1.5.1"; 82 public final static String VERSION_1_5_2 = "1.5.2"; 83 public final static String VERSION_1_5_3 = "1.5.3"; 84 public final static String VERSION_1_5_4 = "1.5.4"; 85 public final static String VERSION_1_6_0 = "1.6.0"; 86 public final static String VERSION_2_0 = "2.0"; 87 88 93 public String [] getValues() 94 { 95 return (new String []{VERSION_1_5_0, VERSION_1_5_1, VERSION_1_5_2, VERSION_1_5_3, VERSION_1_5_4, VERSION_1_6_0, VERSION_2_0}); 96 } 97 } 98 } 99 | Popular Tags |