├── .classpath ├── .editorconfig ├── .gitignore ├── .project ├── .travis.yml ├── LICENSE.txt ├── build ├── build.properties.template ├── build.xml ├── launcher.xml ├── lib │ ├── ant-contrib.jar │ ├── commons-el.jar │ ├── commons-logging.jar │ ├── merge │ │ ├── versions.txt │ │ └── xstream.jar │ └── versions.txt ├── projects │ ├── CoreClasses.iml │ ├── WebClient.ipr │ ├── WebClient.iws │ └── projectFilesBackup │ │ ├── WebClient.iws │ │ ├── Webapp.iml │ │ └── Webapp.iml.backup └── resin │ └── resin.conf ├── plugin ├── pom.xml └── src │ ├── assembly │ └── openfire-plugin-assembly.xml │ └── main │ ├── java │ └── org │ │ └── jivesoftware │ │ └── liveassistant │ │ └── WebClientPlugin.java │ └── openfire │ ├── changelog.html │ ├── logo_large.gif │ ├── logo_small.gif │ ├── plugin.xml │ └── readme.html ├── pom.xml └── war ├── pom.xml └── src └── main ├── java └── org │ └── jivesoftware │ ├── smackx │ └── workgroup │ │ ├── ext │ │ └── email │ │ │ └── EmailIQ.java │ │ └── user │ │ └── WorkgroupExt.java │ └── webchat │ ├── ChatManager.java │ ├── ChatSession.java │ ├── ChatUser.java │ ├── ChatUtils.java │ ├── FastPathException.java │ ├── FastpathServlet.java │ ├── LoadTest.java │ ├── SetCharacterEncodingFilter.java │ ├── SetupFilter.java │ ├── WorkgroupInitializer.java │ ├── actions │ ├── ChatQueue.java │ ├── ChatStarter.java │ ├── ChatWriter.java │ ├── WebBean.java │ ├── WorkgroupChangeListener.java │ └── WorkgroupStatus.java │ ├── filter │ ├── EmoticonFilter.java │ ├── TextStyleFilter.java │ └── URLFilter.java │ ├── history │ ├── Line.java │ └── Transcript.java │ ├── mail │ └── SendMail.java │ ├── personal │ ├── ChatMessage.java │ ├── ChatPoller.java │ └── PersonalChat.java │ ├── providers │ ├── GenericProvider.java │ ├── MetaDataProvider.java │ ├── Settings.java │ ├── SettingsDataProvider.java │ └── SettingsPrivateData.java │ ├── servlets │ ├── DynamicImageServlet.java │ └── ImageServlet.java │ ├── settings │ ├── ChatSettingsManager.java │ └── ConnectionSettings.java │ ├── sounds │ └── SoundServlet.java │ └── util │ ├── Base64.java │ ├── FormText.java │ ├── FormUtils.java │ ├── ModelUtil.java │ ├── ParamUtils.java │ ├── SettingsManager.java │ ├── StringUtils.java │ ├── URLFileSystem.java │ ├── WebLog.java │ └── WebUtils.java └── webapp ├── WEB-INF ├── dwr.xml ├── taglibs-mailer.tld └── web.xml ├── agent-image.jsp ├── agentinfo.jsp ├── chat-ended.jsp ├── chatmain.jsp ├── chatroom.jsp ├── common.js ├── contact-agent.jsp ├── email ├── leave-a-message.jsp └── offline-mail.jsp ├── exit-queue.jsp ├── exit-window.jsp ├── fatal.jsp ├── framemain.jsp ├── global.css ├── help └── content.html ├── helpwin.jsp ├── images ├── agent.gif ├── blank.gif ├── blue-background.gif ├── bullet-green-14x14.gif ├── bullet-red-14x14.gif ├── bullet-yellow-14x14.gif ├── busy.gif ├── check.gif ├── emoticons │ ├── angry.gif │ ├── blush.gif │ ├── confused.gif │ ├── cool.gif │ ├── cry.gif │ ├── devil.gif │ ├── grin.gif │ ├── happy.gif │ ├── laugh.gif │ ├── love.gif │ ├── mischief.gif │ ├── plain.gif │ ├── sad.gif │ ├── shocked.gif │ ├── silly.gif │ └── wink.gif ├── end_button.gif ├── error-16x16.gif ├── logo-spark-circle.gif ├── personal_offline.gif ├── personal_online.gif ├── poweredBy.gif ├── secure_button.gif ├── send_button.gif ├── send_transcript_button.gif ├── setup-header.png ├── setup-sidebar-bottom.gif ├── setup-sidebar-top.gif ├── setup_btn_bg-bigblue.gif ├── setup_btn_bg-grey.gif ├── setup_btn_bg-orange.gif ├── setup_btn_closetestx.gif ├── setup_btn_gearplay.gif ├── setup_contentbox_bg.gif ├── setup_header_bg.gif ├── setup_helpicon.gif ├── setup_nextprofile.gif ├── setup_sidebar_bg-top.gif ├── setup_sidebar_bg.gif ├── setup_sidebar_check.gif ├── setup_sidebar_progress0.gif ├── setup_sidebar_progress1.gif ├── setup_sidebar_progress2.gif ├── setup_sidebar_progress3.gif ├── setup_sidebar_progress4.gif ├── setup_sidebar_progress5.gif ├── title.gif ├── typing_button.gif ├── user.gif └── white_background.gif ├── include └── global.jsp ├── index.jsp ├── jivelive.jsp ├── js ├── controls.js ├── dragdrop.js ├── effects.js ├── prototype.js ├── scriptaculous.js ├── tooltips │ ├── domLib.js │ ├── domTT.js │ ├── domTT_drag.js │ └── fadomatic.js ├── unittest.js └── util.js ├── lostconnection.jsp ├── queue.jsp ├── queue_updater.jsp ├── request-agent.jsp ├── setup-completed.jsp ├── setup-finished.jsp ├── setup-index.jsp ├── setup-style.css ├── start.jsp ├── style.jsp ├── submitter.jsp ├── test-connection.jsp ├── transcriptmain.jsp ├── transcriptprint.jsp ├── transcriptsrc.jsp ├── userinfo.jsp ├── view-queue.jsp └── yakframe.html /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs. 2 | # 3 | # EditorConfig is awesome: http://EditorConfig.org 4 | 5 | # top-most EditorConfig file 6 | root = true 7 | 8 | [*] 9 | end_of_line = lf 10 | insert_final_newline = true 11 | charset = utf-8 12 | indent_style = space 13 | indent_size = 4 14 | 15 | [*.bat] 16 | end_of_line = crlf 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # The repository should not contain IntelliJ project files 2 | .idea 3 | out 4 | **/*.iml 5 | 6 | # The repository should not contain the result of project builds 7 | target 8 | lib-org 9 | .settings 10 | .project 11 | .classpath 12 | .settings/* 13 | /bin 14 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | fastpath-webchat 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.m2e.core.maven2Nature 21 | org.eclipse.jdt.core.javanature 22 | 23 | 24 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | -------------------------------------------------------------------------------- /build/build.properties.template: -------------------------------------------------------------------------------- 1 | # $RCSfile$ 2 | # $Revision: 18426 $ 3 | # $Date: 2005-02-10 14:04:46 -0800 (Thu, 10 Feb 2005) $ 4 | 5 | # Path to Openfire project. Assumed to be a sibling of this CVS respository 6 | # openfire.home= 7 | 8 | # Root directory for deploying the LA war (this should the 'webapps' dir of your appserver. 9 | # deploy.dir= 10 | -------------------------------------------------------------------------------- /build/launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | / 3 | 8081 4 | 5 | ../../../../tools/launcher/lib/dev 6 | ../src/webapp/WEB-INF/lib 7 | lib 8 | lib/merge 9 | 10 | 11 | ../target/classes/core 12 | 13 | 14 | 15 | / 16 | ../src/webapp 17 | 18 | 19 | -------------------------------------------------------------------------------- /build/lib/ant-contrib.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/build/lib/ant-contrib.jar -------------------------------------------------------------------------------- /build/lib/commons-el.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/build/lib/commons-el.jar -------------------------------------------------------------------------------- /build/lib/commons-logging.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/build/lib/commons-logging.jar -------------------------------------------------------------------------------- /build/lib/merge/versions.txt: -------------------------------------------------------------------------------- 1 | xstream.jar ?.? -------------------------------------------------------------------------------- /build/lib/merge/xstream.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/build/lib/merge/xstream.jar -------------------------------------------------------------------------------- /build/lib/versions.txt: -------------------------------------------------------------------------------- 1 | commons-el.jar ?.? 2 | commons-logging.jar ?.? 3 | servlet.jar 2.4 Servlet API 4 | -------------------------------------------------------------------------------- /build/projects/CoreClasses.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | -------------------------------------------------------------------------------- /build/projects/projectFilesBackup/Webapp.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | jar://$MODULE_DIR$/WEB-INF/lib/activation.jar!/ 37 | 38 | 39 | 40 | 41 | jar://$MODULE_DIR$/WEB-INF/lib/dwr.jar!/ 42 | 43 | 44 | 45 | 46 | jar://$MODULE_DIR$/WEB-INF/lib/email.jar!/ 47 | 48 | 49 | 50 | 51 | jar://$MODULE_DIR$/WEB-INF/lib/jstl.jar!/ 52 | 53 | 54 | 55 | 56 | jar://$MODULE_DIR$/WEB-INF/lib/mail.jar!/ 57 | 58 | 59 | 60 | 61 | jar://$MODULE_DIR$/WEB-INF/lib/smack.jar!/ 62 | 63 | 64 | 65 | 66 | jar://$MODULE_DIR$/WEB-INF/lib/smackx-debug.jar!/ 67 | 68 | 69 | 70 | 71 | jar://$MODULE_DIR$/WEB-INF/lib/smackx.jar!/ 72 | 73 | 74 | 75 | 76 | jar://$MODULE_DIR$/WEB-INF/lib/standard.jar!/ 77 | 78 | 79 | 80 | 81 | jar://$MODULE_DIR$/WEB-INF/lib/workgroup.jar!/ 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /build/projects/projectFilesBackup/Webapp.iml.backup: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | jar://$MODULE_DIR$/WEB-INF/lib/activation.jar!/ 36 | 37 | 38 | 39 | 40 | jar://$MODULE_DIR$/WEB-INF/lib/dwr.jar!/ 41 | 42 | 43 | 44 | 45 | jar://$MODULE_DIR$/WEB-INF/lib/email.jar!/ 46 | 47 | 48 | 49 | 50 | jar://$MODULE_DIR$/WEB-INF/lib/jstl.jar!/ 51 | 52 | 53 | 54 | 55 | jar://$MODULE_DIR$/WEB-INF/lib/mail.jar!/ 56 | 57 | 58 | 59 | 60 | jar://$MODULE_DIR$/WEB-INF/lib/smack.jar!/ 61 | 62 | 63 | 64 | 65 | jar://$MODULE_DIR$/WEB-INF/lib/smackx-debug.jar!/ 66 | 67 | 68 | 69 | 70 | jar://$MODULE_DIR$/WEB-INF/lib/smackx.jar!/ 71 | 72 | 73 | 74 | 75 | jar://$MODULE_DIR$/WEB-INF/lib/standard.jar!/ 76 | 77 | 78 | 79 | 80 | jar://$MODULE_DIR$/WEB-INF/lib/workgroup.jar!/ 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /build/resin/resin.conf: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /plugin/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | webchat 6 | org.igniterealtime.openfire.fastpath 7 | 4.2.0-SNAPSHOT 8 | 9 | webchat-plugin 10 | Fastpath Webchat plugin 11 | Web based chat client for Fastpath Openfire-Plugin 12 | 13 | 14 | ${project.build.directory}/${project.artifactId}-${project.version} 15 | ${openfireStructure.build.dir}/lib 16 | 4.4.2 17 | 18 | 19 | 20 | 21 | 22 | maven-assembly-plugin 23 | 24 | 25 | make-assembly 26 | package 27 | 28 | single 29 | 30 | 31 | 32 | src/assembly/openfire-plugin-assembly.xml 33 | 34 | false 35 | ${plugin.name} 36 | false 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | ${project.groupId} 47 | webchat-war 48 | ${project.version} 49 | war 50 | 51 | 52 | 53 | org.igniterealtime.openfire 54 | xmppserver 55 | ${openfire.version} 56 | provided 57 | 58 | 59 | 60 | org.eclipse.jetty 61 | jetty-webapp 62 | ${jetty.version} 63 | provided 64 | 65 | 66 | org.eclipse.jetty 67 | jetty-server 68 | ${jetty.version} 69 | provided 70 | 71 | 72 | org.eclipse.jetty 73 | jetty-plus 74 | ${jetty.version} 75 | provided 76 | 77 | 78 | org.eclipse.jetty 79 | apache-jsp 80 | ${jetty.version} 81 | provided 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /plugin/src/assembly/openfire-plugin-assembly.xml: -------------------------------------------------------------------------------- 1 | 3 | openfire-plugin-assembly 4 | 5 | jar 6 | 7 | false 8 | 9 | 10 | 11 | 12 | 13 | ${project.build.sourceDirectory}/../openfire 14 | 15 | *.gif 16 | *.png 17 | 18 | 19 | 20 | 21 | 22 | 23 | ${project.build.sourceDirectory}/../openfire 24 | true 25 | 26 | *.html 27 | plugin.xml 28 | 29 | 30 | 31 | 32 | 39 | 40 | 41 | 42 | classes 43 | classes 44 | true 45 | 46 | **/*.xml 47 | **/*.properties 48 | 49 | 50 | 51 | 52 | 53 | classes 54 | classes 55 | false 56 | 57 | **/*.xml 58 | **/*.properties 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | lib 67 | true 68 | 69 | *:*:war:* 70 | 71 | 72 | 73 | 74 | 75 | false 76 | true 77 | 78 | *:*:war:* 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /plugin/src/main/openfire/changelog.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Webchat Plugin Changelog 6 | 40 | 41 | 42 | 43 |

44 | WebChat Plugin Changelog 45 |

46 | 47 |

4.2.0 -- (tbd)

48 | 49 | 53 | 54 |

4.1.0 -- January 3, 2012

55 | 56 | 62 | 63 |

4.0.0 -- August 5, 2008

64 | 65 | 69 | 70 |

3.5.2 -- June 4, 2008

