Author: sebawagner
Date: Thu Feb 23 20:47:58 2012
New Revision: 1292946

URL: http://svn.apache.org/viewvc?rev=1292946&view=rev
Log:
Remove JrDesktop and RTP implementations

Removed:
    incubator/openmeetings/trunk/singlewebapp/WebContent/openmeetings/screen/
    incubator/openmeetings/trunk/singlewebapp/lib/java2swf/
    incubator/openmeetings/trunk/singlewebapp/lib/jmf/
    incubator/openmeetings/trunk/singlewebapp/lib/upload/iText-5.0.5.jar
    incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/rtp/
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPMethodServlet.java
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/RTPSharerServlet.java
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenServlet.java
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenViewHandler.java
    incubator/openmeetings/trunk/singlewebapp/src/screenviewer/
    incubator/openmeetings/trunk/singlewebapp/src/templates/rtp_player_applet.vm
    
incubator/openmeetings/trunk/singlewebapp/src/templates/screencast_jrdesktop.vm
    
incubator/openmeetings/trunk/singlewebapp/src/templates/screencast_odsp_sharertemplate.vm
    
incubator/openmeetings/trunk/singlewebapp/src/templates/screencast_odsp_viewertemplate.vm
    incubator/openmeetings/trunk/singlewebapp/src/templates/screencast_rtp.vm
    
incubator/openmeetings/trunk/singlewebapp/src/templates/screencast_template.vm
Modified:
    incubator/openmeetings/trunk/singlewebapp/.classpath
    
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
    incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml
    incubator/openmeetings/trunk/singlewebapp/build.xml
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java
    
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java

Modified: incubator/openmeetings/trunk/singlewebapp/.classpath
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/.classpath?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/.classpath (original)
+++ incubator/openmeetings/trunk/singlewebapp/.classpath Thu Feb 23 20:47:58 
2012
@@ -4,7 +4,6 @@
        <classpathentry kind="src" path="src/src_tool"/>
        <classpathentry kind="src" path="src/fileservice"/>
        <classpathentry kind="src" path="src/roomservice"/>
-       <classpathentry kind="src" path="src/screenviewer"/>
        <classpathentry kind="src" path="src/templates"/>
        <classpathentry kind="src" path="src/test"/>
        <classpathentry kind="src" path="src/userservice"/>
@@ -266,11 +265,6 @@
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
                </attributes>
        </classpathentry>
-       <classpathentry exported="true" kind="lib" path="lib/jmf/jmf.jar">
-               <attributes>
-                       <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
-               </attributes>
-       </classpathentry>
        <classpathentry exported="true" kind="lib" 
path="lib/openjpa2/commons-dbcp-1.4.jar">
                <attributes>
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
@@ -656,16 +650,6 @@
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
                </attributes>
        </classpathentry>
-       <classpathentry exported="true" kind="lib" 
path="lib/java2swf/java2swf.jar">
-               <attributes>
-                       <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
-               </attributes>
-       </classpathentry>
-       <classpathentry exported="true" kind="lib" 
path="lib/upload/iText-5.0.5.jar">
-               <attributes>
-                       <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
-               </attributes>
-       </classpathentry>
        <classpathentry exported="true" kind="lib" 
path="red5-1.0.0-r4315/dist/red5.jar">
                <attributes>
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
@@ -761,11 +745,6 @@
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
                </attributes>
        </classpathentry>
-       <classpathentry exported="true" kind="lib" 
path="WebContent/openmeetings/screen/kunststoff.jar">
-               <attributes>
-                       <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
-               </attributes>
-       </classpathentry>
        <classpathentry exported="true" kind="lib" 
path="lib/spring/org.springframework.aop-3.0.6.RELEASE.jar">
                <attributes>
                        <attribute 
name="org.eclipse.jst.component.nondependency" value=""/>
@@ -836,5 +815,6 @@
        <classpathentry kind="lib" 
path="red5-1.0.0-r4315/dist/lib/httpcore-4.1.3.jar"/>
        <classpathentry kind="lib" 
path="red5-1.0.0-r4315/dist/lib/jaudiotagger-2.0.4-SNAPSHOT.jar"/>
        <classpathentry kind="lib" 
