1 19 24 25 package org.netbeans.modules.j2ee.sun.share.configbean; 26 27 32 public final class EjbJarVersion extends J2EEBaseVersion { 33 34 36 public static final EjbJarVersion EJBJAR_2_0 = new EjbJarVersion( 37 "2.0", 2000, "1.3", 1300, DTDRegistryLink.SUN_EJBJAR_200_DTD_PUBLIC_ID, 40 DTDRegistryLink.SUN_EJBJAR_200_DTD_SYSTEM_ID); 41 42 44 public static final EjbJarVersion EJBJAR_2_1 = new EjbJarVersion( 45 "2.1", 2101, "1.4", 1400, DTDRegistryLink.SUN_EJBJAR_211_DTD_PUBLIC_ID, 48 DTDRegistryLink.SUN_EJBJAR_211_DTD_SYSTEM_ID); 49 50 52 public static final EjbJarVersion EJBJAR_3_0 = new EjbJarVersion( 53 "3.0", 3000, "5.0", 5000, DTDRegistryLink.SUN_EJBJAR_300_DTD_PUBLIC_ID, 56 DTDRegistryLink.SUN_EJBJAR_300_DTD_SYSTEM_ID); 57 58 61 62 64 private EjbJarVersion(String moduleVersion, int nv, String specVersion, int nsv, String pubId, String sysId) { 65 super(moduleVersion, nv, specVersion, nsv, pubId, sysId); 66 } 67 68 75 public int compareTo(Object obj) { 76 EjbJarVersion target = (EjbJarVersion) obj; 77 return numericCompare(target); 78 } 79 80 public static EjbJarVersion getEjbJarVersion(String version) { 81 EjbJarVersion result = null; 82 83 if(EJBJAR_2_0.toString().equals(version)) { 84 result = EJBJAR_2_0; 85 } else if(EJBJAR_2_1.toString().equals(version)) { 86 result = EJBJAR_2_1; 87 } else if(EJBJAR_3_0.toString().equals(version)) { 88 result = EJBJAR_3_0; 89 } 90 91 return result; 92 } 93 } 94 | Popular Tags |