Author: solomax
Date: Thu Jul 17 11:07:00 2014
New Revision: 1611324

URL: http://svn.apache.org/r1611324
Log:
SWF: Errors in Room user-list are fixed;
getRecordingsByExternalType SOAP method is added;

Modified:
    openmeetings/branches/3.0.x/WebContent/src/modules/chat/chatParticipants.lzx
    
openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
    
openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
    
openmeetings/branches/3.0.x/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
    
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebService.java
    
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
    
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
    
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
    
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
    
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
    
openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java

Modified: 
openmeetings/branches/3.0.x/WebContent/src/modules/chat/chatParticipants.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/chat/chatParticipants.lzx?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/WebContent/src/modules/chat/chatParticipants.lzx 
(original)
+++ 
openmeetings/branches/3.0.x/WebContent/src/modules/chat/chatParticipants.lzx 
Thu Jul 17 11:07:00 2014
@@ -34,23 +34,7 @@
        <handler name="oninit">
                <![CDATA[
                        if($debug) Debug.write("chatParticipants/picture_uri: 
",this.picture_uri);
-                       
-                       if (this.picture_uri != null && 
this.picture_uri.startsWith("http")) {
-                               
-                               
this._userpic.setAttribute('src',this.picture_uri);  
-                               
-                       } else {
-                               
-                               var downloadurl = canvas.getUrl() + 
'DownloadHandler?fileName=CHAT'
-                        +'&moduleName=chat&parentPath=&room_id='
-                        +'&remoteUserid='+this.user_id
-                        +'&sid='+canvas.sessionId;
-                //Debug.write("downloadurl "+downloadurl);
-                this._userpic.setAttribute('src',downloadurl);  
-                
-                       }
-               
-               //Debug.write("TIME: "+this.usertime);
+            this._userpic.setAttribute('src', 
canvas.getPictureUrl(this.picture_uri, '&moduleName=chat')); 
         ]]>
        </handler>
        

Modified: 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
 (original)
+++ 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/interviewuserlist/interviewUserListItem.lzx
 Thu Jul 17 11:07:00 2014
@@ -73,28 +73,7 @@
     
     <method name="fadeText" args="ignore=null"> 
         <![CDATA[
-            if (this.refObj.picture_uri.startsWith("http") || 
this.refObj.picture_uri.startsWith("https")) {
-                var downloadurl = this.refObj.picture_uri;
-            //Do Load the Custom Moodle Profilee Picture
-            } else if (this.refObj.externalUserId >= 1 && 
this.refObj.externalUserType == "moodle") {
-                
-                if (this.refObj.externalUserId == 1) {
-                    //Means it is a guest
-                    var downloadurl = canvas.moodleWwwRoot+"/pix/u/f2.png";
-                } else {
-                    var downloadurl = canvas.moodleWwwRoot+"/user/pix.php/"+ 
this.refObj.externalUserId +"/f2.jpg";
-                }
-                
-            } else {
-        
-                var downloadurl = canvas.getUrl() + 
'DownloadHandler?fileName=CHAT'
-                                    +'&moduleName=chat&parentPath=&room_id='
-                                    +'&remoteUserid='+this.user_id
-                                    +'&sid='+canvas.sessionId;
-                        
-            }
-            
-            this._userpic.setAttribute('src',downloadurl); 
+            this._userpic.setAttribute('src', 
canvas.getPictureUrl(this.refObj.picture_uri, '&moduleName=chat')); 
         ]]>          
     </method>
      

Modified: 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
 (original)
+++ 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/participants/participantListItem.lzx
 Thu Jul 17 11:07:00 2014
@@ -55,35 +55,9 @@
     
     <method name="fadeText" args="ignore=null"> 
         <![CDATA[
-        
                if ($debug) Debug.write("fadeText :1: ",this.refObj);
                if ($debug) Debug.write("fadeText :2: 
",this.refObj.picture_uri);
-        
-               if (this.refObj.picture_uri != null && 
(this.refObj.picture_uri.startsWith("http") || 
this.refObj.picture_uri.startsWith("https"))) {
-                       var downloadurl = this.refObj.picture_uri;
-            //Do Load the Custom Moodle Profilee Picture
-               } else if (this.refObj.externalUserId >= 1 && 
this.refObj.externalUserType == "moodle") {
-                
-                if (this.refObj.externalUserId == 1) {
-                    //Means it is a guest
-                    var downloadurl = canvas.moodleWwwRoot+"/pix/u/f2.png";
-                } else {
-                    var downloadurl = canvas.moodleWwwRoot+"/user/pix.php/"+ 
this.refObj.externalUserId +"/f2.jpg";
-                }
-                
-            } else {
-        
-                var downloadurl = canvas.getUrl() + 
'DownloadHandler?fileName=CHAT'
-                        +'&moduleName=chat&parentPath=&room_id='
-                        +'&remoteUserid='+this.user_id
-                        +'&sid='+canvas.sessionId;
-                        
-            }
-            
-            if ($debug) Debug.warn("downloadurl :3: ",downloadurl);
-            
-            this._userpic.setAttribute('src',downloadurl); 
-            
+            this._userpic.setAttribute('src', 
canvas.getPictureUrl(this.refObj.picture_uri, '&moduleName=chat')); 
         ]]>          
     </method>
     

Modified: 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
 (original)
+++ 
openmeetings/branches/3.0.x/WebContent/src/modules/conference/tabcontent/chat/chatTabItemEmoticons.lzx
 Thu Jul 17 11:07:00 2014
@@ -36,23 +36,8 @@
        
        <handler name="oninit">
                <![CDATA[
-               
                    if ($debug) Debug.write("this.picture_uri :: 
",this.picture_uri);
-               
-                   if (this.picture_uri != null && ( 
this.picture_uri.startsWith("http") || this.picture_uri.startsWith("https") ) ) 
{
-                
-                var downloadurl = this.picture_uri;  
-                
-            } else {
-               if($debug) Debug.write("chatTabItemEmoticons/WIDTH: 
"+this.width);
-                var downloadurl = canvas.getUrl() + 
'DownloadHandler?fileName=CHAT'
-                        +'&moduleName=chat&parentPath=&room_id='
-                        +'&remoteUserid='+this.user_id
-                        +'&sid='+canvas.sessionId;
-            }
-                       
-               //Debug.write("downloadurl "+downloadurl);
-               this._userpic.setAttribute('src',downloadurl);  
+            this._userpic.setAttribute('src', 
canvas.getPictureUrl(this.refObj.picture_uri, '&moduleName=chat')); 
                
                if(canvas.isrtl == 'true'){
                        if($debug) Debug.write("chatTabItemEmoticons RTL is 
set");

Modified: 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebService.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebService.java
 (original)
+++ 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebService.java
 Thu Jul 17 11:07:00 2014
@@ -289,6 +289,31 @@ public class RoomWebService {
        }
 
        /**
+        * Gets a list of recordings
+        * 
+        * @param SID
+        *            The SID of the User. This SID must be marked as logged-in
+        * @param externalType
+        *            externalType specified when creating room or user
+        * @return - list of flv recordings
+        * @throws AxisFault
+        */
+       public List<FlvRecording> getRecordingsByExternalType(String SID, 
String externalType) throws AxisFault {
+               try {
+                       Long users_id = sessiondataDao.checkSession(SID);
+
+                       if 
(AuthLevelUtil.hasWebServiceLevel(userDao.getRights(users_id))) {
+                               return 
flvRecordingDao.getRecordingsByExternalType(externalType);
+                       }
+
+                       return null;
+               } catch (Exception err) {
+                       log.error("[getRecordingsByExternalType] ", err);
+                       throw new AxisFault(err.getMessage());
+               }
+       }
+
+       /**
         * Gets a list of flv recordings
         * 
         * @param SID

Modified: 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
 (original)
+++ 
openmeetings/branches/3.0.x/src/axis/java/org/apache/openmeetings/axis/services/RoomWebServiceFacade.java
 Thu Jul 17 11:07:00 2014
@@ -69,6 +69,10 @@ public class RoomWebServiceFacade extend
                                .getFlvRecordingByExternalRoomTypeByList(SID, 
externalRoomType);
        }
 
+       public List<FlvRecording> getRecordingsByExternalType(String SID, 
String externalType) throws AxisFault {
+               return 
getBean(RoomWebService.class).getRecordingsByExternalType(SID, externalType);
+       }
+
        public FlvRecording[] getFlvRecordingByExternalRoomType(String SID, 
String externalRoomType) throws AxisFault {
                return 
getBean(RoomWebService.class).getFlvRecordingByExternalRoomType(SID, 
externalRoomType);
        }

Modified: 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
 (original)
+++ 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
 Thu Jul 17 11:07:00 2014
@@ -182,6 +182,20 @@ public class FlvRecordingDao {
                return null;
        }
 
+       public List<FlvRecording> getRecordingsByExternalType(String 
externalType) {
+               try {
+                       log.debug("getRecordingsByExternalType :externalType: " 
+ externalType);
+
+                       TypedQuery<FlvRecording> query = 
em.createNamedQuery("getRecordingsByExternalType", FlvRecording.class);
+                       query.setParameter("externalType", externalType);
+
+                       return query.getResultList();
+               } catch (Exception ex2) {
+                       log.error("[getRecordingsByExternalType]: ", ex2);
+               }
+               return null;
+       }
+
        public List<FlvRecording> getFlvRecordingRootByPublic(Long orgId) {
                TypedQuery<FlvRecording> q = em.createNamedQuery(orgId == null 
? "getRecordingsPublic" : "getRecordingsByOrganization", FlvRecording.class);
                if (orgId != null) {

Modified: 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
URL: 
http://svn.apache.org/viewvc/openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/record/FlvRecording.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
 (original)
+++ 
openmeetings/branches/3.0.x/src/db/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
 Thu Jul 17 11:07:00 2014
@@ -77,6 +77,9 @@ import org.simpleframework.xml.Root;
                        + "AND (f.parentFileExplorerItemId IS NULL OR 
f.parentFileExplorerItemId = 0) "
                        + "ORDER BY f.folder DESC, f.fileName ")
        , @NamedQuery(name = "resetRecordingProcessingStatus", query = "UPDATE 
FlvRecording f SET f.status = :error WHERE f.status = :processing")
+       , @NamedQuery(name = "getRecordingsByExternalType", query = "SELECT rec 
FROM FlvRecording rec, Room r, User u "
+                       + "WHERE rec.deleted = false AND rec.room_id = 
r.rooms_id AND rec.insertedBy = u.user_id "
+                                       + "AND (r.externalRoomType = 
:externalType OR u.externalUserType = :externalType)")
 })
 @Table(name = "flvrecording")
 @Root(name = "flvrecording")

Modified: 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/dao/record/FlvRecordingDao.java
 Thu Jul 17 11:07:00 2014
@@ -161,6 +161,15 @@ public class FlvRecordingDao {
                return null;
        }
 
+       public List<FlvRecording> getRecordingsByExternalType(String 
externalType) {
+               log.debug("getRecordingsByExternalType :externalType: " + 
externalType);
+
+               TypedQuery<FlvRecording> query = 
em.createNamedQuery("getRecordingsByExternalType", FlvRecording.class);
+               query.setParameter("externalType", externalType);
+
+               return query.getResultList();
+       }
+
        public List<FlvRecording> getFlvRecordingRootByPublic(Long orgId) {
                TypedQuery<FlvRecording> q = em.createNamedQuery(orgId == null 
? "getRecordingsPublic" : "getRecordingsByOrganization", FlvRecording.class);
                if (orgId != null) {

Modified: 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/FlvRecording.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/openmeetings-db/src/main/java/org/apache/openmeetings/db/entity/record/FlvRecording.java
 Thu Jul 17 11:07:00 2014
@@ -90,6 +90,9 @@ import org.simpleframework.xml.Root;
                        + "ORDER BY c.type ASC, c.fileName")
        , @NamedQuery(name = "getRecordingsByParent", query = "SELECT c FROM 
FlvRecording c WHERE c.deleted = false AND c.parentItemId = :parentItemId "
                        + "ORDER BY c.type ASC, c.fileName") 
+       , @NamedQuery(name = "getRecordingsByExternalType", query = "SELECT rec 
FROM FlvRecording rec, Room r, User u "
+                       + "WHERE rec.deleted = false AND rec.room_id = 
r.rooms_id AND rec.insertedBy = u.user_id "
+                                       + "AND (r.externalRoomType = 
:externalType OR u.externalUserType = :externalType)")
 })
 @Table(name = "flvrecording")
 @Root(name = "flvrecording")

Modified: 
openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java
URL: 
http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java?rev=1611324&r1=1611323&r2=1611324&view=diff
==============================================================================
--- 
openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java
 (original)
+++ 
openmeetings/trunk/singlewebapp/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/RoomWebService.java
 Thu Jul 17 11:07:00 2014
@@ -305,6 +305,31 @@ public class RoomWebService {
        }
 
        /**
+        * Gets a list of recordings
+        * 
+        * @param SID
+        *            The SID of the User. This SID must be marked as logged-in
+        * @param externalType
+        *            externalType specified when creating room or user
+        * @return - list of flv recordings
+        * @throws AxisFault
+        */
+       public List<FlvRecording> getRecordingsByExternalType(String SID, 
String externalType) throws ServiceException {
+               try {
+                       Long users_id = sessiondataDao.checkSession(SID);
+
+                       if 
(AuthLevelUtil.hasWebServiceLevel(userDao.getRights(users_id))) {
+                               return 
flvRecordingDao.getRecordingsByExternalType(externalType);
+                       }
+
+                       return null;
+               } catch (Exception err) {
+                       log.error("[getRecordingsByExternalType] ", err);
+                       throw new ServiceException(err.getMessage());
+               }
+       }
+
+       /**
         * Gets a list of flv recordings
         * 
         * @param SID


Reply via email to