path="red5-1.0.0-r4315/dist/lib/jcl-over-slf4j-1.6.1.jar"/>
+       <classpathentry kind="lib" 
path="WebContent/red5-screenshare/kunststoff.jar"/>
        <classpathentry kind="output" path="build/classes"/>
 </classpath>

Modified: 
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/openmeetings-applicationContext.xml
 Thu Feb 23 20:47:58 2012
@@ -140,7 +140,6 @@
        <bean id="authLevelManagement" 
class="org.openmeetings.app.data.basic.AuthLevelmanagement" />
        <bean id="generateSWF" 
class="org.openmeetings.app.documents.GenerateSWF" />
        <bean id="fileUtils" class="org.openmeetings.app.data.file.FileUtils" />
-       <bean id="rtpStreamingHandler" 
class="org.openmeetings.app.rtp.RTPStreamingHandler" />
        <bean id="ldapLoginManagement" 
class="org.openmeetings.app.ldap.LdapLoginManagement" />
        <bean id="timezoneUtil" 
class="org.openmeetings.utils.math.TimezoneUtil" />
        

Modified: incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml 
(original)
+++ incubator/openmeetings/trunk/singlewebapp/WebContent/WEB-INF/web.xml Thu 
Feb 23 20:47:58 2012
@@ -93,30 +93,10 @@
         
<servlet-class>org.openmeetings.servlet.outputhandler.Install</servlet-class>
     </servlet>
     <servlet>
-        <servlet-name>UploadHandler</servlet-name>
-        
<servlet-class>org.openmeetings.servlet.outputhandler.UploadHandler</servlet-class>
-    </servlet>
-    <servlet>
         <servlet-name>FileExplorerUploadHandler</servlet-name>
         
<servlet-class>org.openmeetings.servlet.outputhandler.FileExplorerUploadHandler</servlet-class>
     </servlet>
     <servlet>
-        <servlet-name>ScreenServlet</servlet-name>
-        
<servlet-class>org.openmeetings.servlet.outputhandler.ScreenServlet</servlet-class>
-    </servlet>
-    <servlet>
-        <servlet-name>RtpSharerServlet</servlet-name>
-        
<servlet-class>org.openmeetings.servlet.outputhandler.RTPSharerServlet</servlet-class>
-    </servlet>
-     <servlet>
-        <servlet-name>RTPMethodServlet</servlet-name>
-        
<servlet-class>org.openmeetings.servlet.outputhandler.RTPMethodServlet</servlet-class>
-    </servlet>
-    <servlet>
-        <servlet-name>ScreenViewHandler</servlet-name>
-        
<servlet-class>org.openmeetings.servlet.outputhandler.ScreenViewHandler</servlet-class>
-    </servlet>
-    <servlet>
         <servlet-name>ScreenRequestHandler</servlet-name>
         
<servlet-class>org.openmeetings.servlet.outputhandler.ScreenRequestHandler</servlet-class>
     </servlet>
@@ -189,30 +169,10 @@
         <url-pattern>/install</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>UploadHandler</servlet-name>
-        <url-pattern>/UploadHandler</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
         <servlet-name>FileExplorerUploadHandler</servlet-name>
         <url-pattern>/FileExplorerUploadHandler</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
-        <servlet-name>ScreenServlet</servlet-name>
-        <url-pattern>/ScreenServlet</url-pattern>
-    </servlet-mapping>
-     <servlet-mapping>
-        <servlet-name>RtpSharerServlet</servlet-name>
-        <url-pattern>/RtpSharerServlet</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>RTPMethodServlet</servlet-name>
-        <url-pattern>/RTPMethodServlet</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
-        <servlet-name>ScreenViewHandler</servlet-name>
-        <url-pattern>/ScreenViewHandler</url-pattern>
-    </servlet-mapping>
-    <servlet-mapping>
         <servlet-name>ScreenRequestHandler</servlet-name>
         <url-pattern>/ScreenRequestHandler</url-pattern>
     </servlet-mapping>

