1 14 15 package org.quickserver.util.xmlreader; 16 17 34 public class KeyStoreInfo implements java.io.Serializable { 35 private String storeFile = "NONE"; 36 private String storePassword = null; 37 private String keyPassword = null; 38 39 46 public void setStoreFile(String storeFile) { 47 if(storeFile!=null && storeFile.trim().length()!=0) 48 this.storeFile = storeFile; 49 } 50 55 public String getStoreFile() { 56 return storeFile; 57 } 58 59 65 public void setStorePassword(String storePassword) { 66 if(storePassword!=null) 67 this.storePassword = storePassword; 68 } 69 73 public String getStorePassword() { 74 return storePassword; 75 } 76 77 83 public void setKeyPassword(String keyPassword) { 84 if(keyPassword!=null) 85 this.keyPassword = keyPassword; 86 } 87 91 public String getKeyPassword() { 92 return keyPassword; 93 } 94 95 98 public String toXML(String pad) { 99 if(pad==null) pad=""; 100 StringBuffer sb = new StringBuffer (); 101 sb.append(pad+"<key-store-info>\n"); 102 sb.append(pad+"\t<store-file>"+getStoreFile()+"</store-file>\n"); 103 if(getStorePassword()!=null) 104 sb.append(pad+"\t<store-password>"+getStorePassword()+"</store-password>\n"); 105 else 106 sb.append(pad+"\t</store-password>\n"); 107 if(getKeyPassword()!=null) 108 sb.append(pad+"\t<key-password>"+getKeyPassword()+"</key-password>\n"); 109 else 110 sb.append(pad+"\t</key-password>\n"); 111 sb.append(pad+"</key-store-info>\n"); 112 return sb.toString(); 113 } 114 } 115 | Popular Tags |