1 19 20 package gui.updatecenterwizard.settings; 21 22 import java.util.StringTokenizer ; 23 import java.util.Vector ; 24 25 29 30 public class CatalogDataValues { 31 32 private String ucName; 33 private String ucFile; 34 private String proxyHost; 35 private String proxyPort; 36 private Vector modules; 37 38 39 public CatalogDataValues() { 40 this("", "", "", "", ""); 41 } 42 43 44 public CatalogDataValues(String ucName, String ucFile, String proxyHost, String proxyPort, String modules) { 45 this(ucName, ucFile, proxyHost, proxyPort, modules2Vector(modules)); 46 } 47 48 public CatalogDataValues(String ucName, String ucFile, String proxyHost, String proxyPort, Vector modules) { 49 setUcName(ucName); 50 setUcFile(ucFile); 51 setProxyHost(proxyHost); 52 setProxyPort(proxyPort); 53 setModules(modules); 54 } 55 56 public String getUcName() { 57 return ucName; 58 } 59 60 public void setUcName(String ucName) { 61 this.ucName = ucName; 62 } 63 64 public String getUcFile() { 65 return ucFile; 66 } 67 68 public void setUcFile(String ucFile) { 69 this.ucFile = ucFile; 70 } 71 72 public String getProxyHost() { 73 return proxyHost; 74 } 75 76 public void setProxyHost(String proxyHost) { 77 this.proxyHost = proxyHost; 78 } 79 80 public String getProxyPort() { 81 return proxyPort; 82 } 83 84 public void setProxyPort(String proxyPort) { 85 this.proxyPort = proxyPort; 86 } 87 88 public Vector getModules() { 89 return modules; 90 } 91 92 public void setModules(String modules) { 93 setModules(modules2Vector(modules)); 94 } 95 public void setModules(Vector modules) { 96 this.modules = modules; 97 } 98 99 public static Vector modules2Vector(String modules){ 100 Vector v = new Vector (); 101 StringTokenizer tokenizer = new StringTokenizer (modules, "|"); 102 while(tokenizer.hasMoreTokens()){ 103 v.addElement(tokenizer.nextToken()); 104 } 105 return v; 106 } 107 public void printValues(){ 108 System.out.println(ucName); 109 System.out.println(ucFile); 110 System.out.println(proxyHost); 111 System.out.println(proxyPort); 112 System.out.println(modules); 113 114 } 115 } 116 | Popular Tags |