Modified: incubator/openmeetings/trunk/singlewebapp/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/build.xml?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- incubator/openmeetings/trunk/singlewebapp/build.xml (original)
+++ incubator/openmeetings/trunk/singlewebapp/build.xml Thu Feb 23 20:47:58 2012
@@ -4,7 +4,6 @@
 
        <!-- Sources and output dirs -->
        <property name="main.src.dir" value="${basedir}/src/app" />
-       <property name="webstart.src.dir" value="${basedir}/src/screenviewer" />
        <property name="templates.src.dir" value="${basedir}/src/templates" />
        <property name="test.src.dir" value="${basedir}/src/test" />
        <property name="main.out.dir" value="${basedir}/bin" />
@@ -84,15 +83,12 @@
        <property name="ical.lib" value="${project.lib}/ical4j" />
        <!-- Apache Axis2 -->
        <property name="axis2.lib" value="${project.lib}/axis2-1.6" />
-       <!-- JMF Libe -->
-       <property name="jmf.lib" value="${project.lib}/jmf" />
        <!-- SLF4J -->
        <property name="slf4j.lib" value="${project.lib}/slf4j" />
        <!-- Apache Velocity -->
        <property name="velocity.lib" value="${project.lib}/velocity" />
        <!-- Apache Batik -->
        <property name="batik.lib" value="${project.lib}/batik_17" />
-       <property name="java2swf.lib" value="${project.lib}/java2swf" />
        <!-- Junit -->
        <property name="junit.lib" value="${project.lib}/junit" />
        <!-- Mina -->
@@ -123,8 +119,6 @@
                <fileset dir="${velocity.lib}" includes="*.jar" />
                <fileset dir="${batik.lib}" includes="*.jar" />
                <fileset dir="${ical.lib}" includes="*.jar" />
-               <fileset dir="${java2swf.lib}" includes="*.jar" />
-               <fileset dir="${jmf.lib}" includes="*.jar" />
                <fileset dir="${mina.lib}" includes="*.jar" />
                <fileset dir="${junit.lib}" includes="*.jar" />
                <fileset dir="${screenshare.lib}" includes="*kunststoff.jar" />
@@ -247,7 +241,6 @@
                </copy>
 
                <chmod dir="${dist.dir}/red5" perm="755" includes="**/*.sh" />
-               <chmod dir="${dist.webapps.dir}/screen" perm="755" 
includes="**/*.sh" />
 
                <copy todir="${dist.webapps.dir}/WEB-INF/lib">
                        <fileset dir="${axis2.lib}">
@@ -259,8 +252,6 @@
                        <fileset dir="${xstream.lib}" />
                        <fileset dir="${database.lib}" />
                        <fileset dir="${ical.lib}" />
-                       <fileset dir="${java2swf.lib}" />
-                       <fileset dir="${jmf.lib}" includes="*.jar" />
                </copy>
 
                <copy todir="${dist.webapps.dir}/WEB-INF/classes/META-INF">
@@ -304,16 +295,6 @@
                                        <include name="**/*.vm" />
                                </patternset>
                        </fileset>
-                       <fileset dir="${webstart.src.dir}">
-                               <patternset>
-                                       <include name="**/*.conf" />
-                                       <include name="**/*.properties" />
-                                       <include name="**/*.xml" />
-                                       <include name="**/*.png" />
-                                       <include name="**/*.vm" />
-                               </patternset>
-                       </fileset>
-
                        <fileset dir="${templates.src.dir}">
                                <patternset>
                                        <include name="**/*.conf" />
@@ -375,49 +356,13 @@
                                <attribute name="Class-Path" value="conf/ 
${jar.classpath}" />
                        </manifest>
                </jar>