71 | 72 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /plugin/src/main/openfire/logo_large.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/plugin/src/main/openfire/logo_large.gif -------------------------------------------------------------------------------- /plugin/src/main/openfire/logo_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/plugin/src/main/openfire/logo_small.gif -------------------------------------------------------------------------------- /plugin/src/main/openfire/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | org.jivesoftware.liveassistant.WebClientPlugin 8 | Fastpath Webchat 9 | Web based chat client for Fastpath. 10 | Jive Software 11 | 4.1.1 12 | 23/7/2018 13 | 3.5.0 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | parent 6 | org.igniterealtime.openfire 7 | 4.4.1 8 | 9 | org.igniterealtime.openfire.fastpath 10 | webchat 11 | 4.2.0-SNAPSHOT 12 | pom 13 | Fastpath Webchat 14 | Web based chat client for Fastpath 15 | 16 | 17 | UTF-8 18 | 19 | 20 | 21 | 9.4.11.v20180605 22 | 4.2.4 23 | webchat 24 | 25 | 26 | 27 | 28 | Guus der Kinderen 29 | 30 | Lead Developer 31 | 32 | guus.der.kinderen@gmail.com 33 | +1 34 | Ignite Realtime 35 | http://www.igniterealtime.org 36 | 37 | 38 | Anno van Vliet 39 | 40 | 41 | 42 | 43 | war 44 | plugin 45 | 46 | 47 | 48 | 49 | 50 | org.ec4j.maven 51 | editorconfig-maven-plugin 52 | 0.0.5 53 | 54 | 55 | check 56 | verify 57 | 58 | check 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | src/main/**/*.whatever 68 | 69 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | igniterealtime 83 | Ignite Realtime Repository 84 | https://igniterealtime.org/archiva/repository/maven/ 85 | 86 | 87 | 88 | 89 | 93 | 94 | igniterealtime 95 | Ignite Realtime Repository 96 | https://igniterealtime.org/archiva/repository/maven/ 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /war/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | 5 | webchat 6 | org.igniterealtime.openfire.fastpath 7 | 4.2.0-SNAPSHOT 8 | 9 | webchat-war 10 | war 11 | Fastpath Webchat war 12 | Web based chat client for Fastpath 13 | 14 | 15 | 16 | 17 | org.apache.maven.plugins 18 | maven-war-plugin 19 | 20 | ${project.basedir}/target/web.xml 21 | 22 | 23 | 24 | org.eclipse.jetty 25 | jetty-jspc-maven-plugin 26 | 9.4.11.v20180605 27 | 28 | 29 | jspc 30 | 31 | jspc 32 | 33 | 34 | 35 | org.jivesoftware.webclient.jsp 36 | 37 | ${project.build.sourceDirectory}/../webapp 38 | ${project.build.sourceDirectory}/../webapp/WEB-INF/web.xml 39 | 1.8 40 | 1.8 41 | true 42 | 43 | 44 | 45 | 46 | 47 | org.mortbay.jasper 48 | apache-jsp 49 | 8.5.23 50 | 51 | 52 | org.eclipse.jetty.toolchain 53 | jetty-schemas 54 | 4.0.1 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | org.igniterealtime.smack 64 | smack-debug 65 | ${smack.version} 66 | 67 | 68 | org.igniterealtime.smack 69 | smack-java7 70 | ${smack.version} 71 | 72 | 73 | org.igniterealtime.smack 74 | smack-tcp 75 | ${smack.version} 76 | 77 | 78 | org.igniterealtime.smack 79 | smack-extensions 80 | ${smack.version} 81 | 82 | 83 | org.igniterealtime.smack 84 | smack-legacy 85 | ${smack.version} 86 | 87 | 88 | 89 | 90 | 91 | com.thoughtworks.xstream 92 | xstream 93 | 1.4.20 94 | 95 | 96 | org.eclipse.jetty 97 | apache-jsp 98 | ${jetty.version} 99 | 100 | 101 | javax.mail 102 | mail 103 | 1.4.5 104 | 105 | 106 | commons-logging 107 | commons-logging 108 | 1.2 109 | 110 | 111 | commons-el 112 | commons-el 113 | 1.0 114 | 115 | 116 | 117 | org.directwebremoting 118 | dwr 119 | 2.0.11-RELEASE 120 | 121 | 122 | javax.servlet 123 | jstl 124 | 1.2 125 | 126 | 127 | org.mortbay.jasper 128 | apache-jsp 129 | 8.5.23 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/smackx/workgroup/ext/email/EmailIQ.java: -------------------------------------------------------------------------------- 1 | package org.jivesoftware.smackx.workgroup.ext.email; 2 | 3 | import org.jivesoftware.smack.packet.IQ; 4 | import org.jivesoftware.smack.util.StringUtils; 5 | 6 | public class EmailIQ extends IQ { 7 | 8 | public static final String ELEMENT_NAME = "send-email"; 9 | public static final String NAMESPACE = "http://jivesoftware.com/protocol/workgroup"; 10 | private String fromAddress; 11 | private String toAddress; 12 | private String subject; 13 | private String message; 14 | private boolean html; 15 | private String sessionID; 16 | 17 | public EmailIQ() { 18 | super(ELEMENT_NAME , NAMESPACE); 19 | } 20 | 21 | public String getFromAddress() { 22 | return this.fromAddress; 23 | } 24 | 25 | public void setFromAddress(String paramString) { 26 | this.fromAddress = paramString; 27 | } 28 | 29 | public String getToAddress() { 30 | return this.toAddress; 31 | } 32 | 33 | public void setToAddress(String paramString) { 34 | this.toAddress = paramString; 35 | } 36 | 37 | public String getSubject() { 38 | return this.subject; 39 | } 40 | 41 | public void setSubject(String paramString) { 42 | this.subject = paramString; 43 | } 44 | 45 | public String getMessage() { 46 | return this.message; 47 | } 48 | 49 | public void setMessage(String paramString) { 50 | this.message = paramString; 51 | } 52 | 53 | public boolean isHtml() { 54 | return this.html; 55 | } 56 | 57 | public void setHtml(boolean paramBoolean) { 58 | this.html = paramBoolean; 59 | } 60 | 61 | public String getSessionID() { 62 | return this.sessionID; 63 | } 64 | 65 | public void setSessionID(String paramString) { 66 | this.sessionID = paramString; 67 | } 68 | 69 | @Override 70 | protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml) { 71 | 72 | xml.append("<").append("send-email").append(" xmlns=\"").append("http://jivesoftware.com/protocol/workgroup").append("\">"); 73 | xml.append("").append(StringUtils.escapeForXml(getFromAddress())).append(""); 74 | xml.append("").append(StringUtils.escapeForXml(getToAddress())).append(""); 75 | xml.append("").append(StringUtils.escapeForXml(getSubject())).append(""); 76 | xml.append("").append(StringUtils.escapeForXml(getMessage())).append(""); 77 | xml.append("").append(Boolean.toString(isHtml())).append(""); 78 | if (getSessionID() != null) 79 | xml.append("").append(getSessionID()).append(""); 80 | xml.append(" "); 81 | return xml; 82 | } 83 | 84 | } 85 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/smackx/workgroup/user/WorkgroupExt.java: -------------------------------------------------------------------------------- 1 | package org.jivesoftware.smackx.workgroup.user; 2 | 3 | import org.jivesoftware.smack.SmackException.NotConnectedException; 4 | import org.jivesoftware.smack.XMPPConnection; 5 | import org.jivesoftware.smack.XMPPException.XMPPErrorException; 6 | import org.jivesoftware.smack.packet.IQ; 7 | import org.jivesoftware.smackx.workgroup.ext.email.EmailIQ; 8 | import org.jxmpp.jid.Jid; 9 | 10 | 11 | public class WorkgroupExt extends Workgroup { 12 | 13 | private XMPPConnection connection; 14 | 15 | /** 16 | * @param workgroupJID 17 | * @param connection 18 | */ 19 | public WorkgroupExt(Jid workgroupJID, XMPPConnection connection) { 20 | super(workgroupJID, connection); 21 | this.connection = connection; 22 | } 23 | 24 | public boolean sendMail(String paramString1, String paramString2, String paramString3, String paramString4, boolean paramBoolean) throws XMPPErrorException, NotConnectedException, InterruptedException { 25 | EmailIQ localEmailIQ = new EmailIQ(); 26 | localEmailIQ.setToAddress(paramString1); 27 | localEmailIQ.setFromAddress(paramString2); 28 | localEmailIQ.setSubject(paramString3); 29 | localEmailIQ.setMessage(paramString4); 30 | localEmailIQ.setHtml(paramBoolean); 31 | localEmailIQ.setType(IQ.Type.set); 32 | localEmailIQ.setTo(getWorkgroupJID()); 33 | 34 | this.connection.createStanzaCollectorAndSend(localEmailIQ); 35 | 36 | return true; 37 | } 38 | 39 | public boolean sendTranscript(String paramString1, String paramString2) throws XMPPErrorException, NotConnectedException, InterruptedException { 40 | EmailIQ localEmailIQ = new EmailIQ(); 41 | localEmailIQ.setToAddress(paramString1); 42 | localEmailIQ.setSessionID(paramString2); 43 | localEmailIQ.setType(IQ.Type.set); 44 | localEmailIQ.setTo(getWorkgroupJID()); 45 | 46 | this.connection.createStanzaCollectorAndSend(localEmailIQ); 47 | 48 | return true; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/ChatUser.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 18645 $ 4 | * $Date: 2005-03-22 21:34:24 -0800 (Tue, 22 Mar 2005) $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is the proprietary information of Jive Software. Use is 9 | subject to license terms. 10 | */ 11 | package org.jivesoftware.webchat; 12 | 13 | /** 14 | * Represents one user in a chat. This user information is retrieved via their defined 15 | * chat id within the system. 16 | */ 17 | public class ChatUser { 18 | 19 | private String workgroup; 20 | private String chatID; 21 | 22 | public String getWorkgroup() { 23 | return workgroup; 24 | } 25 | 26 | public void setWorkgroup(String workgroup) { 27 | this.workgroup = workgroup; 28 | } 29 | 30 | public String getChatID() { 31 | return chatID; 32 | } 33 | 34 | public void setChatID(String chatID) { 35 | this.chatID = chatID; 36 | } 37 | 38 | public ChatSession getChatSession() { 39 | ChatManager chatManager = ChatManager.getInstance(); 40 | return chatManager.getChatSession(chatID); 41 | } 42 | 43 | public boolean hasSession(){ 44 | return getChatSession() != null; 45 | } 46 | 47 | public void closeSession(){ 48 | if(hasSession()){ 49 | getChatSession().close(); 50 | } 51 | } 52 | 53 | public void removeSession(){ 54 | ChatManager chatManager = ChatManager.getInstance(); 55 | chatManager.closeChatSession(chatID); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/FastPathException.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jive Software. All rights reserved. 3 | * 4 | * This software is published under the terms of the GNU Public License (GPL), 5 | * a copy of which is included in this distribution, or a commercial license 6 | * agreement with Jive. 7 | */ 8 | package org.jivesoftware.webchat; 9 | 10 | /** 11 | * Specific Fastpath exception. 12 | * 13 | * @author Anno van Vliet 14 | * 15 | */ 16 | public class FastPathException extends Exception { 17 | 18 | /** 19 | * @param string 20 | */ 21 | public FastPathException(String string) { 22 | super(string); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/SetCharacterEncodingFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile: ,v $ 3 | * $Revision: $ 4 | * $Date: $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | package org.jivesoftware.webchat; 13 | 14 | 15 | import javax.servlet.Filter; 16 | import javax.servlet.FilterChain; 17 | import javax.servlet.FilterConfig; 18 | import javax.servlet.ServletException; 19 | import javax.servlet.ServletRequest; 20 | import javax.servlet.ServletResponse; 21 | 22 | import java.io.IOException; 23 | 24 | /** 25 | * Set the character encoding to be the one used by Jive. 26 | */ 27 | public class SetCharacterEncodingFilter implements Filter { 28 | 29 | public void init(FilterConfig filterConfig) throws ServletException { 30 | 31 | } 32 | 33 | public void destroy() { 34 | 35 | } 36 | 37 | /** 38 | * Sets the character encoding to be used for any content passing out of this filter. 39 | */ 40 | public void doFilter(ServletRequest request, ServletResponse response, 41 | FilterChain chain) throws IOException, ServletException { 42 | 43 | response.setContentType("text/html; charset=UTF-8"); 44 | request.setCharacterEncoding("UTF-8"); 45 | chain.doFilter(request, response); 46 | } 47 | } 48 | 49 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/SetupFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 24191 $ 4 | * $Date: 2005-11-28 20:16:08 -0800 (Mon, 28 Nov 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat; 14 | 15 | import org.jivesoftware.webchat.settings.ConnectionSettings; 16 | import org.jivesoftware.webchat.settings.ChatSettingsManager; 17 | import org.jivesoftware.webchat.util.ModelUtil; 18 | import org.jivesoftware.webchat.util.URLFileSystem; 19 | import org.jivesoftware.webchat.util.WebLog; 20 | 21 | import javax.servlet.Filter; 22 | import javax.servlet.FilterChain; 23 | import javax.servlet.FilterConfig; 24 | import javax.servlet.ServletException; 25 | import javax.servlet.ServletRequest; 26 | import javax.servlet.ServletResponse; 27 | import javax.servlet.http.HttpServletRequest; 28 | import javax.servlet.http.HttpServletResponse; 29 | 30 | import java.io.IOException; 31 | import java.net.MalformedURLException; 32 | import java.net.URL; 33 | 34 | /** 35 | * Handles validation of settings file. The SetupFilter will redirect a user to the setup wizard if no 36 | * settings were found. 37 | */ 38 | public class SetupFilter implements Filter { 39 | private ChatManager chatManager; 40 | 41 | public void init(FilterConfig filterConfig) throws ServletException { 42 | chatManager = ChatManager.getInstance(); 43 | } 44 | 45 | public void destroy() { 46 | } 47 | 48 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { 49 | ChatSettingsManager settingsManager = chatManager.getChatSettingsManager(); 50 | String path = ((HttpServletRequest)request).getContextPath(); 51 | if (settingsManager == null) { 52 | try { 53 | ((HttpServletResponse) response).sendRedirect(path+"/setup-index.jsp"); 54 | return; 55 | } 56 | catch (IOException e) { 57 | WebLog.logError("Error in SetupFilter.", e); 58 | } 59 | } 60 | 61 | // Add page info. 62 | HttpServletRequest re = (HttpServletRequest) request; 63 | StringBuffer requestURL = re.getRequestURL(); 64 | String page = requestURL.toString(); 65 | 66 | if (page != null && page.indexOf("setup-") == -1) { 67 | if (isValidPage(page)) { 68 | ConnectionSettings settings = settingsManager.getSettings(); 69 | if (settings == null || !ModelUtil.hasLength(settings.getServerDomain())) { 70 | try { 71 | ((HttpServletResponse) response).sendRedirect(path+"/setup-index.jsp"); 72 | return; 73 | } 74 | catch (IOException e) { 75 | WebLog.logError("Error in SetupFilter.", e); 76 | } 77 | } 78 | } 79 | } 80 | else if (page != null && page.indexOf("setup-") != -1 && page.indexOf("setup-completed") == -1) { 81 | ConnectionSettings settings = settingsManager.getSettings(); 82 | if (settings != null && isValidPage(page) && isConnected()) { 83 | try { 84 | ((HttpServletResponse) response).sendRedirect("setup-completed.jsp"); 85 | return; 86 | } 87 | catch (IOException e) { 88 | WebLog.logError("Error in SetupFilter.", e); 89 | } 90 | } 91 | } 92 | chain.doFilter(request, response); 93 | } 94 | 95 | private static boolean isValidPage(String pageURL) { 96 | URL url = null; 97 | try { 98 | url = new URL(pageURL); 99 | } 100 | catch (MalformedURLException e) { 101 | WebLog.logError("Error in SetupFilter.", e); 102 | return false; 103 | } 104 | 105 | boolean ok = false; 106 | 107 | final String[] acceptSuffixList = {".html", ".jsp", ".htm"}; 108 | final String suffix = URLFileSystem.getSuffix(url); 109 | 110 | // Handle url's without page names. 111 | if (!ModelUtil.hasLength(suffix)) { 112 | return true; 113 | } 114 | 115 | for (int i = 0; i < acceptSuffixList.length; i++) { 116 | if (suffix.equals(acceptSuffixList[i])) { 117 | ok = true; 118 | } 119 | } 120 | 121 | return ok; 122 | } 123 | 124 | private boolean isConnected(){ 125 | ChatSettingsManager settingsManager = chatManager.getChatSettingsManager(); 126 | if(settingsManager != null || settingsManager.getSettings() != null){ 127 | return chatManager.getGlobalConnection() != null && chatManager.getGlobalConnection().isConnected(); 128 | } 129 | return false; 130 | } 131 | } 132 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/WorkgroupInitializer.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (C) 2018 Jive Software. All rights reserved. 3 | * 4 | * This software is published under the terms of the GNU Public License (GPL), 5 | * a copy of which is included in this distribution, or a commercial license 6 | * agreement with Jive. 7 | */ 8 | 9 | package org.jivesoftware.webchat; 10 | 11 | /** 12 | * Fastpath / Workgroup related code is available in smack-legacy.jar. Sadly, only part of the IQ providers and packet 13 | * extensions is loaded by default by Smack (see SMACK-729 in the issue tracker). 14 | *

