1 19 package org.netbeans.modules.j2ee.sun.share.configbean; 20 21 26 public final class AppClientVersion extends J2EEBaseVersion { 27 28 30 public static final AppClientVersion APP_CLIENT_1_3 = new AppClientVersion( 31 "1.3", 1300, "1.3", 1300, DTDRegistryLink.SUN_APPCLIENT_130_DTD_PUBLIC_ID, 34 DTDRegistryLink.SUN_APPCLIENT_130_DTD_SYSTEM_ID); 35 36 38 public static final AppClientVersion APP_CLIENT_1_4 = new AppClientVersion( 39 "1.4", 1400, "1.4", 1400, DTDRegistryLink.SUN_APPCLIENT_140_DTD_PUBLIC_ID, 42 DTDRegistryLink.SUN_APPCLIENT_140_DTD_SYSTEM_ID); 43 44 46 public static final AppClientVersion APP_CLIENT_5_0 = new AppClientVersion( 47 "5.0", 5000, "5.0", 5000, DTDRegistryLink.SUN_APPCLIENT_500_DTD_PUBLIC_ID, 50 DTDRegistryLink.SUN_APPCLIENT_500_DTD_SYSTEM_ID); 51 52 53 56 57 59 private AppClientVersion(String version, int nv, String specVersion, int nsv, String pubId, String sysId) { 60 super(version, nv, specVersion, nsv, pubId, sysId); 61 } 62 63 70 public int compareTo(Object obj) { 71 AppClientVersion target = (AppClientVersion) obj; 72 return numericCompare(target); 73 } 74 75 public static AppClientVersion getAppClientVersion(String version) { 76 AppClientVersion result = APP_CLIENT_5_0; 77 78 if(APP_CLIENT_1_3.toString().equals(version)) { 79 result = APP_CLIENT_1_3; 80 } else if(APP_CLIENT_1_4.toString().equals(version)) { 81 result = APP_CLIENT_1_4; 82 } 83 84 return result; 85 } 86 } 87 | Popular Tags |