-               <jar destfile="${dist.webapps.dir}/screen/screenviewer.jar">
-                       <fileset dir="${classes.dir}">
-                               <include name="**/webstart/**" />
-                               <include name="**/*png" />
-                       </fileset>
-                       <manifest>
-                               <attribute name="Built-By" value="OpenMeetings 
- http://openmeetings.googlecode.com"; />
-                               <attribute name="Built-On" 
value="${build.TODAY}" />
-                               <attribute name="Class-Path" value="conf/ 
${jar.classpath}" />
-                       </manifest>
-               </jar>
-               <jar 
destfile="${dist.webapps.dir}/screen/${project.distname}-client.jar">
-                       <fileset dir="${classes.dir}">
-                               <include name="log4j.properties" />
-                               <include name="**/client/**" />
-                               <include name="**/*png" />
-                       </fileset>
-                       <manifest>
-                               <attribute name="Built-By" value="OpenMeetings 
- http://openmeetings.googlecode.com"; />
-                               <attribute name="Built-On" 
value="${build.TODAY}" />
-                               <attribute name="Class-Path" value="conf/ 
${jar.classpath}" />
-                       </manifest>
-               </jar>
-               <jar destfile="${dist.webapps.dir}/screen/rtpviewer.jar">
-                       <fileset dir="${classes.dir}">
-                               <include name="log4j.properties" />
-                               <include name="**/de/**" />
-                               <exclude name="**/applet/**" />
-                       </fileset>
-                       <manifest>
-                               <attribute name="Built-By" value="OpenMeetings 
- http://openmeetings.googlecode.com"; />
-                               <attribute name="Built-On" 
value="${build.TODAY}" />
-                               <attribute name="Class-Path" value="conf/ 
${jar.classpath}" />
-                       </manifest>
-               </jar>
-
+               
                <!-- Build WebServices -->
                <jar 
destfile="${dist.webapps.dir}/WEB-INF/services/OpenMeetingsService.aar">
                        <fileset dir="src/">
                                <include name="META-INF/services.xml" />
                        </fileset>
                </jar>
-
                <jar 
destfile="${dist.webapps.dir}/WEB-INF/lib/openmeetings-WebService.jar">
                        <fileset dir="${classes.dir}">
                                <include name="**/openmeetings/axis/**" />
@@ -452,16 +397,6 @@
                <tstamp prefix="build">
                        <format property="TODAY" pattern="d-MMMM-yyyy" 
locale="en" />
                </tstamp>
-               <jar destfile="${dist.webapps.dir}/screen/rtpapplet.jar">
-                       <fileset dir="${classes.dir}">
-                               <include name="**/applet/**" />
-                       </fileset>
-                       <manifest>
-                               <attribute name="Built-By" value="OpenMeetings 
- http://openmeetings.googlecode.com"; />
-                               <attribute name="Built-On" 
value="${build.TODAY}" />
-                               <attribute name="Class-Path" value="conf/ 
${jar.classpath}" />
-                       </manifest>
-               </jar>
        </target>
 
        <target name="signWebStartJars">
@@ -476,9 +411,6 @@
                </genkey>
                <signjar alias="filetest" keystore="filetest.keystore" 
storepass="secret" lazy="false">
                        <path>
-                               <fileset dir="${dist.webapps.dir}/screen">
-                                       <include name="**/*.jar" />
-                               </fileset>
                                <fileset dir="${screenshare.out.dir}">
                                        <include name="**/*.jar" />
                                </fileset>
@@ -546,9 +478,6 @@
                <javac debug="on" debuglevel="lines,vars,source" 
srcdir="${doclet.src.dir}" destdir="${main.out.dir}">
                        <classpath refid="compile.classpath" />
                </javac>
-               <javac debug="on" debuglevel="lines,vars,source" 
srcdir="${webstart.src.dir}" destdir="${main.out.dir}">
-                       <classpath refid="compile.classpath" />
-               </javac>
                <javac debug="on" debuglevel="lines,vars,source" 
srcdir="${templates.src.dir}" destdir="${main.out.dir}">
                        <classpath refid="compile.classpath" />
                </javac>
@@ -659,7 +588,6 @@
        <target name="report_rat">
                <rat:report>
                        <fileset dir="${main.src.dir}" />
-                       <fileset dir="${webstart.src.dir}" />
                        <fileset dir="${templates.src.dir}" />
                        <fileset dir="${test.src.dir}" />
                        <fileset dir="${screen.src.dir}" />

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/app/remote/red5/ScopeApplicationAdapter.java
 Thu Feb 23 20:47:58 2012
@@ -2706,6 +2706,11 @@ public class ScopeApplicationAdapter ext
                }
                return null;
        }
