1 6 7 package com.quikj.application.web.talk.jspbeans; 8 9 import javax.servlet.http.*; 10 import javax.servlet.jsp.*; 11 import java.io.*; 12 13 17 public class ChatUnregisteredAppletTag extends javax.servlet.jsp.tagext.TagSupport 18 { 19 20 21 private String clientType = "JAVA"; 22 23 24 private String width = "95"; 25 26 27 private String height = "65"; 28 29 30 private String port = "8087"; 31 32 33 private String plugin = "2"; 34 35 36 private String codebase; 37 38 39 private String image = "/aceapp/icons/chat.jpg"; 40 41 42 private String button = "QUIK"; 43 44 45 private String called; 46 47 48 private String info = "no"; 49 50 51 private String buzz = "/aceapp/audio/doorbell.au"; 52 53 54 private String chime = "/aceapp/audio/chime.au"; 55 56 57 private String openOnInit = "no"; 58 59 60 private String language = "English"; 61 62 63 private String caption = "Ace Operator Contact Center"; 64 65 66 private String logo = "/aceapp/icons/chat2.jpg"; 67 68 69 private String displaySessionInfo = "yes"; 70 71 private String allowSendBuzz = "yes"; 72 73 private String allowSendWebPage = "yes"; 74 75 76 77 public ChatUnregisteredAppletTag() 78 { 79 } 80 81 public int doStartTag() 82 { 83 try 84 { 85 JspWriter out = pageContext.getOut(); 86 HttpServletRequest request = (HttpServletRequest)pageContext.getRequest(); 87 String context = request.getContextPath(); 88 ContactCenterCustomerProperty customer 89 = (ContactCenterCustomerProperty)request.getAttribute("customerProperty"); 90 ContactCenterUnrestrictedAccessForm form 91 = (ContactCenterUnrestrictedAccessForm)request.getAttribute("formBean"); 92 93 out.println("<applet" 94 + " archive=\"" 95 + context + "/aceapp/applets/TalkClient.jar," 96 + context + "/aceapp/applets/AceClient.jar," 97 + context + "/aceapp/applets/AceClientBeans.jar," 98 + context + "/aceapp/applets/PluginAppTalkMessaging.jar," 99 + context + "/aceapp/applets/nanoxml-2.2.1.jar," 100 + context + "/aceapp/applets/jdes.jar," 101 + context + "/aceapp/applets/MessageBoxClient.jar," 102 + context + "/aceapp/applets/TalkWhiteBoardApp.jar," 103 + context + "/aceapp/applets/TalkTextBoardApp.jar\""); 104 105 out.println (" code=\"com.quikj.application.web.talk.client.TalkApplet.class\""); 106 out.println (" width=\"" + width 107 + "\" height=\"" + height 108 + "\" name=\"chat_applet\""); 109 110 if (codebase != null) 111 { 112 out.println (" codebase=\"" + codebase + "\""); 113 } 114 115 if (clientType.equals("HTML") == true) 116 { 117 out.println (" MAYSCRIPT"); 118 } 119 out.println (">"); 120 121 out.println ("<param name=\"port\" value=\"" + port + "\">"); 122 out.println ("<param name=\"plugin\" value=\"" + plugin + "\">"); 123 124 if (image.length() > 0) 125 { 126 if (image.startsWith("/") == true) 127 { 128 image = context + image; 129 } 130 131 out.println("<param name=\"image\" value=\"" + image + "\">"); 132 } 133 134 if (button.length() > 0) 135 { 136 out.println ("<param name=\"button\" value=\"" + button + "\">"); 137 } 138 139 out.println ("<param name=\"unregistered\" value=\"yes\">"); 140 141 if ((called.equals("@config") == true) && (customer != null)) 142 { 143 called = customer.getOperator(); 144 } 145 out.println("<param name=\"called\" value=\"" 146 + called + "\">"); 147 148 if ((info.equals("@config") == true) && (form != null)) 149 { 150 info = form.getInfo(); 151 } 152 out.println("<param name=\"info\" value=\"" + 153 info + "\">"); 154 155 if (buzz.startsWith("/") == true) 156 { 157 buzz = context + buzz; 158 } 159 out.println ("<param name=\"buzz\" value=\"" 160 + buzz + "\">"); 161 162 if (chime.startsWith("/") == true) 163 { 164 chime = context + chime; 165 } 166 out.println ("<param name=\"chime\" value=\"" 167 + chime + "\">"); 168 169 if (clientType.equals("HTML") == true) 170 { 171 openOnInit="yes"; 172 } 173 out.println ("<param name=\"open-on-init\" value=\"" 174 + openOnInit + "\">"); 175 176 177 if ((language.equals("@config") == true) && (customer != null)) 178 { 179 language = customer.getLanguage(); 180 } 181 out.println ("<param name=\"language\" value=\"" 182 + language + "\">"); 183 184 out.println("<param name=\"caption\" value=\"" 185 + caption + "\">"); 186 187 if (logo.startsWith("/") == true) 188 { 189 logo = context + logo; 190 } 191 out.println ("<param name=\"logo\" value=\"" 192 + logo + "\">"); 193 194 out.println("<param name=\"display-session-info\" value=\"" 195 + displaySessionInfo + "\">"); 196 197 out.println("<param name=\"allow-send-buzz\" value=\"" 198 + allowSendBuzz + "\">"); 199 200 out.println("<param name=\"allow-send-webpage\" value=\"" 201 + allowSendWebPage + "\">"); 202 203 out.println ("<param name=\"client-type\" value=\"" 204 + clientType + "\">"); 205 206 } 207 catch (IOException ex) 208 { 209 return SKIP_PAGE; 210 } 211 212 return EVAL_BODY_INCLUDE; 213 } 214 215 public int doEndTag() 216 { 217 try 218 { 219 JspWriter out = pageContext.getOut(); 220 out.println ("</applet>"); 221 } 222 catch (IOException ex) 223 { 224 return SKIP_PAGE; 225 } 226 return EVAL_PAGE; 227 } 228 229 233 public String getClientType() 234 { 235 return this.clientType; 236 } 237 238 242 public void setClientType(String clientType) 243 { 244 this.clientType = clientType; 245 } 246 247 251 public String getWidth() 252 { 253 return this.width; 254 } 255 256 260 public void setWidth(String width) 261 { 262 this.width = width; 263 } 264 265 269 public String getHeight() 270 { 271 return this.height; 272 } 273 274 278 public void setHeight(String height) 279 { 280 this.height = height; 281 } 282 283 287 public String getPort() 288 { 289 return this.port; 290 } 291 292 296 public void setPort(String port) 297 { 298 this.port = port; 299 } 300 301 305 public String getPlugin() 306 { 307 return this.plugin; 308 } 309 310 314 public void setPlugin(String plugin) 315 { 316 this.plugin = plugin; 317 } 318 319 323 public String getCodebase() 324 { 325 return this.codebase; 326 } 327 328 332 public void setCodebase(String codebase) 333 { 334 this.codebase = codebase; 335 } 336 337 341 public String getImage() 342 { 343 return this.image; 344 } 345 346 350 public void setImage(String image) 351 { 352 this.image = image; 353 } 354 355 359 public String getButton() 360 { 361 return this.button; 362 } 363 364 368 public void setButton(String button) 369 { 370 this.button = button; 371 } 372 373 377 public String getCalled() 378 { 379 return this.called; 380 } 381 382 386 public void setCalled(String called) 387 { 388 this.called = called; 389 } 390 391 395 public String getInfo() 396 { 397 return this.info; 398 } 399 400 404 public void setInfo(String info) 405 { 406 this.info = info; 407 } 408 409 413 public String getBuzz() 414 { 415 return this.buzz; 416 } 417 418 422 public void setBuzz(String buzz) 423 { 424 this.buzz = buzz; 425 } 426 427 431 public String getChime() 432 { 433 return this.chime; 434 } 435 436 440 public void setChime(String chime) 441 { 442 this.chime = chime; 443 } 444 445 449 public String getOpenOnInit() 450 { 451 return this.openOnInit; 452 } 453 454 458 public void setOpenOnInit(String openOnInit) 459 { 460 this.openOnInit = openOnInit; 461 } 462 463 467 public String getLanguage() 468 { 469 return this.language; 470 } 471 472 476 public void setLanguage(String language) 477 { 478 this.language = language; 479 } 480 481 485 public String getCaption() 486 { 487 return this.caption; 488 } 489 490 494 public void setCaption(String caption) 495 { 496 this.caption = caption; 497 } 498 499 503 public String getLogo() 504 { 505 return this.logo; 506 } 507 508 512 public void setLogo(String logo) 513 { 514 this.logo = logo; 515 } 516 517 521 public String getDisplaySessionInfo() 522 { 523 return this.displaySessionInfo; 524 } 525 526 530 public void setDisplaySessionInfo(String displaySessionInfo) 531 { 532 this.displaySessionInfo = displaySessionInfo; 533 } 534 535 538 public String getAllowSendBuzz() 539 { 540 return allowSendBuzz; 541 } 542 545 public void setAllowSendBuzz(String allowSendBuzz) 546 { 547 this.allowSendBuzz = allowSendBuzz; 548 } 549 552 public String getAllowSendWebPage() 553 { 554 return allowSendWebPage; 555 } 556 559 public void setAllowSendWebPage(String allowSendWebPage) 560 { 561 this.allowSendWebPage = allowSendWebPage; 562 } 563 564 } 565 | Popular Tags |