15 | * To work around this issue, this class initializes the remaining classes. This class should no longer be needed when 16 | * the original problem in Smack is fixed. 17 | * 18 | * @author Guus der Kinderen, guus.der.kinderen@gmail.com 19 | * @see Issue SMACK-729 20 | */ 21 | 22 | import org.jivesoftware.smack.initializer.UrlInitializer; 23 | 24 | public class WorkgroupInitializer extends UrlInitializer 25 | { 26 | public WorkgroupInitializer() 27 | { 28 | } 29 | 30 | protected String getProvidersUrl() 31 | { 32 | return "classpath:org.jivesoftware.smack.legacy/workgroup.providers"; 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/actions/ChatQueue.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18903 $ 4 | * $Date: 2005-05-11 18:03:06 -0700 (Wed, 11 May 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.actions; 14 | 15 | import org.jivesoftware.webchat.util.WebUtils; 16 | 17 | /** 18 | * The ChatQueue for a particular user. This is the model implementation of the current state in a queue. 19 | * Updates such information as position, average wait time, and total wait time. 20 | */ 21 | public class ChatQueue { 22 | private boolean connectionDropped; 23 | private boolean inQueue; 24 | private boolean routed; 25 | private int queuePosition; 26 | private int queueTime; 27 | private String nickname; 28 | 29 | 30 | public boolean isConnectionDropped() { 31 | return connectionDropped; 32 | } 33 | 34 | public void setConnectionDropped(boolean connectionDropped) { 35 | this.connectionDropped = connectionDropped; 36 | } 37 | 38 | public boolean isInQueue() { 39 | return inQueue; 40 | } 41 | 42 | public void setInQueue(boolean inQueue) { 43 | this.inQueue = inQueue; 44 | } 45 | 46 | public boolean isRouted() { 47 | return routed; 48 | } 49 | 50 | public void setRouted(boolean routed) { 51 | this.routed = routed; 52 | } 53 | 54 | public int getQueuePosition() { 55 | return queuePosition; 56 | } 57 | 58 | public void setQueuePosition(int queuePosition) { 59 | this.queuePosition = queuePosition; 60 | } 61 | 62 | public int getQueueTime() { 63 | return queueTime; 64 | } 65 | 66 | public String getQueueTimeForHtml() { 67 | return WebUtils.getTimeFromLong(getQueueTime()); 68 | } 69 | 70 | public void setQueueTime(int queueTime) { 71 | this.queueTime = queueTime; 72 | } 73 | 74 | public String getNickname() { 75 | return nickname; 76 | } 77 | 78 | public void setNickname(String nickname) { 79 | this.nickname = nickname; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/actions/ChatWriter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18449 $ 4 | * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.actions; 14 | 15 | import org.jivesoftware.smack.SmackException.NotConnectedException; 16 | import org.jivesoftware.smack.packet.Message; 17 | import org.jivesoftware.smackx.muc.MultiUserChat; 18 | import org.jivesoftware.smackx.xevent.MessageEventManager; 19 | import org.jivesoftware.webchat.ChatSession; 20 | import org.jivesoftware.webchat.util.WebLog; 21 | import org.jivesoftware.webchat.util.WebUtils; 22 | 23 | import org.jxmpp.jid.EntityBareJid; 24 | import org.jxmpp.jid.EntityFullJid; 25 | import org.jxmpp.jid.parts.Resourcepart; 26 | 27 | /** 28 | * Responsible for sending messages to all parties in a ChatRoom. The 29 | * ChatWriter sends and writes out messages sent from the client. 30 | */ 31 | public final class ChatWriter { 32 | private ChatSession chatSession; 33 | 34 | /** 35 | * ChatWriter constructor must accept a ChatSession to work from. 36 | * @param chatSession the owning ChatSession. 37 | */ 38 | public ChatWriter(ChatSession chatSession){ 39 | this.chatSession = chatSession; 40 | } 41 | 42 | /** 43 | * Updates the web transcript and sends the message. 44 | * @param message the message to send. 45 | */ 46 | public void write(String message) { 47 | // If the user doesn't have a chat session, notify them. 48 | if (chatSession == null) { 49 | return; 50 | } 51 | 52 | // Notify user if the chat session has closed. 53 | if (chatSession.isClosed() || !chatSession.isInGroupChat()) { 54 | return; 55 | } 56 | 57 | // If the message isn't specified, do nothing. 58 | if (message != null) { 59 | try { 60 | final MultiUserChat chat = chatSession.getGroupChat(); 61 | message = message.replaceAll("\r", " "); 62 | 63 | // update the transcript: 64 | String body = WebUtils.applyFilters(message); 65 | Resourcepart nickname = chat.getNickname(); 66 | chatSession.updateTranscript(nickname.toString(), body); 67 | 68 | if (chat != null) { 69 | final Message chatMessage = new Message(); 70 | chatMessage.setType(Message.Type.groupchat); 71 | chatMessage.setBody(message); 72 | 73 | EntityBareJid room = chat.getRoom(); 74 | chatMessage.setTo(room); 75 | chat.sendMessage(chatMessage); 76 | } 77 | } 78 | catch ( NotConnectedException | InterruptedException e) { 79 | WebLog.logError("Error sending message:", e); 80 | } 81 | } 82 | } 83 | 84 | /** 85 | * Notifies all MessageEventHandlers that the customer is typing a message. 86 | * @throws InterruptedException 87 | * @throws NotConnectedException 88 | */ 89 | public void customerIsTyping() throws NotConnectedException, InterruptedException { 90 | final MultiUserChat chat = chatSession.getGroupChat(); 91 | 92 | for ( EntityFullJid from : chat.getOccupants() ) { 93 | Resourcepart tFrom = from.getResourceOrNull(); 94 | Resourcepart nickname = chat.getNickname(); 95 | if (tFrom != null && !tFrom.equals(nickname)) { 96 | MessageEventManager messageEventManager = chatSession.getMessageEventManager(); 97 | messageEventManager.sendComposingNotification(from, "l0k1"); 98 | } 99 | } 100 | } 101 | 102 | /** 103 | * Sets the current ChatSession. 104 | * @param chatSession the ChatSession associated with this Chat. 105 | */ 106 | public void setChatSession(ChatSession chatSession) { 107 | this.chatSession = chatSession; 108 | } 109 | 110 | /** 111 | * Returns the ChatSession associated with this Chat. 112 | * @return the ChatSession associated with this Chat. 113 | */ 114 | public ChatSession getChatSession() { 115 | return chatSession; 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/actions/WebBean.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18449 $ 4 | * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.actions; 14 | 15 | import javax.servlet.ServletContext; 16 | import javax.servlet.http.HttpServletRequest; 17 | import javax.servlet.http.HttpServletResponse; 18 | import javax.servlet.http.HttpSession; 19 | import javax.servlet.jsp.JspWriter; 20 | import javax.servlet.jsp.PageContext; 21 | 22 | /** 23 | * Used to create JavaBeans that are container aware. Subclass the WebBean class if 24 | * to get a handle on the implicit objects within a servlet or jsp. From there you 25 | * can access each object just as you would within a whatever corresponding object. 26 | * For example, assuming MyBean subclasses WebBean and you are using MyBean within 27 | * a jsp page.:

28 | * 29 | *

 30 |  * MyBean myBean = new MyBean();
 31 |  * myBean.init(pageContext);
 32 |  * 
33 | *

34 | * 35 | * You can then access all implicit objects directly within the bean. 36 | */ 37 | public abstract class WebBean { 38 | /** 39 | * The HttpSession used with this WebBean. 40 | */ 41 | public HttpSession session; 42 | 43 | /** 44 | * The HttpRequest used with this WebBean. 45 | */ 46 | public HttpServletRequest request; 47 | 48 | /** 49 | * The HttpResponse used with this WebBean. 50 | */ 51 | public HttpServletResponse response; 52 | 53 | /** 54 | * The ServletContextHttp used with this WebBean. 55 | */ 56 | public ServletContext application; 57 | 58 | /** 59 | * The Serlvet Writer used with this WebBean. 60 | */ 61 | public JspWriter out; 62 | 63 | /** 64 | * Empty Constructor 65 | */ 66 | public WebBean(){ 67 | 68 | } 69 | 70 | /** 71 | * Initialize WebBean from within a servlet. 72 | * @param request the request to use. 73 | * @param response the response to use. 74 | * @param session the session to use. 75 | * @param app the servlet context to use. 76 | * @param out the PrintWriter to use. 77 | */ 78 | public void init(HttpServletRequest request, HttpServletResponse response, 79 | HttpSession session, ServletContext app, JspWriter out) { 80 | 81 | this.request = request; 82 | this.response = response; 83 | this.session = session; 84 | application = app; 85 | this.out = out; 86 | } 87 | 88 | /** 89 | * Initialize the WebBean from within a JSP page. 90 | * @param context the pageContext of the JSP page. 91 | */ 92 | public void init(PageContext context) { 93 | request = (HttpServletRequest) context.getRequest(); 94 | response = (HttpServletResponse) context.getResponse(); 95 | session = context.getSession(); 96 | application = context.getServletContext(); 97 | out = context.getOut(); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/actions/WorkgroupChangeListener.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 18672 $ 4 | * $Date: 2005-03-25 13:10:48 -0800 (Fri, 25 Mar 2005) $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is the proprietary information of Jive Software. Use is 9 | subject to license terms. 10 | */ 11 | package org.jivesoftware.webchat.actions; 12 | 13 | import org.jxmpp.jid.Jid; 14 | 15 | /* RCSFile: $ 16 | * Revision: $ 17 | * Date: $ 18 | * 19 | * Copyright (C) 2004-2008 JiveSoftware, Inc. All rights reserved. 20 | * 21 | * This software is the proprietary information of CoolServlets, Inc. 22 | * Use is subject to license terms. 23 | */ 24 | 25 | public interface WorkgroupChangeListener { 26 | 27 | void workgroupUpdated(Jid jid); 28 | } 29 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/filter/EmoticonFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 18903 $ 4 | * $Date: 2005-05-11 18:03:06 -0700 (Wed, 11 May 2005) $ 5 | * 6 | * Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is the proprietary information of Jive Software. Use is subject to license terms. 9 | */ 10 | 11 | package org.jivesoftware.webchat.filter; 12 | 13 | import org.jivesoftware.webchat.util.ModelUtil; 14 | 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | import java.util.StringTokenizer; 18 | 19 | /** 20 | * A Filter that converts ASCII emoticons into image equivalents. 21 | * This filter should only be run after any HTML stripping filters.

22 | * 23 | * The filter must be configured with information about where the image files 24 | * are located. A table containing all the supported emoticons with their 25 | * ASCII representations and image file names is as follows:

26 | * 27 | * 28 | * 29 | *

30 | *

31 | * 32 | * 33 | * 34 | * 35 | * 36 | * 37 | * 38 | * 39 | * 40 | * 41 | * 42 | * 43 | * 44 | * 45 | * 46 | *
EmotionASCIIImage
Happy:) or :-)happy.gif
Sad:( or :-(sad.gif
Grin:Dgrin.gif
Love:xlove.gif
Mischief;\mischief.gif
CoolB-)cool.gif
Devil]:)devil.gif
Silly:psilly.gif
AngryX-(angry.gif
Laugh:^Olaugh.gif
Wink;) or ;-)wink.gif
Blush:8}blush.gif
Cry:_|cry.gif
Confused?:|confused.gif
Shocked:Oshocked.gif
Plain:|plain.gif
47 | */ 48 | public class EmoticonFilter { 49 | private static final Map EMOTICON_MAP = new HashMap<>(); 50 | 51 | private EmoticonFilter() { 52 | // Not instantiable. 53 | } 54 | 55 | /** 56 | * Applys the emoticon filter to a string. For example, if you wanted the 57 | * actual graphic for :) :

58 | *

 59 |      * String graphic = EmoticonFilter.applyFilter(":)");
 60 |      * 
61 | *

62 | * 63 | * You would receive images/emoticons/happy.gif. 64 | * @param string the string to parse for emoticon images. 65 | * @return the emoticon image link. 66 | */ 67 | public static String applyFilter(String string) { 68 | if (!ModelUtil.hasLength(string)) { 69 | return string; 70 | } 71 | 72 | final StringBuffer buf = new StringBuffer(); 73 | final StringTokenizer tkn = new StringTokenizer(string, " ", false); 74 | while (tkn.hasMoreTokens()) { 75 | String str = tkn.nextToken(); 76 | String found = (String) EMOTICON_MAP.get(str); 77 | if (found != null) { 78 | str = buildURL(found); 79 | } 80 | buf.append(str + " "); 81 | } 82 | return buf.toString(); 83 | } 84 | 85 | /** 86 | * Build image tags 87 | */ 88 | static { 89 | EMOTICON_MAP.put(":)", "images/emoticons/happy.gif"); 90 | EMOTICON_MAP.put(":-)", "images/emoticons/happy.gif"); 91 | EMOTICON_MAP.put(":(", "images/emoticons/sad.gif"); 92 | EMOTICON_MAP.put(":-(", "images/emoticons/sad.gif"); 93 | EMOTICON_MAP.put(":D", "images/emoticons/grin.gif"); 94 | EMOTICON_MAP.put(":x", "images/emoticons/love.gif"); 95 | EMOTICON_MAP.put(";\\", "images/emoticons/mischief.gif"); 96 | EMOTICON_MAP.put("B-)", "images/emoticons/cool.gif"); 97 | EMOTICON_MAP.put("]:)", "images/emoticons/devil.gif"); 98 | EMOTICON_MAP.put(":p", "images/emoticons/silly.gif"); 99 | EMOTICON_MAP.put("X-(", "images/emoticons/angry.gif"); 100 | EMOTICON_MAP.put(":^0", "images/emoticons/laugh.gif"); 101 | EMOTICON_MAP.put(";)", "images/emoticons/wink.gif"); 102 | EMOTICON_MAP.put(";-)", "images/emoticons/wink.gif"); 103 | EMOTICON_MAP.put(":8}", "images/emoticons/blush.gif"); 104 | EMOTICON_MAP.put(":_|", "images/emoticons/cry.gif"); 105 | EMOTICON_MAP.put("?:|", "images/emoticons/confused.gif"); 106 | EMOTICON_MAP.put(":0", "images/emoticons/shocked.gif"); 107 | EMOTICON_MAP.put(":|", "images/emoticons/plain.gif"); 108 | } 109 | 110 | /** 111 | * Returns an HTML image tag using the base image URL and image name. 112 | * @param imageName the relative url of the image to build. 113 | * @return the new img tag to use. 114 | */ 115 | private static String buildURL(String imageName) { 116 | return ""; 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/filter/TextStyleFilter.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 18449 $ 4 | * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $ 5 | * 6 | * Copyright (C) 1999-2002 CoolServlets, Inc. All rights reserved. 7 | * 8 | * This software is the proprietary information of CoolServlets, Inc. 9 | * Use is subject to license terms. 10 | */ 11 | 12 | package org.jivesoftware.webchat.filter; 13 | 14 | /** 15 | * A Filter that replaces [b][/b], [i][/i], [u][/u], [pre][/pre] tags with their HTML 16 | * tag equivalents.
17 | */ 18 | public class TextStyleFilter { 19 | 20 | private TextStyleFilter() { 21 | // Not instanstiable. 22 | } 23 | 24 | /** 25 | * Applys the specified text filter to use with the WebChat Service. For example, 26 | * if you received the following message:

27 | *

 28 |      * Hi, my name is [b]Steve[/b].
 29 |      * You would receive the following: Hi, my name is Steve.
 30 |      * @param string the string to apply to format to.
 31 |      * @return the newly formatted string.
 32 |      */
 33 |     public static String applyFilter(String string) {
 34 |         if (string == null || string.length() == 0) {
 35 |             return string;
 36 |         }
 37 | 
 38 |         // To figure out how many times we've made text replacements, we
 39 |         // need to pass around integer count objects.
 40 |         int[] boldStartCount = new int[1];
 41 |         int[] italicsStartCount = new int[1];
 42 |         int[] boldEndCount = new int[1];
 43 |         int[] italicsEndCount = new int[1];
 44 |         int[] underlineStartCount = new int[1];
 45 |         int[] underlineEndCount = new int[1];
 46 |         int[] preformatStartCount = new int[1];
 47 |         int[] preformatEndCount = new int[1];
 48 |         int[] fontCount = new int[1];
 49 | 
 50 |         // Bold
 51 |         string = replaceIgnoreCase(string, "[b]", "", boldStartCount);
 52 |         string = replaceIgnoreCase(string, "[/b]", "", boldEndCount);
 53 |         int bStartCount = boldStartCount[0];
 54 |         int bEndCount = boldEndCount[0];
 55 | 
 56 |         while (bStartCount > bEndCount) {
 57 |             string = string.concat("");
 58 |             bEndCount++;
 59 |         }
 60 | 
 61 |         // Italics
 62 |         string = replaceIgnoreCase(string, "[i]", "", italicsStartCount);
 63 |         string = replaceIgnoreCase(string, "[/i]", "", italicsEndCount);
 64 |         int iStartCount = italicsStartCount[0];
 65 |         int iEndCount = italicsEndCount[0];
 66 | 
 67 |         while (iStartCount > iEndCount) {
 68 |             string = string.concat("");
 69 |             iEndCount++;
 70 |         }
 71 | 
 72 |         // Underline
 73 |         string = replaceIgnoreCase(string, "[u]", "", underlineStartCount);
 74 |         string = replaceIgnoreCase(string, "[/u]", "", underlineEndCount);
 75 |         int uStartCount = underlineStartCount[0];
 76 |         int uEndCount = underlineEndCount[0];
 77 | 
 78 |         while (uStartCount > uEndCount) {
 79 |             string = string.concat("");
 80 |             uEndCount++;
 81 |         }
 82 | 
 83 |         // Pre
 84 |         string = replaceIgnoreCase(string, "[pre]", "
", preformatStartCount);
 85 |         string = replaceIgnoreCase(string, "[/pre]", "
", preformatEndCount); 86 | int preStartCount = preformatStartCount[0]; 87 | int preEndCount = preformatEndCount[0]; 88 | 89 | while (preStartCount > preEndCount) { 90 | string = string.concat("
"); 91 | preEndCount++; 92 | } 93 | 94 | // font 95 | string = replaceIgnoreCase(string, "[font ", "", fontCount); 97 | string = replaceIgnoreCase(string, "/]", ">", fontCount); 98 | string = replaceIgnoreCase(string, "/"", "\"", fontCount); 99 | 100 | 101 | return string; 102 | } 103 | 104 | /** 105 | * Replaces all instances of oldString with newString in line with the 106 | * added feature that matches of newString in oldString ignore case. 107 | * The count paramater is set to the number of replaces performed. 108 | * 109 | * @param line the String to search to perform replacements on 110 | * @param oldString the String that should be replaced by newString 111 | * @param newString the String that will replace all instances of oldString 112 | * @param count a value that will be updated with the number of replaces 113 | * performed. 114 | * @return a String will all instances of oldString replaced by newString 115 | */ 116 | private static String replaceIgnoreCase(String line, String oldString, 117 | String newString, int[] count) { 118 | if (line == null) { 119 | return null; 120 | } 121 | String lcLine = line.toLowerCase(); 122 | String lcOldString = oldString.toLowerCase(); 123 | int i = 0; 124 | if ((i = lcLine.indexOf(lcOldString, i)) >= 0) { 125 | int counter = 1; 126 | char[] line2 = line.toCharArray(); 127 | char[] newString2 = newString.toCharArray(); 128 | int oLength = oldString.length(); 129 | StringBuffer buf = new StringBuffer(line2.length); 130 | buf.append(line2, 0, i).append(newString2); 131 | i += oLength; 132 | int j = i; 133 | while ((i = lcLine.indexOf(lcOldString, i)) > 0) { 134 | counter++; 135 | buf.append(line2, j, i - j).append(newString2); 136 | i += oLength; 137 | j = i; 138 | } 139 | buf.append(line2, j, line2.length - j); 140 | count[0] = counter; 141 | return buf.toString(); 142 | } 143 | return line; 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/history/Line.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18449 $ 4 | * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.history; 14 | 15 | /** 16 | * A Line is a line in a chat - has a from and text. The from can be null if this is an 17 | * announcement. 18 | */ 19 | public class Line { 20 | private String from; 21 | private String text; 22 | 23 | /** 24 | * Creates a new line within a chat transcript. 25 | * @param from the nickname of the user who sent the message, or null if 26 | * it's a presence update. 27 | * @param text the body of the message. 28 | */ 29 | public Line(String from, String text) { 30 | this.from = from; 31 | this.text = text; 32 | } 33 | 34 | /** 35 | * Returns the nickname of the user who sent the message. 36 | * @return the nickname of the user who sent the message. 37 | */ 38 | public String getFrom() { 39 | return from; 40 | } 41 | 42 | /** 43 | * Returns the body of the message. 44 | * @return the body of the message. 45 | */ 46 | public String getText() { 47 | return text; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/history/Transcript.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18542 $ 4 | * $Date: 2005-03-03 15:01:36 -0800 (Thu, 03 Mar 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.history; 14 | 15 | import java.util.ArrayList; 16 | import java.util.List; 17 | 18 | /** 19 | * A Transcript is a list of Line objects - each Line contains a from and message text. 20 | */ 21 | final public class Transcript { 22 | 23 | private List transcript; 24 | 25 | /** 26 | * Empty Constructor 27 | */ 28 | public Transcript() { 29 | transcript = new ArrayList<>(); 30 | } 31 | 32 | /** 33 | * Adds a new Line to the Transcript. 34 | * @param line the line to add to the transcript. 35 | */ 36 | public void addLine(Line line) { 37 | transcript.add(line); 38 | } 39 | 40 | /** 41 | * Returns the current Chat Transcript. 42 | * @return the current Chat Transcript. 43 | */ 44 | public List getTranscript() { 45 | return transcript; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/personal/ChatMessage.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 19490 $ 4 | * $Date: 2005-08-12 10:52:02 -0700 (Fri, 12 Aug 2005) $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is the proprietary information of Jive Software. Use is 9 | subject to license terms. 10 | */ 11 | package org.jivesoftware.webchat.personal; 12 | 13 | import org.jivesoftware.webchat.util.FormText; 14 | import org.jivesoftware.webchat.util.ModelUtil; 15 | import org.jivesoftware.webchat.util.WebUtils; 16 | 17 | import org.jivesoftware.smack.packet.Message; 18 | import org.jivesoftware.smack.packet.Presence; 19 | import org.jivesoftware.smack.packet.Stanza; 20 | import org.jivesoftware.smackx.jiveproperties.JivePropertiesManager; 21 | import org.jxmpp.jid.parts.Localpart; 22 | 23 | /* RCSFile: $ 24 | * Revision: $ 25 | * Date: $ 26 | * 27 | * Copyright (C) 2004-2008 JiveSoftware, Inc. All rights reserved. 28 | * 29 | * This software is the proprietary information of CoolServlets, Inc. 30 | * Use is subject to license terms. 31 | */ 32 | 33 | public class ChatMessage { 34 | private String from; 35 | private String body; 36 | private Stanza packet; 37 | private String urlToPush; 38 | private String date; 39 | 40 | public ChatMessage(Stanza packet) { 41 | if (packet instanceof Presence) { 42 | Presence presence = (Presence)packet; 43 | from = ""; 44 | 45 | String usersNickname = presence.getFrom().getResourceOrEmpty().toString(); 46 | body = usersNickname + " has joined the conversation."; 47 | } 48 | else if (packet instanceof Message) { 49 | Message message = (Message)packet; 50 | if (JivePropertiesManager.getProperty(message, "PUSH_URL") != null) { 51 | urlToPush = (String)JivePropertiesManager.getProperty(message, "PUSH_URL"); 52 | urlToPush = WebUtils.getPushedURL(urlToPush); 53 | } 54 | else if (JivePropertiesManager.getProperty(message, "transfer")!= null) { 55 | from = ""; 56 | boolean transfer = ((Boolean)JivePropertiesManager.getProperty(message, "transfer")).booleanValue(); 57 | String workgroup = (String)JivePropertiesManager.getProperty(message, "workgroup"); 58 | if (transfer) { 59 | body = FormText.getTransferToAgentText(workgroup); 60 | } 61 | else { 62 | body = FormText.getInvitingAgentText(workgroup); 63 | } 64 | } 65 | else { 66 | String from = message.getFrom().getResourceOrEmpty().toString(); 67 | setFrom(from); 68 | setBody(""); 69 | } 70 | } 71 | } 72 | 73 | public String getFrom() { 74 | return from; 75 | } 76 | 77 | public void setFrom(String from) { 78 | this.from = from; 79 | } 80 | 81 | public void setFrom(Localpart from) { 82 | this.from = from.toString(); 83 | } 84 | 85 | public String getBody() { 86 | return body; 87 | } 88 | 89 | public void setBody(String body) { 90 | body = WebUtils.applyFilters(body); 91 | body = body.replaceAll("\n", "
"); 92 | 93 | this.body = body; 94 | } 95 | 96 | public Stanza getStanza() { 97 | return packet; 98 | } 99 | 100 | public void setStanza(Stanza packet) { 101 | this.packet = packet; 102 | } 103 | 104 | public String getUrlToPush() { 105 | return urlToPush; 106 | } 107 | 108 | public void setUrlToPush(String urlToPush) { 109 | this.urlToPush = urlToPush; 110 | } 111 | 112 | public String getDate() { 113 | return date; 114 | } 115 | 116 | public void setDate(String date) { 117 | this.date = date; 118 | } 119 | 120 | public boolean isCobrowsing() { 121 | return ModelUtil.hasLength(urlToPush); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/personal/ChatPoller.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 18739 $ 4 | * $Date: 2005-04-10 23:51:24 -0700 (Sun, 10 Apr 2005) $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is the proprietary information of Jive Software. Use is 9 | subject to license terms. 10 | */ 11 | package org.jivesoftware.webchat.personal; 12 | 13 | import org.jivesoftware.webchat.util.ModelUtil; 14 | 15 | import org.jivesoftware.smack.StanzaListener; 16 | import org.jivesoftware.smack.chat.Chat; 17 | import org.jivesoftware.smack.filter.StanzaTypeFilter; 18 | import org.jivesoftware.smack.packet.Message; 19 | import org.jivesoftware.smack.packet.Stanza; 20 | import org.jivesoftware.smack.tcp.XMPPTCPConnection; 21 | import org.jxmpp.jid.parts.Localpart; 22 | 23 | import java.util.ArrayList; 24 | import java.util.Collections; 25 | import java.util.List; 26 | 27 | /* RCSFile: $ 28 | * Revision: $ 29 | * Date: $ 30 | * 31 | * Copyright (C) 2004-2008 JiveSoftware, Inc. All rights reserved. 32 | * 33 | * This software is the proprietary information of CoolServlets, Inc. 34 | * Use is subject to license terms. 35 | */ 36 | 37 | public class ChatPoller { 38 | private List messageList; 39 | private Chat chat; 40 | 41 | public ChatPoller() { 42 | messageList = Collections.synchronizedList(new ArrayList()); 43 | } 44 | 45 | public void listenForMessages(final XMPPTCPConnection con, Chat chat) { 46 | this.chat = chat; 47 | 48 | StanzaListener packetListener = new StanzaListener() { 49 | public void processStanza(Stanza packet) { 50 | Message message = (Message) packet; 51 | if (ModelUtil.hasLength(message.getBody())) { 52 | ChatMessage chatMessage = new ChatMessage(message); 53 | Localpart from = message.getFrom().getLocalpartOrNull(); // StringUtils.parseName(message.getFrom()); 54 | String body = message.getBody(); 55 | 56 | if(body.equals("/kill")){ 57 | con.disconnect(); 58 | return; 59 | } 60 | chatMessage.setFrom(from); 61 | chatMessage.setBody(body); 62 | messageList.add(chatMessage); 63 | } 64 | } 65 | }; 66 | 67 | con.addAsyncStanzaListener(packetListener, new StanzaTypeFilter(Message.class)); 68 | } 69 | 70 | public ChatMessage getNextMessage() { 71 | if (messageList.size() > 0) { 72 | ChatMessage message = (ChatMessage)messageList.get(0); 73 | messageList.remove(message); 74 | return message; 75 | } 76 | return null; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/providers/GenericProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSfile$ 3 | * $Revision: 19153 $ 4 | * $Date: 2005-06-27 09:14:12 -0700 (Mon, 27 Jun 2005) $ 5 | * 6 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | package org.jivesoftware.webchat.providers; 13 | 14 | import org.jivesoftware.webchat.util.StringUtils; 15 | 16 | import javax.servlet.http.Cookie; 17 | import javax.servlet.http.HttpServletRequest; 18 | import javax.servlet.http.HttpServletResponse; 19 | 20 | public class GenericProvider implements MetaDataProvider { 21 | private String nickname; 22 | private String userID; 23 | private String emailAddress; 24 | private String agent; 25 | private String question; 26 | private String product; 27 | private String company; 28 | private String state; 29 | private String country; 30 | 31 | public GenericProvider(){ 32 | 33 | } 34 | 35 | public String getUsername() { 36 | return nickname; 37 | } 38 | 39 | public void setNickname(String nickname) { 40 | this.nickname = nickname; 41 | } 42 | 43 | public String getUserID() { 44 | return userID; 45 | } 46 | 47 | public void setUserID(String uniqueIdentifier) { 48 | this.userID = uniqueIdentifier; 49 | } 50 | 51 | public String getEmailAddress() { 52 | return emailAddress; 53 | } 54 | 55 | public void setEmailAddress(String emailAddress) { 56 | this.emailAddress = emailAddress; 57 | } 58 | 59 | public String getCompany() { 60 | return company; 61 | } 62 | 63 | public String getNickname() { 64 | return nickname; 65 | } 66 | 67 | public String getProduct() { 68 | return product; 69 | } 70 | 71 | public String getState() { 72 | return state; 73 | } 74 | 75 | public String getCountry() { 76 | return country; 77 | } 78 | 79 | public String getAgent() { 80 | return agent; 81 | } 82 | 83 | public void setAgent(String agent) { 84 | this.agent = agent; 85 | } 86 | 87 | public String getQuestion() { 88 | return question; 89 | } 90 | 91 | public void setQuestion(String question) { 92 | this.question = question; 93 | } 94 | 95 | public boolean filterRequest(HttpServletRequest request, HttpServletResponse response) { 96 | // Retrieve reserved words 97 | String email = request.getParameter("email"); 98 | String username = request.getParameter("username"); 99 | String question = request.getParameter("question"); 100 | String agent = request.getParameter("agent"); 101 | product = getString(request.getParameter("product")); 102 | company = getString(request.getParameter("company")); 103 | state = getString(request.getParameter("state")); 104 | country = getString(request.getParameter("country")); 105 | 106 | // Handle Unique Identifier. 107 | String userID = request.getParameter("userID"); 108 | if (userID == null) { 109 | userID = getUserCookie(request, response); 110 | } 111 | setUserID(userID); 112 | 113 | // Handle Email 114 | if (email == null) { 115 | email = "Not Specified"; 116 | } 117 | setEmailAddress(email); 118 | 119 | // Handle the nickname to show in the WebClient and Agent. 120 | if (username == null) { 121 | username = "Visitor"; 122 | } 123 | setNickname(username); 124 | 125 | 126 | if (question != null) { 127 | setQuestion(question); 128 | } 129 | 130 | if (agent != null) { 131 | setAgent(agent); 132 | } 133 | 134 | return false; 135 | } 136 | 137 | private String getUserCookie(HttpServletRequest request, HttpServletResponse response) { 138 | Cookie[] cookies = request.getCookies(); 139 | String userid = null; 140 | final int no = cookies != null ? cookies.length : 0; 141 | for (int i = 0; i < no; i++) { 142 | Cookie foundCookie = cookies[i]; 143 | String cookieName = foundCookie.getName(); 144 | if ("uniqueid".equals(cookieName)) { 145 | userid = foundCookie.getValue(); 146 | } 147 | } 148 | 149 | // If the cookie does not exist, create it and store it in the session. 150 | if (userid == null) { 151 | userid = StringUtils.randomString(10); 152 | Cookie usercookie = new Cookie("uniqueid", userid); 153 | usercookie.setMaxAge(60 * 60 * 24 * 30); 154 | response.addCookie(usercookie); 155 | } 156 | return userid; 157 | } 158 | 159 | private String getString(String s) { 160 | return s == null ? "" : s; 161 | } 162 | } 163 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/providers/MetaDataProvider.java: -------------------------------------------------------------------------------- 1 | package org.jivesoftware.webchat.providers; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | /** 7 | * $RCSfile$ 8 | * $Revision: 19153 $ 9 | * $Date: 2005-06-27 09:14:12 -0700 (Mon, 27 Jun 2005) $ 10 | *

11 | * Copyright (C) 1999-2005 Jive Software. All rights reserved. 12 | *

13 | * This software is published under the terms of the GNU Public License (GPL), 14 | * a copy of which is included in this distribution, or a commercial license 15 | * agreement with Jive. 16 | */ 17 | public interface MetaDataProvider { 18 | 19 | String getUsername(); 20 | String getUserID(); 21 | String getEmailAddress(); 22 | String getCompany(); 23 | String getAgent(); 24 | String getQuestion(); 25 | String getProduct(); 26 | String getState(); 27 | String getCountry(); 28 | 29 | boolean filterRequest(HttpServletRequest request, HttpServletResponse response); 30 | } 31 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/providers/Settings.java: -------------------------------------------------------------------------------- 1 | /** 2 | * $RCSFile$ 3 | * $Revision: 18449 $ 4 | * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $ 5 | * 6 | * Copyright (C) 2004-2008 Jive Software. All rights reserved. 7 | * 8 | * This software is published under the terms of the GNU Public License (GPL), 9 | * a copy of which is included in this distribution, or a commercial license 10 | * agreement with Jive. 11 | */ 12 | 13 | package org.jivesoftware.webchat.providers; 14 | 15 | import org.jivesoftware.webchat.util.WebLog; 16 | 17 | import org.jivesoftware.smack.SmackException.NoResponseException; 18 | import org.jivesoftware.smack.SmackException.NotConnectedException; 19 | import org.jivesoftware.smack.XMPPConnection; 20 | import org.jivesoftware.smack.XMPPException; 21 | import org.jivesoftware.smackx.iqprivate.PrivateDataManager; 22 | 23 | import java.util.Map; 24 | 25 | /** 26 | * Handles all generic metadata settings for a particular workgroup. For example, to retrieve emails settings for 27 | * demo@workgroup.localhost:

28 | *

29 |  * Settings settings = new Settings();
30 |  * Map settingsMap = settings.getSettings(con, "demo@workgroup.localhost", "email");
31 |  *
32 |  */
33 | public class Settings {
34 |     /**
35 |      * Used to retrieve offline settings. Offline settings specify what to do if
36 |      * a workgroup is not accepting requests.
37 |      */
38 |     public static final String OFFLINE_SETTINGS = "offline";
39 | 
40 |     /**
41 |      * Used to retrieve email account information.
42 |      */
43 |     public static final String EMAIL_SETTINGS = "email";
44 | 
45 |     /**
46 |      * Used to retrieve images specified for a workgroup.
47 |      */
48 |     public static final String IMAGE_SETTINGS = "images";
49 | 
50 |     private Settings() {
51 |     }
52 | 
53 |     /**
54 |      * Returns the specified settings for a Workgroup.
55 |      * @param con the XMPPConnection to use.
56 |      * @param workgroup the name of the workgroup.
57 |      * @param setting the setting to retrieve.
58 |      * @return a map of found settings.  If no settings have been found, it will
59 |      * return null.
60 |      */
61 |     public static Map getSettings(XMPPConnection con, String workgroup, String setting) {
62 | 
63 |         try {
64 |             PrivateDataManager personalPDM = PrivateDataManager.getInstanceFor(con);
65 | 
66 |             String namespace = "workgroup:" + workgroup + ":settings:" + setting;
67 |             String elementName = "workgroup_settings";
68 | 
69 |             PrivateDataManager.addPrivateDataProvider(elementName, namespace, new SettingsDataProvider());
70 |             SettingsPrivateData data = (SettingsPrivateData) personalPDM.getPrivateData(elementName, namespace);
71 |             Map map = data.getMap();
72 |             return map;
73 |         }
74 |         catch (XMPPException | NoResponseException | NotConnectedException | InterruptedException e) {
75 |             WebLog.logError("Could not load private data:", e);
76 |         }
77 |         return null;
78 |     }
79 | }
80 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/providers/SettingsDataProvider.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * $RCSFile$
 3 |  * $Revision: 18449 $
 4 |  * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $
 5 |  *
 6 |  * Copyright (C) 2004-2008 Jive Software. All rights reserved.
 7 |  *
 8 |  * This software is published under the terms of the GNU Public License (GPL),
 9 |  * a copy of which is included in this distribution, or a commercial license
10 |  * agreement with Jive.
11 |  */
12 | 
13 | package org.jivesoftware.webchat.providers;
14 | 
15 | import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
16 | import org.jivesoftware.smackx.iqprivate.provider.PrivateDataProvider;
17 | import org.xmlpull.v1.XmlPullParser;
18 | import org.xmlpull.v1.XmlPullParserException;
19 | 
20 | import java.io.IOException;
21 | import java.util.HashMap;
22 | import java.util.Map;
23 | 
24 | 
25 | /**
26 |  * Parses all generic metadata for workgroup settings.
27 |  */
28 | public class SettingsDataProvider implements PrivateDataProvider {
29 | 
30 |     /**
31 |      * Empty Constructor
32 |      */
33 |     public SettingsDataProvider() {
34 |     }
35 | 
36 |     /**
37 |      * Parses the xml stream for workgroup settings.
38 |      * @param parser the XmlPullParse to use.
39 |      * @return the PrivateData.
40 |      * @throws XmlPullParserException 
41 |      * @throws IOException 
42 |      */
43 |     public PrivateData parsePrivateData(XmlPullParser parser) throws XmlPullParserException, IOException {
44 |         final Map map = new HashMap<>();
45 |         String t = parser.getText();
46 | 
47 |         int eventType = parser.getEventType();
48 |         String privateSuperTagName = null;
49 |         boolean isPersonal = true;
50 | 
51 |         if (eventType != XmlPullParser.START_TAG) {
52 |             // throw exception
53 |         }
54 | 
55 |         eventType = parser.nextTag();
56 |         String text = parser.getName();
57 |         while (true) {
58 |             if ("entry".equals(text)) {
59 |                 eventType = parser.nextTag();
60 |                 String name = parser.getName();
61 |                 text = parser.nextText();
62 | 
63 |                 map.put(name, text);
64 |                 eventType = parser.nextTag();
65 |                 eventType = parser.nextTag();
66 |                 text = parser.getName();
67 |             }
68 |             else {
69 |                 break;
70 |             }
71 |         }
72 |         return new SettingsPrivateData("workgroup", map);
73 |     }
74 | 
75 | }
76 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/providers/SettingsPrivateData.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * $RCSFile$
 3 |  * $Revision: 18449 $
 4 |  * $Date: 2005-02-14 12:13:03 -0800 (Mon, 14 Feb 2005) $
 5 |  *
 6 |  * Copyright (C) 2004-2008 Jive Software. All rights reserved.
 7 |  *
 8 |  * This software is published under the terms of the GNU Public License (GPL),
 9 |  * a copy of which is included in this distribution, or a commercial license
10 |  * agreement with Jive.
11 |  */
12 | 
13 | package org.jivesoftware.webchat.providers;
14 | 
15 | import org.jivesoftware.smackx.iqprivate.packet.PrivateData;
16 | 
17 | import java.util.Map;
18 | 
19 | /**
20 |  * Represents the private data for the Workgroup Settings.
21 |  */
22 | public class SettingsPrivateData implements PrivateData {
23 |     private String elementName;
24 |     private String namespace;
25 |     private Map settingsMap;
26 | 
27 |     /**
28 |      * Paramter constructor to create the PrivateData to use.
29 |      * @param workgroup the name of the workgroup this private data belongs to.
30 |      * @param map the private data settings.
31 |      */
32 |     public SettingsPrivateData(String workgroup, Map map) {
33 |         super();
34 |         namespace = "workgroup:" + workgroup + ":settings:email";
35 |         elementName = "workgroup_settings";
36 |         this.settingsMap = map;
37 |     }
38 | 
39 |     /**
40 |      * Returns the private data settings.
41 |      * @return the settings.
42 |      */
43 |     public Map getMap() {
44 |         return settingsMap;
45 |     }
46 | 
47 |     /**
48 |      * PrivateData implementation
49 |      */
50 |     public String getElementName() {
51 |         return elementName;
52 |     }
53 | 
54 |     /**
55 |      * Returns the namespace.
56 |      * @return the namespace.
57 |      */
58 |     public String getNamespace() {
59 |         return namespace;
60 |     }
61 | 
62 |     /**
63 |      * Creates the xml representation of the data.
64 |      * @return
65 |      */
66 |     public String toXML() {
67 |         final StringBuffer buf = new StringBuffer();
68 |         return buf.toString();
69 |     }
70 | 
71 | }
72 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/servlets/DynamicImageServlet.java:
--------------------------------------------------------------------------------
  1 | /**
  2 |  * $RCSFile$
  3 |  * $Revision: 19018 $
  4 |  * $Date: 2005-06-09 14:41:08 -0700 (Thu, 09 Jun 2005) $
  5 |  *
  6 |  * Copyright (C) 2004-2008 Jive Software. All rights reserved.
  7 |  *
  8 |  * This software is published under the terms of the GNU Public License (GPL),
  9 |  * a copy of which is included in this distribution, or a commercial license
 10 |  * agreement with Jive.
 11 |  */
 12 | 
 13 | package org.jivesoftware.webchat.servlets;
 14 | 
 15 | import org.jivesoftware.webchat.ChatManager;
 16 | import org.jivesoftware.webchat.actions.WorkgroupStatus;
 17 | import org.jivesoftware.webchat.util.SettingsManager;
 18 | import org.jivesoftware.webchat.util.WebLog;
 19 | 
 20 | import org.jivesoftware.smack.SmackException.NoResponseException;
 21 | import org.jivesoftware.smack.SmackException.NotConnectedException;
 22 | import org.jivesoftware.smack.SmackException.NotLoggedInException;
 23 | import org.jivesoftware.smack.XMPPException;
 24 | import org.jivesoftware.smack.packet.Presence;
 25 | import org.jivesoftware.smack.roster.Roster;
 26 | import org.jxmpp.jid.BareJid;
 27 | import org.jxmpp.jid.Jid;
 28 | import org.jxmpp.jid.impl.JidCreate;
 29 | 
 30 | import java.io.IOException;
 31 | 
 32 | import javax.servlet.ServletConfig;
 33 | import javax.servlet.ServletException;
 34 | import javax.servlet.http.HttpServlet;
 35 | import javax.servlet.http.HttpServletRequest;
 36 | import javax.servlet.http.HttpServletResponse;
 37 | 
 38 | /**
 39 |  * Used to retrieve images from within an email account. This allows to bypass
 40 |  * the issues we have had with retrieving dynamic images in email accounts.
 41 |  */
 42 | public class DynamicImageServlet extends HttpServlet {
 43 | 
 44 |     public void init(ServletConfig config) throws ServletException {
 45 |         super.init(config);
 46 |     }
 47 | 
 48 |     /**
 49 |      * Process an image request.
 50 |      * @param request
 51 |      * @param response
 52 |      * @throws ServletException
 53 |      * @throws IOException
 54 |      */
 55 |     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
 56 |         // Initialize adminManager
 57 |         final String url = request.getRequestURI();
 58 |         String string = url.substring(0, url.indexOf("/image.gif"));
 59 |         String requestInfo = string.substring(string.lastIndexOf("/") + 1);
 60 | 
 61 |         int indexOfUnderline = requestInfo.indexOf("_");
 62 |         final String agentName = requestInfo.substring(0, indexOfUnderline);
 63 |         final String workgroupName = requestInfo.substring(indexOfUnderline + 1);
 64 |         BareJid agentJid = JidCreate.bareFrom(agentName);
 65 |         Jid workgroupJid = JidCreate.from(workgroupName);
 66 |         getImage(agentJid, workgroupJid, request, response);
 67 |     }
 68 | 
 69 |     private void getImage(BareJid requestAgent, Jid workgroup, HttpServletRequest request, HttpServletResponse response) {
 70 |         ChatManager chatManager = ChatManager.getInstance();
 71 | 
 72 |         try {
 73 | 
 74 |           boolean isOnline = WorkgroupStatus.isOnline(workgroup.toString());
 75 |           final SettingsManager imageManager = SettingsManager.getInstance();
 76 |   
 77 |           final Roster roster = Roster.getInstanceFor(chatManager.getGlobalConnection());
 78 |           final Presence presence = roster.getPresence(requestAgent);
 79 |   
 80 |           isOnline = isOnline && presence != null && presence.getType() == Presence.Type.available;
 81 |   
 82 |           if (!isOnline) {
 83 |               Object o = roster.getEntry(requestAgent);
 84 |               if (o == null) {
 85 |                   roster.createEntry(requestAgent, requestAgent.toString(), null);
 86 |             }
 87 |           }
 88 | 
 89 |           byte[] image;
 90 |           if (isOnline) {
 91 |               image = imageManager.getImage("personalonline", workgroup, getServletContext());
 92 |           }
 93 |           else {
 94 |               image = imageManager.getImage("personaloffline", workgroup, getServletContext());
 95 |           }
 96 |   
 97 |           imageManager.writeBytesToStream(image, response);
 98 |         }
 99 |         catch (XMPPException | NotLoggedInException | NoResponseException | NotConnectedException | InterruptedException e) {
100 |           //TODO maybe better to throw
101 |            WebLog.logError("Error creating new roster entry:", e);
102 |         }
103 | 
104 |     }
105 | 
106 | 
107 | }
108 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/servlets/ImageServlet.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * $RCSFile$
 3 |  * $Revision: 19018 $
 4 |  * $Date: 2005-06-09 14:41:08 -0700 (Thu, 09 Jun 2005) $
 5 |  *
 6 |  * Copyright (C) 2004-2008 Jive Software. All rights reserved.
 7 |  *
 8 |  * This software is published under the terms of the GNU Public License (GPL),
 9 |  * a copy of which is included in this distribution, or a commercial license
10 |  * agreement with Jive.
11 |  */
12 | 
13 | package org.jivesoftware.webchat.servlets;
14 | 
15 | import org.jivesoftware.webchat.util.SettingsManager;
16 | 
17 | import org.jxmpp.jid.Jid;
18 | import org.jxmpp.jid.impl.JidCreate;
19 | 
20 | import java.io.IOException;
21 | 
22 | import javax.servlet.ServletConfig;
23 | import javax.servlet.ServletException;
24 | import javax.servlet.http.HttpServlet;
25 | import javax.servlet.http.HttpServletRequest;
26 | import javax.servlet.http.HttpServletResponse;
27 | 
28 | /**
29 |  * Retrieves the images belonging to particular workgroup. This is used for the look and feel of
30 |  * a particular workgroup.
31 |  */
32 | public class ImageServlet extends HttpServlet {
33 |     private final String IMAGE = "image";
34 |     private final String WORKGROUP = "workgroup";
35 | 
36 |     public void init(ServletConfig config) throws ServletException {
37 |         super.init(config);
38 |     }
39 | 
40 |     public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
41 |         // Initialize adminManager
42 |         final String imageName = request.getParameter(IMAGE);
43 |         final String workgroupName = request.getParameter(WORKGROUP);
44 |         Jid workgroupJid = JidCreate.from(workgroupName);
45 | 
46 |         final SettingsManager imageManager = SettingsManager.getInstance();
47 | 
48 |         byte[] imageBytes = imageManager.getImage(imageName, workgroupJid, getServletContext());
49 |         if (imageBytes == null) {
50 |             getServletContext().log(imageName + " for " + workgroupName + " is null.");
51 |             return;
52 |         }
53 | 
54 |         imageManager.writeBytesToStream(imageBytes, response);
55 |     }
56 | }
57 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/settings/ChatSettingsManager.java:
--------------------------------------------------------------------------------
  1 | /**
  2 |  * $RCSFile$
  3 |  * $Revision: 24159 $
  4 |  * $Date: 2005-11-28 13:49:07 -0800 (Mon, 28 Nov 2005) $
  5 |  *
  6 |  * Copyright (C) 2004-2008 Jive Software. All rights reserved.
  7 |  *
  8 |  * This software is published under the terms of the GNU Public License (GPL),
  9 |  * a copy of which is included in this distribution, or a commercial license
 10 |  * agreement with Jive.
 11 |  */
 12 | 
 13 | package org.jivesoftware.webchat.settings;
 14 | 
 15 | import org.jivesoftware.webchat.util.WebLog;
 16 | import com.thoughtworks.xstream.XStream;
 17 | 
 18 | import java.io.File;
 19 | import java.io.FileReader;
 20 | import java.io.FileWriter;
 21 | import java.io.IOException;
 22 | 
 23 | /**
 24 |  * Handles the loading and saving of the Settings associated with this webapp.
 25 |  */
 26 | public class ChatSettingsManager {
 27 |     private ConnectionSettings connectionSettings;
 28 |     private XStream xstream;
 29 |     private File settingsFile;
 30 | 
 31 |     /**
 32 |      * Initialize ChatSettingsManager.
 33 |      */
 34 |     public ChatSettingsManager() {
 35 |         xstream = new XStream();
 36 |         xstream.alias("chat-settings", ConnectionSettings.class);
 37 |     }
 38 | 
 39 |     /**
 40 |      * Loads the settings file.
 41 |      *
 42 |      * @param settingsFile the File wrapper of the settings file.
 43 |      */
 44 |     public ChatSettingsManager(File settingsFile) {
 45 |         this();
 46 |         this.settingsFile = settingsFile;
 47 |     }
 48 | 
 49 |     /**
 50 |      * Returns the ChatSettings of this webapp.
 51 |      *
 52 |      * @return the ChatSettings of this webapp, otherwise returns null if one
 53 |      *         does not exist.
 54 |      */
 55 |     public ConnectionSettings getSettings() {
 56 |         if (connectionSettings != null) {
 57 |             return connectionSettings;
 58 |         }
 59 | 
 60 |         // Otherwise load
 61 |         loadSettings();
 62 | 
 63 | 
 64 |         return connectionSettings;
 65 |     }
 66 | 
 67 |     /**
 68 |      * Load the chat-settings.xml file. The chat-settings.xml should be located under the WEB-INF
 69 |      * directory of the webapp.
 70 |      */
 71 |     public void loadSettings() {
 72 |         if (settingsFile.exists()) {
 73 |             try {
 74 |                 FileReader reader = new FileReader(settingsFile);
 75 |                 connectionSettings = (ConnectionSettings)xstream.fromXML(reader);
 76 |             }
 77 |             catch (Exception e) {
 78 |                 WebLog.logError("Fastpath could not find chat-settings.xml in the WEB-INF directory of Webchat", e);
 79 |             }
 80 |         }
 81 |     }
 82 | 
 83 |     /**
 84 |      * Returns true if ChatSettings have already been set.
 85 |      *
 86 |      * @return true if ChatSettings have already been set.
 87 |      */
 88 |     public boolean hasSettings() {
 89 |         return getSettingsFile().exists();
 90 |     }
 91 | 
 92 |     /**
 93 |      * Persists the ChatSettings.
 94 |      *
 95 |      * @param settings the ChatSettings to persist.
 96 |      */
 97 |     public void save(ConnectionSettings settings) {
 98 |         FileWriter writer = null;
 99 |         try {
100 |             writer = new FileWriter(getSettingsFile());
101 |         }
102 |         catch (IOException e) {
103 |             WebLog.logError("Error saving settings:", e);
104 |         }
105 |         xstream.toXML(settings, writer);
106 |         connectionSettings = settings;
107 |     }
108 | 
109 |     /**
110 |      * Returns the ChatSettings file.
111 |      *
112 |      * @return the ChatSettings File.
113 |      */
114 |     private File getSettingsFile() {
115 |         return settingsFile;
116 |     }
117 | }
118 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/settings/ConnectionSettings.java:
--------------------------------------------------------------------------------
 1 | /**
 2 |  * $RCSFile$
 3 |  * $Revision: 19018 $
 4 |  * $Date: 2005-06-09 14:41:08 -0700 (Thu, 09 Jun 2005) $
 5 |  *
 6 |  * Copyright (C) 2004-2008 JiveSoftware, Inc. All rights reserved.
 7 |  *
 8 |  * This software is published under the terms of the GNU Public License (GPL),
 9 |  * a copy of which is included in this distribution, or a commercial license
10 |  * agreement with Jive.
11 |  */
12 | 
13 | package org.jivesoftware.webchat.settings;
14 | 
15 | /**
16 |  * Container for server connection settings. The ChatSettings are responsible for handling
17 |  * all connectivty settings to connect the Web Client service to a particular XMPPServer.
18 |   */
19 | public class ConnectionSettings {
20 |     private String serverDomain;
21 |     private int port;
22 |     private boolean sslEnabled;
23 |     private int sslPort = -1;
24 | 
25 |     /**
26 |      * Empty Constructor
27 |      */
28 |     public ConnectionSettings(){
29 | 
30 |     }
31 | 
32 |     /**
33 |      * Returns the XMPPServer domain to connect to.
34 |      * @return the XMPPServer domain.
35 |      */
36 |     public String getServerDomain() {
37 |         return serverDomain;
38 |     }
39 | 
40 |     /**
41 |      * Sets the XMPPServer domain to connect to.
42 |      * @param serverDomain the XMPPServer to connect to.
43 |      */
44 |     public void setServerDomain(String serverDomain) {
45 |         this.serverDomain = serverDomain;
46 |     }
47 | 
48 |     /**
49 |      * Returns true if SSL Connections are enabled.
50 |      * @return true if SLL Connections are enabled, otherwise false.
51 |      */
52 |     public boolean isSSLEnabled() {
53 |         return sslEnabled;
54 |     }
55 | 
56 |     /**
57 |      * Enables or disables SSL Connections.
58 |      * @param sslEnabled true to enable SSL Connections, default is false.
59 |      */
60 |     public void setSSLEnabled(boolean sslEnabled) {
61 |         this.sslEnabled = sslEnabled;
62 |     }
63 | 
64 |     /**
65 |      * Returns the SSLPort to connect to. This is only called if SSL is enabled.
66 |      * @return the port to connect to using SSL.
67 |      */
68 |     public int getSSLPort() {
69 |         return sslPort;
70 |     }
71 | 
72 |     /**
73 |      * Sets the SLL port.
74 |      * @param sslPort the SSL port to use.
75 |      */
76 |     public void setSSLPort(int sslPort) {
77 |         this.sslPort = sslPort;
78 |     }
79 | 
80 |     /**
81 |      * Returns the non-secure port to connect to.
82 |      * @return the non-secure port to connect to.
83 |      */
84 |     public int getPort() {
85 |         return port;
86 |     }
87 | 
88 |     /**
89 |      * Sets the non-secure port to connect to. Default is port 5222.
90 |      * @param port the non-secure port to connect to.
91 |      */
92 |     public void setPort(int port) {
93 |         this.port = port;
94 |     }
95 | }
96 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/sounds/SoundServlet.java:
--------------------------------------------------------------------------------
 1 | package org.jivesoftware.webchat.sounds;
 2 | 
 3 | import org.jivesoftware.webchat.ChatManager;
 4 | import org.jivesoftware.webchat.util.WebLog;
 5 | 
 6 | import org.jivesoftware.smack.SmackException.NoResponseException;
 7 | import org.jivesoftware.smack.SmackException.NotConnectedException;
 8 | import org.jivesoftware.smack.XMPPException;
 9 | import org.jivesoftware.smackx.workgroup.settings.SoundSettings;
10 | import org.jivesoftware.smackx.workgroup.user.Workgroup;
11 | import org.jxmpp.jid.Jid;
12 | import org.jxmpp.jid.impl.JidCreate;
13 | 
14 | import java.io.IOException;
15 | 
16 | import javax.servlet.ServletConfig;
17 | import javax.servlet.ServletException;
18 | import javax.servlet.http.HttpServlet;
19 | import javax.servlet.http.HttpServletRequest;
20 | import javax.servlet.http.HttpServletResponse;
21 | 
22 | public class SoundServlet extends HttpServlet {
23 | 
24 |     public void init(ServletConfig servletConfig) throws ServletException {
25 |         super.init(servletConfig);
26 |     }
27 | 
28 |     protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
29 |         doGet(request, response);
30 |     }
31 | 
32 |     protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
33 |         String workgroupName = request.getParameter("workgroup");
34 |         String action = request.getParameter("action");
35 |         Jid workgroupJid = JidCreate.from(workgroupName);
36 | 
37 |         Workgroup workgroup = new Workgroup(workgroupJid, ChatManager.getInstance().getGlobalConnection());
38 |         try {
39 |             SoundSettings soundSettings = workgroup.getSoundSettings();
40 |             response.setContentType("audio/wav");
41 |             if (action != null) {
42 |                 if ("incoming".equals(action.trim())) {
43 |                     response.getOutputStream().write(soundSettings.getIncomingSoundBytes());
44 |                 } else if ("outgoing".equals(action.trim())) {
45 |                     response.getOutputStream().write(soundSettings.getOutgoingSoundBytes());
46 |                 }
47 |             }
48 |         } catch (XMPPException | NoResponseException | NotConnectedException | InterruptedException e) {
49 |             WebLog.log("Could not load sound settings for workgroup " + workgroupName);
50 |         }
51 |     }
52 | }
53 | 


--------------------------------------------------------------------------------
/war/src/main/java/org/jivesoftware/webchat/util/FormText.java:
--------------------------------------------------------------------------------
  1 | /**
  2 |  * $RCSfile$
  3 |  * $Revision: 19493 $
  4 |  * $Date: 2005-08-12 11:22:31 -0700 (Fri, 12 Aug 2005) $
  5 |  *
  6 |  * Copyright (C) 1999-2005 Jive Software. All rights reserved.
  7 |  *
  8 |  * This software is the proprietary information of Jive Software. Use is
  9 |  subject to license terms.
 10 |  */
 11 | 
 12 | package org.jivesoftware.webchat.util;
 13 | 
 14 | import org.jivesoftware.smackx.workgroup.settings.ChatSetting;
 15 | import org.jxmpp.jid.Jid;
 16 | import org.jxmpp.jid.impl.JidCreate;
 17 | import org.jxmpp.stringprep.XmppStringprepException;
 18 | 
 19 | import java.text.SimpleDateFormat;
 20 | import java.util.Date;
 21 | 
 22 | public class FormText {
 23 | 
 24 |     public static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("MM/dd/yy h:mm");
 25 |     public static final SimpleDateFormat TIME_FORMATTER = new SimpleDateFormat("h:mm");
 26 | 
 27 |     public static String getChatRoomWelcomeMessage(String agent, String workgroup) {
 28 |         String value = getTextSetting("acceptedChat_text", workgroup);
 29 |         value = WebUtils.replace(value, "${agent}", agent);
 30 |         value = WebUtils.replace(value, "'", "\\\'");
 31 |         value = WebUtils.replace(value, "\n", "
"); 32 | 33 | return value.trim(); 34 | } 35 | 36 | public static String getWelcomeText(String workgroup) { 37 | return getTextSetting("user_input_page_title", workgroup); 38 | } 39 | 40 | public static String getChatDisconnected(String agent, String workgroup) { 41 | String value = getTextSetting("chatDisconnect_text", workgroup); 42 | value = WebUtils.replace(value, "${agent}", agent); 43 | return value; 44 | } 45 | 46 | public static String getSessionHasEnded(String agent, String workgroup) { 47 | String value = getTextSetting("chatSessionEnded_text", workgroup); 48 | value = WebUtils.replace(value, "${agent}", agent); 49 | return value; 50 | } 51 | 52 | public static String getInvitiationSent(String agent, String workgroup) { 53 | String value = getTextSetting("inviteChat_text", workgroup); 54 | value = WebUtils.replace(value, "${agent}", agent); 55 | return value; 56 | } 57 | 58 | public static String getTransferSent(String agent, String workgroup) { 59 | String value = getTextSetting("transferChat_text", workgroup); 60 | value = WebUtils.replace(value, "${agent}", agent); 61 | return value; 62 | } 63 | 64 | public static String getTranscriptText(String workgroup) { 65 | return getTextSetting("transcript_window_text", workgroup); 66 | } 67 | 68 | 69 | public static String getStartChatButtonText(String workgroup) { 70 | return getTextSetting("start_chat_button", workgroup); 71 | } 72 | 73 | public static String getQueueTitleText(String workgroup) { 74 | return getTextSetting("queue_title_text", workgroup); 75 | } 76 | 77 | public static String getQueueDescriptionText(String workgroup) { 78 | String value = getTextSetting("queue_description_text", workgroup); 79 | 80 | value = WebUtils.replace(value, "${position}", "?"); 81 | value = WebUtils.replace(value, "${waitTime}", "?"); 82 | return value; 83 | } 84 | 85 | public static String getTranscriptSent(String workgroup) { 86 | return getTextSetting("transcript_send_text", workgroup); 87 | } 88 | 89 | public static String getTranscriptNotSent(String workgroup) { 90 | return getTextSetting("transcript_not_sent_text", workgroup); 91 | } 92 | 93 | public static String agentHasEndedConversation(String agent, String workgroup) { 94 | String value = getTextSetting("chatSessionEnded_text", workgroup); 95 | value = WebUtils.replace(value, "${agent}", agent); 96 | value = WebUtils.replace(value, "\n", "
"); 97 | 98 | return value; 99 | } 100 | 101 | public static String getStartButton(String workgroup) { 102 | return getTextSetting("start_chat_button", workgroup); 103 | } 104 | 105 | public static String getNoHelpText(String workgroup) { 106 | return getTextSetting("no_help_text", workgroup); 107 | } 108 | 109 | public static String getQueueFooter(String workgroup) { 110 | return getTextSetting("queue_footer_text", workgroup); 111 | } 112 | 113 | public static String getNoAgentText(String workgroup) { 114 | String value = getTextSetting("no_agent_text", workgroup); 115 | value = WebUtils.replace(value, "'", "\\\'"); 116 | value = WebUtils.replace(value, "\n", "
"); 117 | 118 | return value.trim(); 119 | } 120 | 121 | public static String getInvitingAgentText(String workgroup) { 122 | return getTextSetting("inviteChat_text", workgroup); 123 | } 124 | 125 | public static String getTransferToAgentText(String workgroup) { 126 | return getTextSetting("transferChat_text", workgroup); 127 | } 128 | 129 | public static String getTextSetting(String key, String workgroup) { 130 | SettingsManager settingsManager = SettingsManager.getInstance(); 131 | 132 | try { 133 | Jid workgroupJid = JidCreate.from(workgroup); 134 | 135 | ChatSetting chatSettings = settingsManager.getChatSetting(key, workgroupJid); 136 | 137 | Date now = new Date(); 138 | String date = DATE_FORMATTER.format(now); 139 | String time = TIME_FORMATTER.format(now); 140 | 141 | if (chatSettings == null) { 142 | return ""; 143 | } 144 | 145 | String value = chatSettings.getValue(); 146 | value = WebUtils.replace(value, "${time}", time); 147 | value = WebUtils.replace(value, "${date}", date); 148 | return value; 149 | 150 | } catch (XmppStringprepException e) { 151 | 152 | WebLog.logError("getTextSetting : " + e.getLocalizedMessage()); 153 | return ""; 154 | 155 | } 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /war/src/main/java/org/jivesoftware/webchat/util/WebLog.java: -------------------------------------------------------------------------------- 1 | package org.jivesoftware.webchat.util; 2 | 3 | import org.jivesoftware.webchat.FastpathServlet; 4 | 5 | import java.io.File; 6 | import java.io.IOException; 7 | import java.util.logging.FileHandler; 8 | import java.util.logging.Level; 9 | import java.util.logging.Logger; 10 | import java.util.logging.SimpleFormatter; 11 | 12 | public class WebLog { 13 | static File errorFile; 14 | private static Logger LOGGER; 15 | 16 | static { 17 | // Create an appending file handler 18 | File webFile = new File(FastpathServlet.BASE_LOCATION, "WEB-INF"); 19 | 20 | File logDir = null; 21 | try { 22 | logDir = new File(webFile.getParentFile().getParentFile().getParentFile(), "logs"); 23 | } 24 | catch (Exception e) { 25 | 26 | } 27 | if (logDir != null && logDir.exists()) { 28 | errorFile = new File(logDir, "webchat-error.log"); 29 | } 30 | else { 31 | errorFile = new File(webFile, "webchat-error.log"); 32 | } 33 | 34 | 35 | try { 36 | // Create an appending file handler 37 | boolean append = true; 38 | FileHandler handler = new FileHandler(errorFile.getCanonicalPath(), append); 39 | handler.setFormatter(new SimpleFormatter()); 40 | 41 | // Add to the desired logger 42 | LOGGER = Logger.getAnonymousLogger(); 43 | LOGGER.addHandler(handler); 44 | } 45 | catch (IOException e) { 46 | e.printStackTrace(); 47 | } 48 | } 49 | 50 | 51 | public final static void changeLogFile(File file) { 52 | errorFile = file; 53 | } 54 | 55 | /** 56 | * Logs all error messages to default error logger. 57 | * 58 | * @param message a message to append to log file. 59 | * @param ex the exception being thrown. 60 | */ 61 | public final static void logError(String message, Exception ex) { 62 | LOGGER.log(Level.WARNING, message, ex); 63 | } 64 | 65 | /** 66 | * Logs all error messages to default error logger. 67 | * 68 | * @param message a message to append to log file. 69 | * @param ex the exception being thrown. 70 | */ 71 | public final static void logError(String message, Throwable ex) { 72 | LOGGER.log(Level.WARNING, message, ex); 73 | } 74 | 75 | /** 76 | * Logs all error messages to default error logger. 77 | * 78 | * @param message a message to append to log file. 79 | */ 80 | public final static void logError(String message) { 81 | LOGGER.log(Level.WARNING, message); 82 | } 83 | 84 | public final static void log(String message) { 85 | LOGGER.log(Level.INFO, message); 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /war/src/main/webapp/WEB-INF/dwr.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /war/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Fastpath Webchat 5 | Customer Chat web application. 6 | 7 | 8 | 9 | branding 10 | default 11 | 12 | 13 | brandingTitle 14 | Webchat: Fastpath 15 | 16 | 17 | 23 | 24 | 30 | 31 | 32 | SetupFilter 33 | org.jivesoftware.webchat.SetupFilter 34 | 35 | errorPage 36 | fatal.jsp 37 | 38 | 39 | 40 | CharacterEncoder 41 | org.jivesoftware.webchat.SetCharacterEncodingFilter 42 | 43 | 44 | SetupFilter 45 | /* 46 | 47 | 48 | CharacterEncoder 49 | /* 50 | 51 | 52 | 53 | 54 | 55 | FastpathServlet 56 | org.jivesoftware.webchat.FastpathServlet 57 | 58 | 59 | smackDebugger 60 | org.jivesoftware.smack.debugger.ConsoleDebugger 61 | 62 | 63 | 1 64 | 65 | 66 | ImageServlet 67 | org.jivesoftware.webchat.servlets.ImageServlet 68 | 69 | 70 | DynamicImageServlet 71 | org.jivesoftware.webchat.servlets.DynamicImageServlet 72 | 73 | 74 | SoundServlet 75 | org.jivesoftware.webchat.sounds.SoundServlet 76 | 77 | 78 | 79 | 80 | 81 | dwr-fastpath-invoker 82 | DWR Servlet 83 | Direct Web Remoter Servlet 84 | org.directwebremoting.servlet.DwrServlet 85 | 86 | 87 | crossDomainSessionSecurity 88 | false 89 | 90 | 91 | 92 | debug 93 | false 94 | Do we startup in debug/test mode? 95 | 96 | 97 | 98 | 99 | 100 | dwr-fastpath-invoker 101 | /dwr/* 102 | 103 | 104 | 105 | 106 | 107 | FastpathServlet 108 | /live/* 109 | 110 | 111 | ImageServlet 112 | /getimage 113 | 114 | 115 | DynamicImageServlet 116 | /dynoimages/* 117 | 118 | 119 | SoundServlet 120 | /sounds/* 121 | 122 | 123 | 124 | 125 | 126 | 1 127 | 128 | 129 | jnlp 130 | application/x-java-jnlp-file 131 | 132 | 133 | 134 | 135 | index.jsp 136 | 137 | 147 | 148 | -------------------------------------------------------------------------------- /war/src/main/webapp/agent-image.jsp: -------------------------------------------------------------------------------- 1 | <% 2 | request.getRequestDispatcher("/live").forward(request, response); 3 | %> 4 | -------------------------------------------------------------------------------- /war/src/main/webapp/chat-ended.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 28176 $ 4 | - $Date: 2006-03-07 10:01:10 -0800 (Tue, 07 Mar 2006) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.util.WebLog, 14 | java.io.Writer, 15 | java.io.StringWriter, 16 | java.io.PrintWriter" %> 17 | 18 | <% 19 | String workgroup = request.getParameter("workgroup"); 20 | %> 21 | 22 | 23 | 24 | Chat Ended 25 | 26 | 27 | 28 | 29 | 30 | 31 | 38 | 39 | 40 | 41 |
32 | <% if(workgroup != null){ %> 33 | 34 | <% } %> 35 | 36 | 37 |

Chat Ended
Thank you for using our chat service.
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /war/src/main/webapp/contact-agent.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.util.ParamUtils, 14 | org.jivesoftware.webchat.actions.WorkgroupStatus, 15 | org.jivesoftware.smack.XMPPConnection, 16 | org.jivesoftware.smack.roster.Roster, 17 | org.jivesoftware.smack.packet.Presence" errorPage="fatal.jsp" %> 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | <% 27 | String email = request.getParameter("email"); 28 | String agentName = request.getParameter("name"); 29 | String jid = request.getParameter("jid"); 30 | 31 | boolean isAgentOnline = WorkgroupStatus.isAgentOnline(jid); 32 | 33 | if(isAgentOnline){ 34 | response.sendRedirect("agentinfo.jsp?agentName="+agentName+"&jid="+jid+"&email="+email); 35 | return; 36 | } 37 | else { 38 | %><% 39 | } 40 | %> 41 | 42 | 43 | -------------------------------------------------------------------------------- /war/src/main/webapp/email/offline-mail.jsp: -------------------------------------------------------------------------------- 1 | <%@ page import="org.jivesoftware.webchat.util.FormText"%> 2 | <% 3 | String workgroup = request.getParameter("workgroup"); 4 | String offlineText = FormText.getNoHelpText(workgroup); 5 | 6 | %> 7 | 8 | 9 | Offline 10 | 13 | 14 | 15 | 16 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 |
19 | workgroup image 20 |

<%= offlineText%>


27 |
28 | 29 |
30 |
36 |
37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /war/src/main/webapp/exit-queue.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 14 | 15 | 16 | <% 17 | if (chatUser.hasSession()) { 18 | chatUser.removeSession(); 19 | } 20 | %> 21 | 22 | 23 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /war/src/main/webapp/exit-window.jsp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /war/src/main/webapp/fatal.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 29022 $ 4 | - $Date: 2006-04-01 21:58:02 -0800 (Sat, 01 Apr 2006) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="java.io.Writer, 14 | java.io.StringWriter, 15 | java.io.PrintWriter, 16 | org.jivesoftware.webchat.util.WebLog" %> 17 | 18 | <%@ page isErrorPage="true"%> 19 | 20 | <% 21 | if (exception != null) { 22 | try { 23 | application.log("Error in Web Client", exception); 24 | WebLog.logError("Error in web client", exception); 25 | } 26 | catch (Exception e) { 27 | e.printStackTrace(); 28 | } 29 | } 30 | 31 | %> 32 | 33 | 34 | 35 | Chat Service Not Available 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 48 | 49 | 50 | 53 | 54 | 55 | 58 | 59 |
46 |

Online Chat Service

47 |
51 | Our chat service is unavailable at this time. Please check back soon. 52 |
56 | <%= getStackTrace(exception) %> 57 |
60 | 61 | 62 | 63 | <%! 64 | public static String getStackTrace(Throwable aThrowable) { 65 | if(aThrowable == null){ 66 | return ""; 67 | } 68 | final Writer result = new StringWriter(); 69 | final PrintWriter printWriter = new PrintWriter(result); 70 | aThrowable.printStackTrace(printWriter); 71 | return result.toString(); 72 | } 73 | %> 74 | -------------------------------------------------------------------------------- /war/src/main/webapp/framemain.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri = "http://java.sun.com/jstl/core" prefix = "c"%> 2 | 3 | <%-- 4 | - $RCSfile$ 5 | - $Revision: $ 6 | - $Date: $ 7 | - 8 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 9 | - 10 | - This software is published under the terms of the GNU Public License (GPL), 11 | - a copy of which is included in this distribution, or a commercial license 12 | - agreement with Jive. 13 | --%> 14 | 15 | 16 | 17 | 18 | <c:out value="${initParam.brandingTitle}"/> 19 | 20 | 21 | 22 | 23 | 24 | 50 | 51 | 52 | 53 | " marginwidth="0" 54 | marginheight="0" scrolling="no" frameborder="0" 55 | noresize> 56 | 57 | 58 | -------------------------------------------------------------------------------- /war/src/main/webapp/global.css: -------------------------------------------------------------------------------- 1 | /* 2 | $RCSfile$ 3 | $Revision: 18603 $ 4 | $Date: 2005-03-14 18:28:28 -0800 (Mon, 14 Mar 2005) $ 5 | 6 | Copyright Jive Software, all rights reserved. 7 | */ 8 | 9 | BODY, TH, TD, DIV, P, UL, LI { 10 | font-size : 10pt; 11 | font-family : arial, helvetica, sans-serif; 12 | } 13 | BODY { 14 | background-color : #fff; 15 | } 16 | #img-logo { 17 | padding-right : 1em; 18 | } 19 | #download { 20 | list-style-image : url(../images/win.gif); 21 | } 22 | #changelog { 23 | list-style-image : url(../images/txt.gif); 24 | } 25 | #plugin { 26 | list-style-image : url(../images/plugin.gif); 27 | } 28 | #links LI { 29 | padding : 0 0 1em 0; 30 | margin : 0; 31 | } 32 | #email { 33 | padding : 1em; 34 | border : 1px #ccc solid; 35 | } 36 | #email P { 37 | font-family : courier new, monospace !important; 38 | } 39 | P { 40 | padding-top : 0px; 41 | padding-bottom : 0.5em; 42 | margin-top : 0px; 43 | margin-bottom : 0.5em; 44 | } 45 | UL { 46 | padding-top : 0px; 47 | margin-top : 0px; 48 | } 49 | .main { 50 | width : 600px; 51 | } 52 | .left-gutter { 53 | text-align : right; 54 | } 55 | .main-img { 56 | border-bottom : 1px #C5D2E3 dashed; 57 | padding-top : 38px; 58 | } 59 | .nav-links { 60 | border-bottom : 1px #C5D2E3 dashed; 61 | padding : 3px; 62 | font-size : 8pt; 63 | font-family : verdana, arial, helvetica, sans-serif; 64 | } 65 | .nav-links A { 66 | text-decoration : none; 67 | font-weight : bold; 68 | padding-right : 2em; 69 | } 70 | H4 { 71 | font-size : 12pt; 72 | font-weight : bold; 73 | } 74 | A { 75 | color : #11568C; 76 | } 77 | A:visited { 78 | 79 | } 80 | A:hover { 81 | color : #7A1D42; 82 | } 83 | .footer { 84 | margin-top : 50px; 85 | margin-bottom : 15px; 86 | border-top : 1px #C5D2E3 solid; 87 | padding : 2px; 88 | text-align : center; 89 | font-size : 8pt; 90 | font-family : verdana,arial,helvetica,sans-serif; 91 | color : #7498C0; 92 | } 93 | .footer A, .footer A:visited, .footer A:hover { 94 | color : #7498C0; 95 | } 96 | .pageheader { 97 | font-size : 12pt; 98 | font-weight : bold; 99 | } 100 | 101 | .project { 102 | border : 2px #C5D2E3 solid; 103 | } 104 | .project TH, .project TD { 105 | padding : 3px; 106 | } 107 | .project TH { 108 | text-align : left; 109 | font-size : 8pt; 110 | font-weight : bold; 111 | font-family : verdana, arial, helvetica, sans-serif; 112 | background-color : #DCE8F7; 113 | } 114 | .project .subheader TH { 115 | padding-top : 6px; 116 | border-bottom : 1px #C5D2E3 solid; 117 | } 118 | .project .category { 119 | border-bottom : 1px #C5D2E3 dashed; 120 | } 121 | .project .category { 122 | padding-top : 10px; 123 | } 124 | .project .title { 125 | font-size : 12pt; 126 | font-family : arial, helvetica, sans-serif; 127 | } 128 | .project .icon { 129 | width : 1%; 130 | text-align : center; 131 | padding-left : 6px; 132 | padding-right : 6px; 133 | } 134 | .project .even TD { 135 | background-color : #EFF5FD; 136 | } 137 | .project .size { 138 | text-align : right; 139 | padding-right : 1em; 140 | } 141 | 142 | .issues-box .sidebar-box TD { 143 | font-size : 8pt; 144 | font-family : verdana, arial, helvetica, sans-serif; 145 | } 146 | 147 | .sidebar { 148 | padding-left : 10px; 149 | } 150 | .sidebar-box { 151 | border : 1px #C5D2E3 solid; 152 | margin-bottom : 2em; 153 | } 154 | .sidebar-box TH, .sidebar-box TD { 155 | padding : 3px; 156 | } 157 | .sidebar-box TH { 158 | background-color : #DCE8F7; 159 | border-bottom : 1px #C5D2E3 solid; 160 | } 161 | .sidebar-box THEAD TH { 162 | font-size : 8pt; 163 | font-family : verdana,arial,helvetica,sans-serif; 164 | } 165 | 166 | -------------------------------------------------------------------------------- /war/src/main/webapp/help/content.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | Help Content 17 | 18 | 19 | 20 | 21 | 22 |

23 | Help Content 24 |

25 | 26 |

27 | Help content to appear here... 28 |

29 | 30 |

31 |

38 |

39 | 40 |
41 | 42 |

43 | Section 1 44 |

45 | 46 |

47 |

    48 | This is section one's content. Just some sample text goes here. Blah blah blah more sample text appears here. 49 | Just a little more sample content. 50 |
51 |

52 | 53 |

54 | Section 2 55 |

56 | 57 |

58 |

    59 | This is section one's content. Just some sample text goes here. Blah blah blah more sample text appears here. 60 | Just a little more sample content. 61 |
62 |

63 | 64 |

65 | Section 3 66 |

67 | 68 |

69 |

    70 | This is section one's content. Just some sample text goes here. Blah blah blah more sample text appears here. 71 | Just a little more sample content. This is section one's content. Just some sample text goes here. Blah blah 72 | blah more sample text appears here. Just a little more sample content. This is section one's content. Just 73 | some sample text goes here. Blah blah blah more sample text appears here. Just a little more sample content. 74 |
75 |

76 | 77 | 78 | -------------------------------------------------------------------------------- /war/src/main/webapp/helpwin.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 18400 $ 4 | - $Date: 2005-02-05 00:40:39 -0800 (Sat, 05 Feb 2005) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page errorPage = "fatal.jsp"%> 14 | 15 | <%@ include file = "include/global.jsp"%> 16 | 17 | 18 | 19 | 20 | <%= brandingTitle %> - Help 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 |

30 | <%= brandingTitle %> - Help

31 |
32 | 33 |
34 | 36 |
37 | 38 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /war/src/main/webapp/images/agent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/agent.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/blank.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/blue-background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/blue-background.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/bullet-green-14x14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/bullet-green-14x14.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/bullet-red-14x14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/bullet-red-14x14.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/bullet-yellow-14x14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/bullet-yellow-14x14.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/busy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/busy.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/check.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/angry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/angry.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/blush.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/blush.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/confused.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/confused.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/cool.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/cool.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/cry.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/devil.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/devil.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/grin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/grin.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/happy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/happy.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/laugh.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/laugh.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/love.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/love.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/mischief.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/mischief.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/plain.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/plain.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/sad.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/sad.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/shocked.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/shocked.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/silly.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/silly.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/emoticons/wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/emoticons/wink.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/end_button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/end_button.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/error-16x16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/error-16x16.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/logo-spark-circle.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/logo-spark-circle.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/personal_offline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/personal_offline.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/personal_online.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/personal_online.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/poweredBy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/poweredBy.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/secure_button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/secure_button.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/send_button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/send_button.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/send_transcript_button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/send_transcript_button.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup-header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup-header.png -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup-sidebar-bottom.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup-sidebar-bottom.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup-sidebar-top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup-sidebar-top.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_btn_bg-bigblue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_btn_bg-bigblue.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_btn_bg-grey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_btn_bg-grey.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_btn_bg-orange.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_btn_bg-orange.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_btn_closetestx.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_btn_closetestx.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_btn_gearplay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_btn_gearplay.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_contentbox_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_contentbox_bg.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_header_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_header_bg.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_helpicon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_helpicon.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_nextprofile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_nextprofile.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_bg-top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_bg-top.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_bg.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_check.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_check.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress0.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress1.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress2.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress3.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress4.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/setup_sidebar_progress5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/setup_sidebar_progress5.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/title.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/title.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/typing_button.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/typing_button.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/user.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/user.gif -------------------------------------------------------------------------------- /war/src/main/webapp/images/white_background.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igniterealtime/Fastpath-webchat/db580e8710ad8faf775ca485d8d3b59231fce479/war/src/main/webapp/images/white_background.gif -------------------------------------------------------------------------------- /war/src/main/webapp/include/global.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 18400 $ 4 | - $Date: 2005-02-05 00:40:39 -0800 (Sat, 05 Feb 2005) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <% // All global vars defined here 14 | 15 | // Get the branding scheme for this app. This will serve as a suffix for all 16 | // image names. 17 | String branding = application.getInitParameter( "branding" ); 18 | if (branding == null || "".equals(branding.trim())) { 19 | branding = "default"; 20 | } 21 | String brandingTitle = application.getInitParameter("branding-title"); 22 | %> 23 | -------------------------------------------------------------------------------- /war/src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page 14 | import="org.jivesoftware.webchat.ChatManager, 15 | org.jivesoftware.webchat.actions.WorkgroupStatus, 16 | org.jivesoftware.webchat.settings.ConnectionSettings, 17 | org.jivesoftware.smack.XMPPConnection, 18 | java.util.Collection, 19 | java.util.Iterator" errorPage="fatal.jsp" %> 20 | 21 | <% 22 | if (!Boolean.valueOf(System.getProperty("isdemo")).booleanValue()) { 23 | 24 | } 25 | %> 26 | 27 | 28 | 29 | Fastpath Web Chat 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 |
41 |
Fastpath Web Chat
42 | 43 |
44 | 45 | 46 | 47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 113 | 114 | 115 |
55 | 56 | List of available workgroups within Fastpath 57 |

58 | 59 |

60 | Click on one of the following workgroups to join. 61 |

62 | 63 |
64 | 65 | 66 | <% int count = 1; 67 | Collection workgroupList = null; 68 | Iterator workgroups = null; 69 | try { 70 | workgroupList = WorkgroupStatus.getWorkgroupNames(); 71 | workgroups = workgroupList.iterator(); 72 | } 73 | catch (Exception e) { 74 | e.printStackTrace(); 75 | } 76 | while (workgroups != null && workgroups.hasNext()) { 77 | String workgroupName = workgroups.next(); 78 | %> 79 | 80 | 81 | 82 | 87 | 88 | <% } %> 89 | 90 | <% 91 | if (workgroupList == null || workgroupList.size() == 0) { 92 | XMPPConnection con = ChatManager.getInstance().getGlobalConnection(); 93 | ConnectionSettings settings = ChatManager.getInstance().getChatSettingsManager().getSettings(); 94 | 95 | if (con == null || !con.isConnected()) { 96 | %> 97 | 98 | 99 | 100 | 101 | 102 | 103 | <% 104 | } 105 | 106 | } 107 | %> 108 | 109 |
<%= count++ %>. Workgroup: <%= workgroupName %> 83 | 86 |
Unable to connect to server using the following settings:
Server: <%= settings.getServerDomain()%>
Port: <%= settings.isSSLEnabled() ? settings.getSSLPort() : settings.getPort()%>
SSL Enabled: <%= settings.isSSLEnabled() ? "true" : "false" %>
Test Connection

Please change your server settings in the setup tool.
110 |
111 | 112 |
116 | 117 | 118 | 119 |
120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /war/src/main/webapp/jivelive.jsp: -------------------------------------------------------------------------------- 1 | //===================== 2 | // Copyright (c) 2004-2005 3 | // Fastpath 4 | // http://www.jivesoftware.com 5 | //===================== 6 | <%@ include file="common.js" %> 7 | 8 | <% 9 | String urls = request.getRequestURL().toString(); 10 | int indexs = urls.lastIndexOf( "/" ); 11 | 12 | if (indexs != -1) { 13 | urls = urls.substring( 0, indexs ); 14 | } 15 | %> 16 | 17 | function showChatButton(workgroup) { 18 | var d = new Date(); 19 | var v1 = d.getSeconds() + '' + d.getDay(); 20 | var img = "<%=urls %>/live?action=isAvailable&workgroup=" + workgroup; 21 | var gotoURL = "<%= urls %>/start.jsp?workgroup=" + workgroup + "&location=" + window.location.href; 22 | document.write( 23 | ""); 24 | } 25 | 26 | function displayWorkgroup(workgroup,online,offline) { 27 | var d = new Date(); 28 | var v1 = d.getSeconds() + '' + d.getDay(); 29 | var img = "<%=urls %>/live?action=isAvailable&workgroup=" + workgroup +"&online="+ online + "&offline="+offline; 30 | var gotoURL = "<%= urls %>/start.jsp?workgroup=" + workgroup + "&location=" + window.location.href; 31 | document.write( 32 | ""); 33 | } 34 | 35 | 36 | function showChatButtonWithAgent(workgroup, agent) { 37 | var d = new Date(); 38 | var v1 = d.getSeconds() + '' + d.getDay(); 39 | var img = "<%=urls %>/live?action=isAvailable&workgroup=" + workgroup; 40 | var gotoURL = "<%= urls %>/start.jsp?workgroup=" + workgroup + "&agent=" + agent + "&location=" + window.location.href; 41 | document.write(""); 42 | } 43 | 44 | function showButtonWithoutUI(workgroup, params){ 45 | var d = new Date(); 46 | var v1 = d.getSeconds() + '' + d.getDay(); 47 | var img = "<%=urls %>/live?action=isAvailable&workgroup=" + workgroup; 48 | 49 | var gotoURL = "<%= urls %>/start.jsp?workgroup=" + workgroup + "&location=" + window.location.href + "&noUI=true&"+params; 50 | document.write(""); 51 | } 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /war/src/main/webapp/js/scriptaculous.js: -------------------------------------------------------------------------------- 1 | var Scriptaculous = { 2 | Version: '1.5_pre4', 3 | require: function(libraryName) { 4 | // inserting via DOM fails in Safari 2.0, so brute force approach 5 | document.write(''); 6 | }, 7 | load: function() { 8 | if((typeof Prototype=='undefined') || 9 | parseFloat(Prototype.Version.split(".")[0] + "." + 10 | Prototype.Version.split(".")[1]) < 1.4) 11 | throw("script.aculo.us requires the Prototype JavaScript framework >= 1.4.0"); 12 | var scriptTags = document.getElementsByTagName("script"); 13 | for(var i=0;i 6 | 7 | // Fade interval in milliseconds 8 | // Make this larger if you experience performance issues 9 | Fadomatic.INTERVAL_MILLIS = 50; 10 | 11 | // Creates a fader 12 | // element - The element to fade 13 | // speed - The speed to fade at, from 0.0 to 100.0 14 | // initialOpacity (optional, default 100) - element's starting opacity, 0 to 100 15 | // minOpacity (optional, default 0) - element's minimum opacity, 0 to 100 16 | // maxOpacity (optional, default 0) - element's minimum opacity, 0 to 100 17 | function Fadomatic (element, rate, initialOpacity, minOpacity, maxOpacity) { 18 | this._element = element; 19 | this._intervalId = null; 20 | this._rate = rate; 21 | this._isFadeOut = true; 22 | 23 | // Set initial opacity and bounds 24 | // NB use 99 instead of 100 to avoid flicker at start of fade 25 | this._minOpacity = 0; 26 | this._maxOpacity = 99; 27 | this._opacity = 99; 28 | 29 | if (typeof minOpacity != 'undefined') { 30 | if (minOpacity < 0) { 31 | this._minOpacity = 0; 32 | } else if (minOpacity > 99) { 33 | this._minOpacity = 99; 34 | } else { 35 | this._minOpacity = minOpacity; 36 | } 37 | } 38 | 39 | if (typeof maxOpacity != 'undefined') { 40 | if (maxOpacity < 0) { 41 | this._maxOpacity = 0; 42 | } else if (maxOpacity > 99) { 43 | this._maxOpacity = 99; 44 | } else { 45 | this._maxOpacity = maxOpacity; 46 | } 47 | 48 | if (this._maxOpacity < this._minOpacity) { 49 | this._maxOpacity = this._minOpacity; 50 | } 51 | } 52 | 53 | if (typeof initialOpacity != 'undefined') { 54 | if (initialOpacity > this._maxOpacity) { 55 | this._opacity = this._maxOpacity; 56 | } else if (initialOpacity < this._minOpacity) { 57 | this._opacity = this._minOpacity; 58 | } else { 59 | this._opacity = initialOpacity; 60 | } 61 | } 62 | 63 | // See if we're using W3C opacity, MSIE filter, or just 64 | // toggling visiblity 65 | if(typeof element.style.opacity != 'undefined') { 66 | 67 | this._updateOpacity = this._updateOpacityW3c; 68 | 69 | } else if(typeof element.style.filter != 'undefined') { 70 | 71 | // If there's not an alpha filter on the element already, 72 | // add one 73 | if (element.style.filter.indexOf("alpha") == -1) { 74 | 75 | // Attempt to preserve existing filters 76 | var existingFilters=""; 77 | if (element.style.filter) { 78 | existingFilters = element.style.filter+" "; 79 | } 80 | element.style.filter = existingFilters+"alpha(opacity="+this._opacity+")"; 81 | } 82 | 83 | this._updateOpacity = this._updateOpacityMSIE; 84 | 85 | } else { 86 | 87 | this._updateOpacity = this._updateVisibility; 88 | } 89 | 90 | this._updateOpacity(); 91 | } 92 | 93 | // Initiates a fade out 94 | Fadomatic.prototype.fadeOut = function () { 95 | this._isFadeOut = true; 96 | this._beginFade(); 97 | } 98 | 99 | // Initiates a fade in 100 | Fadomatic.prototype.fadeIn = function () { 101 | this._isFadeOut = false; 102 | this._beginFade(); 103 | } 104 | 105 | // Makes the element completely opaque, stops any fade in progress 106 | Fadomatic.prototype.show = function () { 107 | this.haltFade(); 108 | this._opacity = this._maxOpacity; 109 | this._updateOpacity(); 110 | } 111 | 112 | // Makes the element completely transparent, stops any fade in progress 113 | Fadomatic.prototype.hide = function () { 114 | this.haltFade(); 115 | this._opacity = 0; 116 | this._updateOpacity(); 117 | } 118 | 119 | // Halts any fade in progress 120 | Fadomatic.prototype.haltFade = function () { 121 | 122 | clearInterval(this._intervalId); 123 | } 124 | 125 | // Resumes a fade where it was halted 126 | Fadomatic.prototype.resumeFade = function () { 127 | 128 | this._beginFade(); 129 | } 130 | 131 | // Pseudo-private members 132 | 133 | Fadomatic.prototype._beginFade = function () { 134 | 135 | this.haltFade(); 136 | var objref = this; 137 | this._intervalId = setInterval(function() { objref._tickFade(); },Fadomatic.INTERVAL_MILLIS); 138 | } 139 | 140 | Fadomatic.prototype._tickFade = function () { 141 | 142 | if (this._isFadeOut) { 143 | this._opacity -= this._rate; 144 | if (this._opacity < this._minOpacity) { 145 | this._opacity = this._minOpacity; 146 | this.haltFade(); 147 | } 148 | } else { 149 | this._opacity += this._rate; 150 | if (this._opacity > this._maxOpacity ) { 151 | this._opacity = this._maxOpacity; 152 | this.haltFade(); 153 | } 154 | } 155 | 156 | this._updateOpacity(); 157 | } 158 | 159 | Fadomatic.prototype._updateVisibility = function () { 160 | 161 | if (this._opacity > 0) { 162 | this._element.style.visibility = 'visible'; 163 | } else { 164 | this._element.style.visibility = 'hidden'; 165 | } 166 | } 167 | 168 | Fadomatic.prototype._updateOpacityW3c = function () { 169 | 170 | this._element.style.opacity = this._opacity/100; 171 | this._updateVisibility(); 172 | } 173 | 174 | Fadomatic.prototype._updateOpacityMSIE = function () { 175 | 176 | this._element.filters.alpha.opacity = this._opacity; 177 | this._updateVisibility(); 178 | } 179 | 180 | Fadomatic.prototype._updateOpacity = null; 181 | -------------------------------------------------------------------------------- /war/src/main/webapp/lostconnection.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 18450 $ 4 | - $Date: 2005-02-14 12:16:43 -0800 (Mon, 14 Feb 2005) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="java.util.*" 14 | errorPage="fatal.jsp"%> 15 | 16 | 17 | 18 | Live Assistant - Connection Lost 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 |

28 | Live Assistant

29 |
30 | 31 |
32 |
33 | 34 | 42 | 43 | 50 | 51 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /war/src/main/webapp/queue.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.actions.ChatStarter, 14 | org.jivesoftware.webchat.actions.WorkgroupStatus, 15 | org.jivesoftware.webchat.util.ModelUtil, 16 | org.jivesoftware.webchat.util.ParamUtils" %> 17 | <%@ page import="org.jivesoftware.webchat.ChatSession"%> 18 | <%@ page import="org.jivesoftware.webchat.ChatManager"%> 19 | <%@ page errorPage="fatal.jsp" %> 20 | 21 | <% 22 | ChatStarter chatStarter = new ChatStarter(); 23 | %> 24 | <% 25 | final String workgroup = ParamUtils.getParameter(request, "workgroup"); 26 | // Add workgroup to session 27 | session.setAttribute("workgroup", workgroup); 28 | final String chatID = ParamUtils.getParameter(request, "chatID"); 29 | final String question = ParamUtils.getParameter(request, "question"); 30 | session.setAttribute("chatID", chatID); 31 | if (ModelUtil.hasLength(question)) { 32 | session.setAttribute("Question", question); 33 | } 34 | if (!WorkgroupStatus.isOnline(workgroup)) { 35 | response.sendRedirect("email/leave-a-message.jsp?workgroup=" + workgroup); 36 | return; 37 | } 38 | chatStarter.init(pageContext); 39 | // Define the starting paramters for this chat session 40 | 41 | /** 42 | * @param workgroup the name of the workgroup to join. 43 | * @param chatID the unique id for this session. 44 | */ 45 | chatStarter.startSession(workgroup, chatID); 46 | %> 47 | -------------------------------------------------------------------------------- /war/src/main/webapp/queue_updater.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.ChatManager, 14 | org.jivesoftware.webchat.ChatSession, 15 | org.jivesoftware.webchat.actions.ChatQueue, 16 | org.jivesoftware.webchat.util.WebUtils"%> 17 | 18 | <%@ page errorPage = "fatal.jsp" %> 19 | <% 20 | String workgroup = request.getParameter("workgroup"); 21 | String chatID = request.getParameter("chatID"); 22 | 23 | ChatManager chatManager = ChatManager.getInstance(); 24 | ChatSession chatSession = chatManager.getChatSession(chatID); 25 | ChatQueue queue = null; 26 | %> 27 | 28 | 29 | 30 | 31 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | <% if(queue.isConnectionDropped()){%> 75 | 78 | <% } %> 79 | 80 | <% if(queue.isRouted()){ %> 81 | 84 | <% } %> 85 | 86 | <% if(queue.getQueueTime() > 0 && queue.getQueuePosition() > 0){ %> 87 | 91 | <% } %> 92 | 93 | <% if(!queue.isConnectionDropped()) { %> 94 | 95 | 107 | <% } %> 108 | -------------------------------------------------------------------------------- /war/src/main/webapp/request-agent.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.util.ParamUtils"%> 14 | 15 | 16 | 17 | Contact Agent Form 18 | 19 | <% 20 | final String agentName = ParamUtils.getParameter(request, "agent", true); 21 | final String workgroupName = ParamUtils.getParameter(request, "workgroup", true); 22 | %> 23 | 24 | 25 | 26 | 28 | 29 | 36 | 37 | If you do not see a web chat window, Click here to contact <%= agentName %> 38 | 39 | 40 | -------------------------------------------------------------------------------- /war/src/main/webapp/setup-completed.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | 14 | 15 | Setup Already Complete 16 | 17 | 18 |

19 | Setup Already Run 20 |

21 | 22 |

23 | It appears setup has already been run. To re-run 24 | setup, you need to stop your appserver, delete the "chat-settings.xml" file from the WEB-INF directory, 25 | and restart your appserver. You will then be able to reload the setup tool. 26 |

27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /war/src/main/webapp/setup-finished.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page 14 | import="java.util.Map, 15 | java.util.Iterator, 16 | org.jivesoftware.webchat.settings.ConnectionSettings, 17 | java.beans.XMLEncoder, 18 | java.io.File, 19 | org.jivesoftware.webchat.settings.ChatSettingsManager, 20 | org.jivesoftware.webchat.util.Base64, 21 | org.jivesoftware.webchat.FastpathServlet"%><%@ page import="org.jivesoftware.webchat.ChatManager" %> 22 | 23 | <% 24 | // update the sidebar status 25 | session.setAttribute("jive.setup.sidebar.1", "done"); 26 | session.setAttribute("jive.setup.sidebar.2", "done"); 27 | session.setAttribute("jive.setup.sidebar.3", "done"); 28 | session.setAttribute("jive.setup.sidebar.4", "in_progress"); 29 | 30 | boolean showSidebar = false; 31 | // Define settings file location 32 | 33 | File settingsFile = FastpathServlet.SETTINGS_FILE; 34 | 35 | ChatManager chatManager = ChatManager.getInstance(); 36 | ChatSettingsManager settingsManager = new ChatSettingsManager(settingsFile); 37 | ConnectionSettings settings = settingsManager.getSettings(); 38 | if (settings == null) { 39 | settings = new ConnectionSettings(); 40 | } 41 | chatManager.setChatSettingsManager(settingsManager); 42 | 43 | // First, update with XMPPSettings 44 | Map xmppSettings = (Map)session.getAttribute("xmppSettings"); 45 | String domain = (String)xmppSettings.get("xmpp.domain"); 46 | String port = (String)xmppSettings.get("xmpp.socket.plain.port"); 47 | String sslEnabled = (String)xmppSettings.get("xmpp.socket.ssl.active"); 48 | String ssl = (String)xmppSettings.get("xmpp.socket.ssl.port"); 49 | String password = (String)xmppSettings.get("presencebot"); 50 | 51 | int sslPort = -1; 52 | boolean isSSLEnabled = Boolean.valueOf(sslEnabled).booleanValue(); 53 | if (isSSLEnabled) { 54 | sslPort = Integer.parseInt(ssl); 55 | settings.setSSLEnabled(true); 56 | settings.setSSLPort(sslPort); 57 | } 58 | settings.setServerDomain(domain); 59 | settings.setPort(Integer.parseInt(port)); 60 | 61 | settingsManager.save(settings); 62 | %> 63 | 64 | 65 | 66 | 67 | Webchat Setup 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 |
78 |
Webchat Setup
79 | 80 |
81 | 82 | 83 | 84 |
85 | 86 |

87 | Webchat installation is now complete. To test your installation, click on the following image: 88 |

89 | 90 | 91 | 94 | 95 |
96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | -------------------------------------------------------------------------------- /war/src/main/webapp/start.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="java.util.Enumeration, 14 | org.jivesoftware.webchat.util.ModelUtil, 15 | org.jivesoftware.webchat.util.ParamUtils, 16 | org.jivesoftware.webchat.actions.WorkgroupStatus, 17 | org.jivesoftware.webchat.util.StringUtils" errorPage="fatal.jsp" %> 18 | 19 | <% 20 | String workgroup = ParamUtils.getParameter(request, "workgroup"); 21 | 22 | // Get Agent and add to session 23 | String agent = ParamUtils.getParameter(request, "agent"); 24 | 25 | // Get Page Location and add to session. 26 | String pageLocation = ParamUtils.getParameter(request, "location"); 27 | 28 | // Does the user want to go directly to the Queue? 29 | boolean noUI = ParamUtils.getBooleanParameter(request, "noUI"); 30 | 31 | StringBuffer paramString = new StringBuffer(); 32 | 33 | // Generate a chatID. This id will be used to identify the user throughout the entire 34 | // chat process. 35 | String chatID = StringUtils.randomString(10); 36 | paramString.append("chatID="+chatID); 37 | 38 | if(ModelUtil.hasLength(workgroup)){ 39 | paramString.append("&workgroup="+workgroup); 40 | } 41 | 42 | if(ModelUtil.hasLength(agent)){ 43 | paramString.append("&agent="+agent); 44 | } 45 | 46 | if(ModelUtil.hasLength(pageLocation)){ 47 | session.setAttribute("pageLocation", pageLocation); 48 | } 49 | 50 | if (WorkgroupStatus.isOnline(workgroup)) { 51 | if (noUI) { 52 | Enumeration requestEnum = request.getParameterNames(); 53 | while (requestEnum.hasMoreElements()) { 54 | String name = (String) requestEnum.nextElement(); 55 | String value = request.getParameter(name); 56 | if(name.equalsIgnoreCase("username")){ 57 | name = "username"; 58 | } 59 | if(name.equalsIgnoreCase("email")){ 60 | name = "email"; 61 | } 62 | paramString.append("&" + name + "=" + value); 63 | } 64 | 65 | String dest = paramString.toString(); 66 | 67 | if(!ModelUtil.hasLength(workgroup)){ 68 | out.println("A workgroup must be specified."); 69 | return; 70 | } 71 | 72 | String name = request.getParameter("username"); 73 | if(!ModelUtil.hasLength(name)){ 74 | out.println("A username must be specified."); 75 | return; 76 | } 77 | 78 | response.sendRedirect("queue.jsp?"+dest); 79 | } 80 | else{ 81 | response.sendRedirect("userinfo.jsp?"+paramString.toString()); 82 | } 83 | } 84 | else{ 85 | response.sendRedirect("email/leave-a-message.jsp?"+paramString.toString()); 86 | } 87 | %> 88 | -------------------------------------------------------------------------------- /war/src/main/webapp/submitter.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.util.ParamUtils, 14 | org.jivesoftware.webchat.util.ModelUtil, 15 | org.jivesoftware.webchat.ChatManager, 16 | org.jivesoftware.webchat.ChatSession"%> 17 | 18 | <% 19 | final String chatID = request.getParameter("chatID"); 20 | ChatManager chatManager = ChatManager.getInstance(); 21 | ChatSession chatSession = chatManager.getChatSession(chatID); 22 | 23 | // Handle Parameters 24 | String message = ParamUtils.getParameter(request, "message"); 25 | String isTyping = ParamUtils.getParameter(request, "isTyping"); 26 | String leaving = ParamUtils.getParameter(request, "left"); 27 | %> 28 | 29 | 30 | 31 | 32 | 33 |
34 | 35 | 36 | 37 | 38 | 39 |
40 | 41 |
42 | 43 |
44 | 45 | <% 46 | if (ModelUtil.hasLength(message)) { 47 | 48 | } 49 | if (ModelUtil.hasLength(isTyping)) { 50 | 51 | } 52 | 53 | if (ModelUtil.hasLength(leaving)) { 54 | chatManager.closeChatSession(chatID); 55 | } 56 | %> 57 | 58 | 59 | -------------------------------------------------------------------------------- /war/src/main/webapp/test-connection.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: $ 4 | - $Date: $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import="org.jivesoftware.webchat.ChatManager" %> 14 | <%@ page import="org.jivesoftware.webchat.settings.ConnectionSettings" %> 15 | <%@page import="org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration"%> 16 | <%@page import="org.jivesoftware.smack.tcp.XMPPTCPConnection"%> 17 | <%@ page import="org.jivesoftware.smack.XMPPException" %> 18 | <%@ page import="java.io.PrintWriter" %> 19 | <%@ page import="java.io.StringWriter" %> 20 | <%@ page import="java.io.Writer" %> 21 | <%@ page import="org.jivesoftware.smack.ConnectionConfiguration" %> 22 | 23 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 24 | 25 | Test Server Connection 26 | 27 | 28 | 29 | 30 | 31 | 32 | 65 | 66 |

Server Connection Test

Results: 33 | <% 34 | ConnectionSettings settings = ChatManager.getInstance().getChatSettingsManager().getSettings(); 35 | boolean ok = false; 36 | XMPPTCPConnection con = null; 37 | try { 38 | XMPPTCPConnectionConfiguration.Builder xmppConfig = XMPPTCPConnectionConfiguration.builder() 39 | .setSecurityMode(XMPPTCPConnectionConfiguration.SecurityMode.disabled) 40 | .setXmppDomain(settings.getServerDomain()) 41 | .setHost(settings.getServerDomain()) 42 | .setPort(settings.getPort()); 43 | xmppConfig.performSaslAnonymousAuthentication(); 44 | con = new XMPPTCPConnection(xmppConfig.build()); 45 | con.connect(); 46 | con.login(); 47 | ok = true; 48 | } 49 | catch (XMPPException e) { 50 | final Writer result = new StringWriter(); 51 | final PrintWriter printWriter = new PrintWriter(result); 52 | e.printStackTrace(printWriter); 53 | out.println("

" + result.toString() + "

"); 54 | } 55 | finally { 56 | if (con != null && con.isConnected()) { 57 | con.disconnect(); 58 | } 59 | } 60 | %> 61 | <% if (ok) { %> 62 | Connected! 63 | <% } %> 64 |
67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /war/src/main/webapp/transcriptprint.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 18450 $ 4 | - $Date: 2005-02-14 12:16:43 -0800 (Mon, 14 Feb 2005) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page import = "java.util.*" 14 | errorPage = "fatal.jsp"%> 15 | 16 | 17 | 18 | 19 | Transcript 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 |

29 | Support Transcript

30 |
31 | 32 |
33 |
34 | 35 |
36 | 38 |
39 | 40 |
41 | 42 | 43 | 44 |
45 | 46 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /war/src/main/webapp/transcriptsrc.jsp: -------------------------------------------------------------------------------- 1 | <%-- 2 | - $RCSfile$ 3 | - $Revision: 18732 $ 4 | - $Date: 2005-04-08 14:50:03 -0700 (Fri, 08 Apr 2005) $ 5 | - 6 | - Copyright (C) 2003-2008 Jive Software. All rights reserved. 7 | - 8 | - This software is published under the terms of the GNU Public License (GPL), 9 | - a copy of which is included in this distribution, or a commercial license 10 | - agreement with Jive. 11 | --%> 12 | 13 | <%@ page 14 | import ="org.jivesoftware.webchat.history.*, 15 | java.util.*, 16 | org.jivesoftware.webchat.ChatManager, 17 | org.jivesoftware.webchat.ChatSession, 18 | org.jivesoftware.webchat.util.ModelUtil" 19 | errorPage="fatal.jsp"%> 20 | 21 | <%@ include file="include/global.jsp"%> 22 | 23 | <% 24 | String chatID = request.getParameter("chatID"); 25 | ChatManager chatManager = ChatManager.getInstance(); 26 | ChatSession chatSession = chatManager.getChatSession(chatID); 27 | if(chatSession == null){ 28 | response.sendRedirect("chat-ended.jsp"); 29 | } 30 | 31 | // Get the transcript from the session 32 | Transcript transcript = chatSession.getTranscript(); 33 | chatManager.closeChatSession(chatID); 34 | %> 35 | 36 | 37 | 38 | Chat Transcripts 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 |
47 |
48 |
49 | 50 |
51 | <% 52 | if (transcript != null) { 53 | %> 54 | 55 | <% 56 | String question = (String)session.getAttribute("Question"); 57 | if(ModelUtil.hasLength(question)){ 58 | %>
Question: <%= question%>
<% 59 | } 60 | 61 | 62 | List transcriptLines = transcript.getTranscript(); 63 | 64 | for (int i = 0; i < transcriptLines.size(); i++) { 65 | Line line = transcriptLines.get(i); 66 | 67 | String from = line.getFrom().toString(); 68 | String text = line.getText(); 69 | String cp = request.getContextPath(); 70 | String full = request.getRequestURL().toString(); 71 | int index = full.indexOf(cp); 72 | String base = full.substring(0, (index + cp.length())); 73 | 74 | text = text.replaceAll("src=\"", "src=\"" + base + "/"); 75 | boolean isAnnouncement = !ModelUtil.hasLength(from); 76 | %> 77 | 78 |
79 | <% 80 | if (isAnnouncement) { 81 | %> 82 | 83 | <%= text %> 84 | 85 | <% 86 | } 87 | else{ 88 | %> 89 | 90 | "> <%= from %>: 91 | <%= text %> 92 | 93 | <% 94 | } 95 | %> 96 |
97 | 98 | <% 99 | } 100 | %> 101 | 102 | <% 103 | } 104 | %> 105 |
106 |
107 |
108 | 109 | 110 | -------------------------------------------------------------------------------- /war/src/main/webapp/yakframe.html: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 |
22 | 23 |
24 |
25 |
26 | 27 | 28 | --------------------------------------------------------------------------------