+       
+       //FIXME: legacy code, needs to be removed
+       public boolean checkSharerSession() {
+               return true;
+       }
 
        /**
         * Stop the recording of the streams and send event to connected users 
of scope

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/ScreenRequestHandler.java
 Thu Feb 23 20:47:58 2012
@@ -32,8 +32,6 @@ import org.openmeetings.app.data.basic.S
 import org.openmeetings.app.persistence.beans.basic.Configuration;
 import org.openmeetings.app.persistence.beans.lang.Fieldlanguagesvalues;
 import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
-import org.openmeetings.app.rtp.RTPScreenSharingSession;
-import org.openmeetings.app.rtp.RTPStreamingHandler;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 import org.springframework.context.ApplicationContext;
@@ -84,19 +82,6 @@ public class ScreenRequestHandler extend
                return null;
        }
 
-       public RTPStreamingHandler getRtpStreamingHandler() {
-               try {
-                       if (ScopeApplicationAdapter.initComplete) {
-                               ApplicationContext context = 
WebApplicationContextUtils
-                                               
.getWebApplicationContext(getServletContext());
-                               return (RTPStreamingHandler) context
-                                               .getBean("rtpStreamingHandler");
-                       }
-               } catch (Exception err) {
-                       log.error("[getRtpStreamingHandler]", err);
-               }
-               return null;
-       }
 
        @Override
        public Template handleRequest(HttpServletRequest httpServletRequest,
@@ -104,9 +89,7 @@ public class ScreenRequestHandler extend
 
                try {
 
-                       if (getRtpStreamingHandler() == null
-                                       || getRtpStreamingHandler() == null
-                                       || getSessionManagement() == null) {
+                       if (getSessionManagement() == null) {
                                return 
getVelocityView().getVelocityEngine().getTemplate(
                                                "booting.vm");
                        }
@@ -214,13 +197,7 @@ public class ScreenRequestHandler extend
                        httpServletResponse.setHeader("Content-Disposition",
                                        "Inline; filename=\"" + requestedFile + 
"\"");
 
-                       // Check , which screenviewer is to be used
-                       
org.openmeetings.app.persistence.beans.basic.Configuration conf = 
getCfgManagement()
-                                       .getConfKey(3L, "screen_viewer");
 
-                       String template = "screencast_odsp_sharertemplate.vm";
-
-                       
                        log.debug("language_id :: " + language_id);
 
                        Fieldmanagment fieldmanagment = getFieldmanagment();
@@ -321,124 +298,80 @@ public class ScreenRequestHandler extend
 
                        log.debug("Creating JNLP Template for TCP solution");
 
-                       if (mode.equals("sharer") && conf != null) {
-                               String confVal = conf.getConf_value();
+                       if (mode.equals("sharer")) {
 
                                try {
-                                       int conf_i = Integer.parseInt(confVal);
 
-                                       if (conf_i == 0) {
+                                       log.debug("RTMP Sharer labels :: " + 
label_sharer);
 
-                                               // I've disabled the 
HTTP-Sharer Option for now as it
-                                               // makes
-                                               // trouble for external Users 
to use it
-                                               template = 
"screencast_odsp_sharertemplate.vm";
-
-                                       } else if (conf_i == 1) {
-                                               template = 
"screencast_jrdesktop.vm";
-                                               log.debug("Creating JNLP 
Template for jrdesktop solution");
-                                       } else if (conf_i == 2) {
-
-                                               // Storing Session data
-                                               RTPScreenSharingSession session 
= getRtpStreamingHandler()
-                                                               
.storeSessionForRoom(room, users_id, publicSID,
-                                                                               
rtmphostlocal, -1);
-
-                                               // For the RTP Sharer, we need 
some additional
-                                               // information
-                                               ctx.put("HOST", rtmphostlocal);
-                                               ctx.put("PORT", 
session.getIncomingRTPPort());
-                                               template = "screencast_rtp.vm";
-                                               log.debug("Creating JNLP 
Template for RTP solution");
-
-                                               log.debug("Stored RTPSession 
Data for Room " + room);
-
-                                       } else if (conf_i == 3) {
-
-                                               // Sharing option 3 is no more 
actively maintained and in the source available
-
-
-                                       } else if (conf_i == 4) {
-
-                                               log.debug("RTMP Sharer labels 
:: " + label_sharer);
-
-                                               // Red5-Screen Share with RTMP 
Client
-                                               template = "screenshare.vm";
-
-                                               codebase = "http://"; + 
rtmphostlocal + ":"
-                                                               + red5httpport 
+ httpRootKey
-                                                               + 
"red5-screenshare";
-
-                                               String connectionType = 
httpServletRequest
-                                                               
.getParameter("connectionType");
-                                               if (connectionType == null) {
-                                                       new Exception("No 
connectionType ");
-                                               }
-
-                                               String startUpClass = 
"org.red5.screen.webstart.ScreenShare";
-                                               if 
(connectionType.equals("rtmpt")) {
-                                                       startUpClass = 
"org.red5.screen.webstart.ScreenShareRTMPT";
-                                               }
-
-                                               String orgIdAsString = 
httpServletRequest
-                                                               
.getParameter("organization_id");
-                                               if (orgIdAsString == null) {
-                                                       new Exception(
-                                                                       
"orgIdAsString is empty could not start sharer");
-                                                       return null;
-                                               }
-
-                                               ctx.put("organization_id", 
orgIdAsString);
-
-                                               ctx.put("startUpClass", 
startUpClass);
-                                               ctx.put("codebase", codebase);
-                                               ctx.put("red5-host", 
rtmphostlocal);
-                                               ctx.put("red5-app", 
OpenmeetingsVariables.webAppRootKey + "/"
-                                                                               
+ room);
-
-                                               Configuration configuration = 
getCfgManagement()
-                                                               .getConfKey(3L, 
"default.quality.screensharing");
-                                               String 
default_quality_screensharing = "1";
-                                               if (configuration != null) {
-                                                       
default_quality_screensharing = configuration
-                                                                       
.getConf_value();
-                                               }
-
-                                               
ctx.put("default_quality_screensharing",
-                                                               
default_quality_screensharing);
-
-                                               ctx.put("user_id", users_id);
-
-                                               String port = 
httpServletRequest.getParameter("port");
-                                               if (port == null) {
-                                                       new Exception("port is 
empty: ");
-                                                       return null;
-                                               }
-                                               ctx.put("port", port);
-
-                                               String allowRecording = 
httpServletRequest
-                                                               
.getParameter("allowRecording");
-                                               if (allowRecording == null) {
-                                                       new 
Exception("allowRecording is empty: ");
-                                                       return null;
-                                               }
-                                               ctx.put("allowRecording", 
allowRecording);
+                                       codebase = "http://"; + rtmphostlocal + 
":"
+                                                       + red5httpport + 
httpRootKey
+                                                       + "red5-screenshare";
+
+                                       String connectionType = 
httpServletRequest
+                                                       
.getParameter("connectionType");
+                                       if (connectionType == null) {
+                                               new Exception("No 
connectionType ");
+                                       }
+
+                                       String startUpClass = 
"org.red5.screen.webstart.ScreenShare";
+                                       if (connectionType.equals("rtmpt")) {
+                                               startUpClass = 
"org.red5.screen.webstart.ScreenShareRTMPT";
+                                       }
+
+                                       String orgIdAsString = 
httpServletRequest
+                                                       
.getParameter("organization_id");
+                                       if (orgIdAsString == null) {
+                                               new Exception(
+                                                               "orgIdAsString 
is empty could not start sharer");
+                                               return null;
+                                       }
+
+                                       ctx.put("organization_id", 
orgIdAsString);
+
+                                       ctx.put("startUpClass", startUpClass);
+                                       ctx.put("codebase", codebase);
+                                       ctx.put("red5-host", rtmphostlocal);
+                                       ctx.put("red5-app", 
OpenmeetingsVariables.webAppRootKey + "/"
+                                                                       + room);
+
+                                       Configuration configuration = 
getCfgManagement()
+                                                       .getConfKey(3L, 
"default.quality.screensharing");
+                                       String default_quality_screensharing = 
"1";
+                                       if (configuration != null) {
+                                               default_quality_screensharing = 
configuration
+                                                               
.getConf_value();
+                                       }
+
+                                       ctx.put("default_quality_screensharing",
+                                                       
default_quality_screensharing);
+
+                                       ctx.put("user_id", users_id);
+
+                                       String port = 
httpServletRequest.getParameter("port");
+                                       if (port == null) {
+                                               new Exception("port is empty: 
");
+                                               return null;
+                                       }
+                                       ctx.put("port", port);
+
+                                       String allowRecording = 
httpServletRequest
+                                                       
.getParameter("allowRecording");
+                                       if (allowRecording == null) {
+                                               new Exception("allowRecording 
is empty: ");
+                                               return null;
+                                       }
+                                       ctx.put("allowRecording", 
allowRecording);
 
-                                       } else
-                                               log.debug("Creating JNLP 
Template for default solution");
                                } catch (Exception e) {
                                        log.error("invalid configuration value 
for key screen_viewer!");
                                }
                        } 
 
-                       log.debug("template " + template);
+                       String template = "screenshare.vm";
 
                        return 
getVelocityView().getVelocityEngine().getTemplate(template);
 
-                       // }
-
-                       // return null;
-
                } catch (Exception er) {
                        log.error("[ScreenRequestHandler]", er);
                        System.out.println("Error downloading: " + er);

Modified: 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
URL: 
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java?rev=1292946&r1=1292945&r2=1292946&view=diff
==============================================================================
--- 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
 (original)
+++ 
incubator/openmeetings/trunk/singlewebapp/src/app/org/openmeetings/servlet/outputhandler/UploadHandler.java
 Thu Feb 23 20:47:58 2012
@@ -52,8 +52,6 @@ import org.slf4j.Logger;
 import org.springframework.context.ApplicationContext;
 import org.springframework.web.context.support.WebApplicationContextUtils;
 
-import com.itextpdf.text.pdf.PdfReader;
-
 public class UploadHandler extends HttpServlet {
 
        private static final long serialVersionUID = 8955335681521483484L;
@@ -382,28 +380,32 @@ public class UploadHandler extends HttpS
                        returnError = getGeneratePDF().convertPDF(currentDir, 
newFileName,
                                        newFileExtDot, roomName, true, 
completeName);
                } else if (isPdf) {
-                       boolean isEncrypted = false;
-                       try {
-                               // Check if PDF is encrpyted
-                               PdfReader pdfReader = new PdfReader(completeName
-                                               + newFileExtDot);
-
-                               log.debug("pdfReader.isEncrypted() :: "
-                                               + pdfReader.isEncrypted());
-
-                               log.debug("isMetadataEncrypted : "
-                                               + 
pdfReader.isMetadataEncrypted());
-                               log.debug("is128Key : " + pdfReader.is128Key());
-                               log.debug("isEncrypted : " + 
pdfReader.isEncrypted());
-
-                               if (pdfReader.isEncrypted()) {
-                                       isEncrypted = true;
-                               }
-
-                       } catch (Exception err) {
-                               log.error("isEncrypted ", err);
-                               isEncrypted = true;
-                       }
+                       
+                       boolean isEncrypted = true; 
+                       
+                       // Check requires iText.jar => iText is AGPL and won't 
work with Apache Release
+//                     boolean isEncrypted = false;
+//                     try {
+//                             // Check if PDF is encrpyted
+//                             PdfReader pdfReader = new PdfReader(completeName
+//                                             + newFileExtDot);
+//
+//                             log.debug("pdfReader.isEncrypted() :: "
+//                                             + pdfReader.isEncrypted());
+//
+//                             log.debug("isMetadataEncrypted : "
+//                                             + 
pdfReader.isMetadataEncrypted());
+//                             log.debug("is128Key : " + pdfReader.is128Key());
+//                             log.debug("isEncrypted : " + 
pdfReader.isEncrypted());
+//
+//                             if (pdfReader.isEncrypted()) {
+//                                     isEncrypted = true;
+//                             }
+//
+//                     } catch (Exception err) {
+//                             log.error("isEncrypted ", err);
+//                             isEncrypted = true;
+//                     }
 
                        log.debug("isEncrypted :: " + isEncrypted);
 


Reply via email to