1 6 7 package com.quikj.application.web.talk.client; 8 9 import java.applet.*; 10 import java.util.*; 11 12 16 public class AutoEmailTranscriptInfo 17 { 18 19 20 private boolean autoEmail = false; 21 22 23 private boolean sendSelf; 24 25 26 private boolean sendOthers; 27 28 private String [] toList; 29 30 private boolean promptForTranscript = true; 31 32 33 public AutoEmailTranscriptInfo(Applet applet) 34 { 35 if (applet == null) 36 { 37 return; 38 } 39 40 String param = applet.getParameter("prompt-email-transcript"); 41 if (param != null) 42 { 43 if (param.equals("yes") == true) 44 { 45 promptForTranscript = true; 46 } 47 else if (param.equals("no") == true) 48 { 49 promptForTranscript = false; 50 } 51 } 53 54 param = applet.getParameter("auto-email-transcript"); 55 if (param == null) 56 { 57 return; 58 } 59 60 autoEmail = true; 61 62 StringTokenizer tokens = new StringTokenizer(param, ";"); 63 int num = tokens.countTokens(); 64 Vector alist = new Vector(); 65 for (int i = 0; i < num; i++) 66 { 67 String email = tokens.nextToken(); 68 if (email.equals ("@SELF") == true) 69 { 70 sendSelf = true; 71 } 72 else if (email.equals ("@OTHERS") == true) 73 { 74 sendOthers = true; 75 } 76 else 77 { 78 alist.addElement(email); 79 } 80 } 81 82 toList = new String [alist.size()]; 83 for (int i = 0; i < toList.length; i++) 84 { 85 toList[i] = (String )alist.elementAt(i); 86 } 87 } 88 89 93 public boolean isAutoEmail() 94 { 95 return this.autoEmail; 96 } 97 98 102 public void setAutoEmail(boolean autoEmail) 103 { 104 this.autoEmail = autoEmail; 105 } 106 107 111 public boolean isSendSelf() 112 { 113 return this.sendSelf; 114 } 115 116 120 public void setSendSelf(boolean sendSelf) 121 { 122 this.sendSelf = sendSelf; 123 } 124 125 129 public boolean isSendOthers() 130 { 131 return this.sendOthers; 132 } 133 134 138 public void setSendOthers(boolean sendOthers) 139 { 140 this.sendOthers = sendOthers; 141 } 142 143 147 public String [] getToList() 148 { 149 return toList; 150 } 151 152 156 public void setToList(String [] toList) 157 { 158 this.toList = toList; 159 } 160 161 165 public boolean isPromptForTranscript() 166 { 167 return promptForTranscript; 168 } 169 170 174 public void setPromptForTranscript(boolean promptForTranscript) 175 { 176 this.promptForTranscript = promptForTranscript; 177 } 178 179 } 180 | Popular Tags |