You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2015/12/01 07:35:41 UTC

svn commit: r1717382 - in /openmeetings: branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ branches/3.1.x/openmeetings-flash/src/main/swf/ branches/3.1.x/openmeetings-flash/src/main/swf/base/ branches/3.1.x/openme...

Author: solomax
Date: Tue Dec  1 06:35:41 2015
New Revision: 1717382

URL: http://svn.apache.org/viewvc?rev=1717382&view=rev
Log:
[OPENMEETINGS-1279] wb: draw cliparts works better

Removed:
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/broadcast.lzx.lzr=swf8.swf
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/classintro.swf
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/confintro.swf
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/subscribe.lzx.lzr=swf8.swf
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/test/
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/test-setup.lzx.lzr=swf8.swf
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/test_main.lzx.lzr=swf8.swf
Modified:
    openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/lps/fillColorChoose.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/chatMiniButton.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDraw.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawArrow.lzx
    openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawClipArt.lzx
    openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java

Modified: openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/branches/3.1.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue Dec  1 06:35:41 2015
@@ -29,7 +29,6 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.openmeetings.core.data.conference.RoomManager;
@@ -1560,26 +1559,7 @@ public class ScopeApplicationAdapter ext
 
 			boolean showDrawStatus = getWhiteboardDrawStatus();
 
-			// Notify all Clients of that Scope (Room)
-			for (IConnection conn : current.getScope().getClientConnections()) {
-				if (conn != null) {
-					if (conn instanceof IServiceCapableConnection) {
-						IClient client = conn.getClient();
-						if (SessionVariablesUtil.isScreenClient(client)) {
-							// screen sharing clients do not receive events
-							continue;
-						} else if (SessionVariablesUtil.isAVClient(client)) {
-							// AVClients or potential AVClients do not receive events
-							continue;
-						} if (client.getId().equals(current.getClient().getId())) {
-							// don't send back to same user
-							continue;
-						}
-						((IServiceCapableConnection) conn).invoke("sendVarsToWhiteboardById",
-								new Object[] { showDrawStatus ? currentClient : null, sendObject }, this);
-					}
-				}
-			}
+			sendMessageToCurrentScope("sendVarsToWhiteboardById", new Object[]{showDrawStatus ? currentClient : null, sendObject}, false);
 		} catch (Exception err) {
 			log.error("[sendVarsByWhiteboardId]", err);
 		}
@@ -1611,20 +1591,12 @@ public class ScopeApplicationAdapter ext
 	}
 
 	public int sendMessage(Object newMessage) {
-		try {
-			sendMessageToCurrentScope("sendVarsToMessage", newMessage, false);
-		} catch (Exception err) {
-			log.error("[sendMessage]", err);
-		}
+		sendMessageToCurrentScope("sendVarsToMessage", newMessage, false);
 		return 1;
 	}
 	
 	public int sendMessageAll(Object newMessage) {
-		try {
-			sendMessageToCurrentScope("sendVarsToMessage", newMessage, true);
-		} catch (Exception err) {
-			log.error("[sendMessage]", err);
-		}
+		sendMessageToCurrentScope("sendVarsToMessage", newMessage, true);
 		return 1;
 	}
 
@@ -1731,7 +1703,6 @@ public class ScopeApplicationAdapter ext
 						|| (!sendSelf && client.getId().equals(current.getClient().getId()));
 			}
 		}.start();
-
 	}
 
 	public abstract class MessageSender extends Thread {
@@ -1767,17 +1738,23 @@ public class ScopeApplicationAdapter ext
 				if (scope == null) {
 					log.debug(String.format("[MessageSender] -> 'Unable to send message to NULL scope' %s, %s", remoteMethodName, newMessage));
 				} else {
-					log.trace(String.format("[MessageSender] -> 'sending message' %s, %s", remoteMethodName, newMessage));
+					if (log.isTraceEnabled()) {
+						log.trace(String.format("[MessageSender] -> 'sending message' %s, %s", remoteMethodName, newMessage));
+					}
 					// Send to all Clients of that Scope(Room)
+					int count = 0;
 					for (IConnection conn : scope.getClientConnections()) {
 						if (conn != null && conn instanceof IServiceCapableConnection) {
 							if (filter(conn)) {
 								continue;
 							}
-							((IServiceCapableConnection) conn).invoke(remoteMethodName, new Object[] { newMessage }, ScopeApplicationAdapter.this);
+							((IServiceCapableConnection) conn).invoke(remoteMethodName, new Object[]{newMessage}, ScopeApplicationAdapter.this);
+							count++;
 						}
 					}
-					log.trace(String.format("[MessageSender] -> 'sending message DONE' %s", remoteMethodName));
+					if (log.isTraceEnabled()) {
+						log.trace(String.format("[MessageSender] -> 'sending message to %s clients, DONE' %s", count, remoteMethodName));
+					}
 				}
 			} catch (Exception err) {
 				log.error(String.format("[MessageSender -> %s, %s]", remoteMethodName, newMessage), err);
@@ -1933,67 +1910,7 @@ public class ScopeApplicationAdapter ext
 				// Scope not yet started
 			}
 		} catch (Exception err) {
-			log.error("[sendMessageWithClient] ", err);
-		}
-	}
-
-	public synchronized void sendMessageWithClientByPublicSIDOrUser(Object message, String publicSID, Long userId) {
-		try {
-			// Get Room Id to send it to the correct Scope
-			Client currentClient = sessionManager.getClientByPublicSID(publicSID, false, null);
-
-			if (currentClient == null) {
-				currentClient = sessionManager.getClientByUserId(userId);
-			}
-
-			Set<IConnection> conset = null;
-
-			if (currentClient == null) {
-				// Must be from a previous session, search for user in current scope
-				IConnection current = Red5.getConnectionLocal();
-				// Notify all Clients of that Scope (Room)
-				conset = current.getScope().getClientConnections();
-			} else {
-				// default Scope Name
-				String scopeName = "hibernate";
-				if (currentClient.getRoomId() != null) {
-					scopeName = currentClient.getRoomId().toString();
-				}
-
-				IScope globalScope = getContext().getGlobalScope();
-				IScope webAppKeyScope = globalScope.getScope(OpenmeetingsVariables.webAppRootKey);
-				IScope scopeHibernate = webAppKeyScope.getScope(scopeName);
-
-				if (scopeHibernate != null) {
-					conset = scopeHibernate.getClientConnections();
-				}
-			}
-
-			// Notify the clients of the same scope (room) with userId
-			for (IConnection conn : conset) {
-				if (conn != null) {
-					
-					IClient client = conn.getClient();
-					if (SessionVariablesUtil.isScreenClient(client)) {
-						// screen sharing clients do not receive events
-						continue;
-					} else if (SessionVariablesUtil.isAVClient(client)) {
-						// AVClients or potential AVClients do not receive events
-						continue;
-					}
-					
-					if (SessionVariablesUtil.getPublicSID(client).equals(publicSID)) {
-						// log.debug("IS EQUAL ");
-						((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain", new Object[] { message }, this);
-						log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain" + message);
-					} else if (userId != 0 && SessionVariablesUtil.getUserId(client).equals(userId)) {
-						((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain", new Object[] { message }, this);
-						log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain" + message);
-					}
-				}
-			}
-		} catch (Exception err) {
-			log.error("[sendMessageWithClient] ", err);
+			log.error("[sendMessageWithClientByPublicSID] ", err);
 		}
 	}
 

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/lps/fillColorChoose.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/lps/fillColorChoose.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/lps/fillColorChoose.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/lps/fillColorChoose.lzx Tue Dec  1 06:35:41 2015
@@ -104,10 +104,9 @@
         this.setAttribute('selectedColorTransformedString',col);
     </method>
     
-    <method name="numberToRGB" args="thisC">
+    <method name="numberToRGB" args="c">
         <![CDATA[            
-            var c = thisC.getRGB();
-            var r = (c >> 16) & 0xff;
+           var r = (c >> 16) & 0xff;
             var g = (c >> 8) &  0xff;
             var b = c & 0xff;
             ////Debug.write("r g b: ",r,g,b);

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx Tue Dec  1 06:35:41 2015
@@ -20,7 +20,7 @@
 -->
 <library>
 
-<class name="omMiniIcon" extends="view" width="22" height="22">
+<class name="omMiniIcon">
 	<attribute name="imgUrl" value="" type="string" />
 	
 	<handler name="oninit">

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/hibernate/hibRtmpConnection.lzx Tue Dec  1 06:35:41 2015
@@ -194,21 +194,24 @@
         client.loadWmlToWhiteboardById = this.loadWmlToWhiteboardById;
         client.newMessageByRoomAndDomain = this.newMessageByRoomAndDomain;
         client.interviewStatus = this.interviewStatus;
+        client.newStream = this.newStream;
+        //TODO FIXME method is absent :( client.stopStream = this.stopStream;
+        client.receiveExclusiveAudioFlag = this.receiveExclusiveAudioFlag;
     </handler>
     
     <handler name="ondisconnect">
         connected = false;
     </handler>
     
-    <method name="reconnectComplete">
-         if (this.reconnectionAction){
-            this.reconnectionAction = false;
-            this.reconnectObjRef.reconnectSuccess();
-        } else if (this.reconnectAfterRoomleft) {
-            loadContentByTempActionForNavi();
-        }
-        canvas.currentContentView.sendInit.sendEvent(this);
-    </method>
+	<method name="reconnectComplete">
+		if (this.reconnectionAction){
+			this.reconnectionAction = false;
+			this.reconnectObjRef.reconnectSuccess();
+		} else if (this.reconnectAfterRoomleft) {
+			loadContentByTempActionForNavi();
+		}
+		canvas.currentContentView.sendInit.sendEvent(this);
+	</method>
     
 	<handler name="onerror" >
 	<![CDATA[
@@ -802,16 +805,14 @@
             </handler>
         </netRemoteCallHib>
         
-        <netRemoteCallHib name="newStream" funcname="newStream">
-            <handler name="ondata" args="value">
-                //The onResult-Handler will be called be the rtmpconnection
-                if ($debug) Debug.write("newStream: ",value);
-                if (value == null || value.screenClient) {
-                    return;
-                }
-                canvas.commonVideoViewContent.startStream(value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight); 
-            </handler>   
-        </netRemoteCallHib> 
+		<method name="newStream" args="value">
+			//The onResult-Handler will be called be the rtmpconnection
+			if ($debug) Debug.write("newStream: ",value);
+			if (value == null || value.screenClient) {
+				return;
+			}
+			canvas.commonVideoViewContent.startStream(value.publicSID,value.broadCastID,value.firstname,value.lastname,value.interviewPodId,value.VWidth,value.VHeight);
+		</method> 
            
         <netRemoteCallHib name="closeStream" funcname="closeStream">
             <handler name="ondata" args="value">
@@ -945,8 +946,6 @@
                     case 'drawarrow':
                         usPoint = {x: aObj[aObj.length - 5] + aObj[9], y: aObj[aObj.length - 4] + aObj[10]};
                         break;
-                    case 'clipart':
-                        break;
                 }
                 if (usPoint) {
                     var us = new lz.userStatus(ctx, {
@@ -961,21 +960,10 @@
             ]]>
         </method>
 
-        <netRemoteCallHib name="sendVarsToWhiteboard" funcname="sendVarsToWhiteboard">
-            <handler name="ondata" args="value">
-                <![CDATA[
-                //The onResult-Handler will be called be the rtmpconnection
-                    if ($debug) Debug.write("sendVarsToWhiteboard : ",value);
-            parent.setUserStatus(canvas._drawarea, value[0], value[1]);
-            canvas._drawarea.sendWatchObject(canvas._drawarea,value[1][2],value[1][3],false);
-                ]]>
-            </handler>   
-        </netRemoteCallHib>  
-        
 		<method name="sendVarsToWhiteboardById" args="value">
 		<![CDATA[
 			//The onResult-Handler will be called be the rtmpconnection
-			if ($debug) Debug.write("sendVarsToWhiteboardById : ",value);
+			if ($debug) Debug.write("sendVarsToWhiteboardById : ", value);
 			this.setUserStatus(canvas._drawarea, value[0], value[1]);
 			canvas._drawarea.parent.parent.parent.sendWatchObjectByWhiteboard(value[1]);
 		]]>
@@ -984,7 +972,7 @@
 		<method name="loadWmlToWhiteboardById" args="value">
 		<![CDATA[
 			//The onResult-Handler will be called be the rtmpconnection
-			if ($debug) Debug.write("sendVarsToWhiteboardById : ",value);
+			if ($debug) Debug.write("loadWmlToWhiteboardById : ",value);
 			canvas._drawarea.parent.parent.parent.loadWmlToWhiteboardById(value);
 		]]>
 		</method>
@@ -1067,15 +1055,12 @@
             </method>
         </netRemoteCallHib>
 
-        <netRemoteCallHib name="receiveExclusiveAudioFlag" funcname="receiveExclusiveAudioFlag">
-            <netparam><method name="getValue">return null;</method></netparam>
-            <handler name="ondata" args="value">
-                <![CDATA[
-                    //The onResult-Handler will be called be the rtmpconnection
-                    canvas._videocontainer.receiveExclusiveAudioFlag(value.publicSID)
-                ]]>
-            </handler>
-        </netRemoteCallHib>
+		<method name="receiveExclusiveAudioFlag" args="value">
+		<![CDATA[
+			//The onResult-Handler will be called be the rtmpconnection
+			canvas._videocontainer.receiveExclusiveAudioFlag(value.publicSID)
+		]]>
+		</method>
 
         <netRemoteCallHib name="switchMicMuted" funcname="switchMicMuted">
             <attribute name="publicSID" value="" type="string" />
@@ -1516,7 +1501,7 @@
 		<method name="sendVarsToModeratorGeneral" args="value">
 		<![CDATA[
 			//The onResult-Handler will be called be the rtmpconnection
-			//Debug.write("sendVarsToWhiteboard : ",value);
+			//Debug.write("sendVarsToModeratorGeneral : ",value);
 			if (value[0]=='sharewhiteinit'){
 				if (!canvas.htmlframeisloaded){
 					canvas.ifrm.createIFrame();

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx Tue Dec  1 06:35:41 2015
@@ -821,7 +821,7 @@
 	</method>
 	
 	<method name="loadImgBySrc" args="cmp, imgUrl, completeCallback">
-		cmp.sprite.resource = this.src;
+		cmp.sprite.resource = imgUrl;
 		if (!cmp.sprite.imgLoader) {
 			if (cmp.sprite.resourceContainer) {
 				// unload previous internal image-resource

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/chatMiniButton.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/chatMiniButton.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/chatMiniButton.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/chat/chatMiniButton.lzx Tue Dec  1 06:35:41 2015
@@ -156,7 +156,7 @@
                     this.parent.parent.removeObject(this.parent);
                 }
             </method>
-            <method name="sendNoConfirmation" angs="none">
+            <method name="sendNoConfirmation" args="none">
             </method>
             <labelTooltip text="close" />
         </view>     

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDraw.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDraw.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDraw.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDraw.lzx Tue Dec  1 06:35:41 2015
@@ -626,7 +626,7 @@
 				this.starty = currentlayer.getMouse('y'); 				
 	            mousetracker_del.register(lz.Idle,'onidle');
 	        } else if (this.drawmodus == 'letter') {
-                this.startLetter();
+                this.startLetter(null);
                 this.startx = currentlayer.getMouse('x');
                 this.starty = currentlayer.getMouse('y');               
                 mousetracker_del.register(lz.Idle,'onidle');
@@ -1015,8 +1015,8 @@
 		object cause the file loading will make a seperate notification
 	 -->
 	<method name="sendWatchObject" args="action,actionObject,isWmlLoader">
+	<![CDATA[
 		if ($debug) Debug.write("sendWatchObject: ",action,actionObject);
-		<![CDATA[
 		if (action=='draw' || action=='redo'){
 			var lastactionObject = actionObject;
 			
@@ -1223,7 +1223,7 @@
 		} else if (action=="swf"){
 			this.remoteObjectUpdate(actionObject);	
 		}
-		]]>
+	]]>
 	</method>
 	
 	

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawArrow.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawArrow.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawArrow.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawArrow.lzx Tue Dec  1 06:35:41 2015
@@ -200,10 +200,6 @@
     
     <method name="drawArrow" args="graphics,start,end,thickness,strokeDis,stroke,fill,fillDis">
         <![CDATA[
-    //(graphics:Graphics,
-    //            start:Point,end:Point,
-    //            style:Object=null):void {
-            
             if (start.equals(end)) return;
             
             

Modified: openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawClipArt.lzx
URL: http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawClipArt.lzx?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawClipArt.lzx (original)
+++ openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/tools/baseDrawClipArt.lzx Tue Dec  1 06:35:41 2015
@@ -21,7 +21,7 @@
 <library>
 	
 
-<class name="drawClipArtWhiteBoard" >
+<class name="drawClipArtWhiteBoard" extends="omMiniIcon">
     <attribute name="clipArtEndx" value="0" type="number" />
     <attribute name="clipArtEndy" value="0" type="number" />
 </class>	
@@ -60,7 +60,7 @@
         	                width:100,height:100,stretches:'both',
                             x:this.startx,y:this.starty,
                             //bgcolor:0xFF3300,
-                            resource:imageurl,name:'clipart'});
+                            imgUrl: imageurl, name: 'clipart'});
 
         this.minClipArtx = this.startx;
         this.minClipArty = this.starty;
@@ -82,13 +82,6 @@
      
     <method name="trackDrawClipArt">   
         <![CDATA[
-        //Add Resource
-        //var t = new lz.drawClipArtWhiteBoard(this.currentlayer,{
-        //                    resource:imageurl,x:this.startx,y:this.starty});
-        
-        //Color
-        //t.setTint(this.currentdrawarrowlinestroke,60);
-        //t.setColor(this.currentdrawarrowlinestroke);
         var tEndX = this.currentlayer.getMouse('x');
         var tEndY = this.currentlayer.getMouse('y');
         
@@ -99,16 +92,6 @@
         
     <method name="trackDrawClipArtDraw" args="tEndX,tEndY,t">   
         <![CDATA[
-        //Add Resource
-        //var t = new lz.drawClipArtWhiteBoard(this.currentlayer,{
-        //                    resource:imageurl,x:this.startx,y:this.starty});
-        
-        //Color
-        //t.setTint(this.currentdrawarrowlinestroke,60);
-        //t.setColor(this.currentdrawarrowlinestroke);
-        
-        //if ($debug) Debug.write("trackDrawClipArtDraw ",tEndX,tEndY,t);
-        
         this.clipArtEndx = tEndX;
         this.clipArtEndy = tEndY;
         
@@ -124,10 +107,6 @@
         
         var tLength = Math.sqrt(2)/2*hypothenuse;
         
-        //if ($debug) Debug.write("tx,ty,alpha,sinAlpha,tLength "+tx+" "+ty+" "+alpha+" "+sinAlpha+" "+tLength);
-        
-        //if ($debug) Debug.write("CALC tx,ty",tx,ty);
-        
         if (Math.abs(tx) < 2 && Math.abs(ty) < 2) {
         	
         	this.minClipArtx = this.startx;
@@ -191,15 +170,6 @@
             	this.deltaClipArtx = 0;
             	this.deltaClipArty = Math.abs(gegenkathete_2);
             }
-            
-            
-            //if ($debug) Debug.write("_1  ",gegenkathete_4,gegenkathete_2);
-            
-            //if ($debug) Debug.write("_1  ",this.startx,this.starty,tx4,ty4);
-            
-            //if ($debug) Debug.write("_2 ",pRotate2,tRotate2,Math.sin(pRotate2),gegenkathete_4);
-            //if ($debug) Debug.write("_1  ",this.starty,ty4,ankathete_4,"tRotate2,tLength",tRotate2,tLength);
-            
         } else if (tx<0 && ty>=0){
             t.setAttribute('rotation',(90+45)-(alpha));
             
@@ -364,18 +334,6 @@
             }
             
         }
-        
-        //if (tx)
-        
-        //Scaling
-        //var basicLength = Math.sqrt((t.width*t.width)+(t.width*t.width));
-        //t.getDisplayObject().scaleX = hypothenuse / basicLength;
-        //t.getDisplayObject().scaleY = hypothenuse / basicLength;
-        
-        //if ($debug) Debug.write("hypothenuse "+hypothenuse);
-        
-        
-        
         t.setAttribute("width",tLength);
         t.setAttribute("height",tLength);
 
@@ -405,7 +363,7 @@
                                     x:lastActionObject[5],
                                     y:lastActionObject[6],
                                     rotation:lastActionObject[3],
-                                    resource:lastActionObject[2],
+                                    imgUrl:lastActionObject[2],
                                     clipArtEndx:lastActionObject[9],
                                     clipArtEndy:lastActionObject[10],
                                     name:'clipart'
@@ -424,7 +382,7 @@
         <![CDATA[
         
             var oid_name = cLayer.name;
-            var tSource = cLayer.clipart.resource;
+            var tSource = cLayer.clipart.imgUrl;
             var tRotation = cLayer.clipart.rotation;
             var tX = cLayer.clipart.x;
             var tY = cLayer.clipart.y;
@@ -454,7 +412,7 @@
                                     x:this.deltaClipArtx,
                                     y:this.deltaClipArty,
                                     rotation:tRotation,
-                                    resource:tSource,
+                                    imgUrl:tSource,
                                     clipArtEndx:this.clipArtEndx-this.minClipArtx,
                                     clipArtEndy:this.clipArtEndy-this.minClipArty,
                                     name:'clipart'
@@ -463,21 +421,6 @@
         
             for (var eg=0;eg<this.baseactionobjectList.length;eg++){
                 if (this.baseactionobjectList[eg][this.baseactionobjectList[eg].length-1]==oid_name) {
-                    
-                    //if ($debug) Debug.write("Found Object 1: ",this.baseactionobjectList[eg]);
-                    
-                	//actionObject[3] = tRotation;
-        //actionObject[5] = deltaClipArtx;
-        //actionObject[6] = deltaClipArty;
-        //actionObject[7] = deltaClipWidth;
-        //actionObject[8] = deltaClipHeight;
-        //actionObject[9] = deltaClipEndx;
-        //actionObject[10] = deltaClipEndy;
-        //actionObject[14] = x;//-5
-        //actionObject[15] = y;//-4
-        //actionObject[16] = width;//-3
-        //actionObject[17] = height;//-2
-        
             	    this.baseactionobjectList[eg][3] = tRotation;
                 	this.baseactionobjectList[eg][5] = this.deltaClipArtx;
                 	this.baseactionobjectList[eg][6] = this.deltaClipArty;
@@ -510,7 +453,7 @@
     	<![CDATA[
     	
             var oid_name = this.currentlayer.name;
-    	    var tSource = this.currentlayer.clipart.resource;
+    	    var tSource = this.currentlayer.clipart.imgUrl;
     	    var tRotation = this.currentlayer.clipart.rotation;
     	    var tX = this.currentlayer.clipart.x;
     	    var tY = this.currentlayer.clipart.y;
@@ -526,9 +469,6 @@
 	     	if(this.isSnapToGrid){        		
 	    		if ($debug) Debug.write("####  this.minClipArtx y ",this.minClipArtx,this.minClipArty);
 	    	
-		    	//this.minClipArtx = Math.round(this.minClipArtx/this.gridWidth)*this.gridWidth;
-		    	//this.minClipArty = Math.round(this.minClipArty/this.gridWidth)*this.gridWidth;
-		    	
 		    	tX = Math.round(tX/this.gridWidth)*this.gridWidth;
 		    	tY = Math.round(tY/this.gridWidth)*this.gridWidth;
 		    	
@@ -560,7 +500,7 @@
                                     x:this.deltaClipArtx,
                                     y:this.deltaClipArty,
                                     rotation:tRotation,
-                                    resource:tSource,
+                                    imgUrl:tSource,
                                     clipArtEndx:this.clipArtEndx-this.minClipArtx,
                                     clipArtEndy:this.clipArtEndy-this.minClipArty,
                                     name:'clipart'

Modified: openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1717382&r1=1717381&r2=1717382&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/trunk/singlewebapp/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue Dec  1 06:35:41 2015
@@ -29,7 +29,6 @@ import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.openmeetings.core.data.conference.RoomManager;
@@ -1550,26 +1549,7 @@ public class ScopeApplicationAdapter ext
 
 			boolean showDrawStatus = getWhiteboardDrawStatus();
 
-			// Notify all Clients of that Scope (Room)
-			for (IConnection conn : current.getScope().getClientConnections()) {
-				if (conn != null) {
-					if (conn instanceof IServiceCapableConnection) {
-						IClient client = conn.getClient();
-						if (SessionVariablesUtil.isScreenClient(client)) {
-							// screen sharing clients do not receive events
-							continue;
-						} else if (SessionVariablesUtil.isAVClient(client)) {
-							// AVClients or potential AVClients do not receive events
-							continue;
-						} if (client.getId().equals(current.getClient().getId())) {
-							// don't send back to same user
-							continue;
-						}
-						((IServiceCapableConnection) conn).invoke("sendVarsToWhiteboardById",
-								new Object[] { showDrawStatus ? currentClient : null, sendObject }, this);
-					}
-				}
-			}
+			sendMessageToCurrentScope("sendVarsToWhiteboardById", new Object[]{showDrawStatus ? currentClient : null, sendObject}, false);
 		} catch (Exception err) {
 			log.error("[sendVarsByWhiteboardId]", err);
 		}
@@ -1601,20 +1581,12 @@ public class ScopeApplicationAdapter ext
 	}
 
 	public int sendMessage(Object newMessage) {
-		try {
-			sendMessageToCurrentScope("sendVarsToMessage", newMessage, false);
-		} catch (Exception err) {
-			log.error("[sendMessage]", err);
-		}
+		sendMessageToCurrentScope("sendVarsToMessage", newMessage, false);
 		return 1;
 	}
 	
 	public int sendMessageAll(Object newMessage) {
-		try {
-			sendMessageToCurrentScope("sendVarsToMessage", newMessage, true);
-		} catch (Exception err) {
-			log.error("[sendMessage]", err);
-		}
+		sendMessageToCurrentScope("sendVarsToMessage", newMessage, true);
 		return 1;
 	}
 
@@ -1757,17 +1729,23 @@ public class ScopeApplicationAdapter ext
 				if (scope == null) {
 					log.debug(String.format("[MessageSender] -> 'Unable to send message to NULL scope' %s, %s", remoteMethodName, newMessage));
 				} else {
-					log.trace(String.format("[MessageSender] -> 'sending message' %s, %s", remoteMethodName, newMessage));
+					if (log.isTraceEnabled()) {
+						log.trace(String.format("[MessageSender] -> 'sending message' %s, %s", remoteMethodName, newMessage));
+					}
 					// Send to all Clients of that Scope(Room)
+					int count = 0;
 					for (IConnection conn : scope.getClientConnections()) {
 						if (conn != null && conn instanceof IServiceCapableConnection) {
 							if (filter(conn)) {
 								continue;
 							}
 							((IServiceCapableConnection) conn).invoke(remoteMethodName, new Object[] { newMessage }, ScopeApplicationAdapter.this);
+							count++;
 						}
 					}
-					log.trace(String.format("[MessageSender] -> 'sending message DONE' %s", remoteMethodName));
+					if (log.isTraceEnabled()) {
+						log.trace(String.format("[MessageSender] -> 'sending message to %s clients, DONE' %s", count, remoteMethodName));
+					}
 				}
 			} catch (Exception err) {
 				log.error(String.format("[MessageSender -> %s, %s]", remoteMethodName, newMessage), err);
@@ -1923,67 +1901,7 @@ public class ScopeApplicationAdapter ext
 				// Scope not yet started
 			}
 		} catch (Exception err) {
-			log.error("[sendMessageWithClient] ", err);
-		}
-	}
-
-	public synchronized void sendMessageWithClientByPublicSIDOrUser(Object message, String publicSID, Long userId) {
-		try {
-			// Get Room Id to send it to the correct Scope
-			Client currentClient = sessionManager.getClientByPublicSID(publicSID, false, null);
-
-			if (currentClient == null) {
-				currentClient = sessionManager.getClientByUserId(userId);
-			}
-
-			Set<IConnection> conset = null;
-
-			if (currentClient == null) {
-				// Must be from a previous session, search for user in current scope
-				IConnection current = Red5.getConnectionLocal();
-				// Notify all Clients of that Scope (Room)
-				conset = current.getScope().getClientConnections();
-			} else {
-				// default Scope Name
-				String scopeName = "hibernate";
-				if (currentClient.getRoomId() != null) {
-					scopeName = currentClient.getRoomId().toString();
-				}
-
-				IScope globalScope = getContext().getGlobalScope();
-				IScope webAppKeyScope = globalScope.getScope(OpenmeetingsVariables.webAppRootKey);
-				IScope scopeHibernate = webAppKeyScope.getScope(scopeName);
-
-				if (scopeHibernate != null) {
-					conset = scopeHibernate.getClientConnections();
-				}
-			}
-
-			// Notify the clients of the same scope (room) with userId
-			for (IConnection conn : conset) {
-				if (conn != null) {
-					
-					IClient client = conn.getClient();
-					if (SessionVariablesUtil.isScreenClient(client)) {
-						// screen sharing clients do not receive events
-						continue;
-					} else if (SessionVariablesUtil.isAVClient(client)) {
-						// AVClients or potential AVClients do not receive events
-						continue;
-					}
-					
-					if (SessionVariablesUtil.getPublicSID(client).equals(publicSID)) {
-						// log.debug("IS EQUAL ");
-						((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain", new Object[] { message }, this);
-						log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain" + message);
-					} else if (userId != 0 && SessionVariablesUtil.getUserId(client).equals(userId)) {
-						((IServiceCapableConnection) conn).invoke("newMessageByRoomAndDomain", new Object[] { message }, this);
-						log.debug("sendMessageWithClientByPublicSID RPC:newMessageByRoomAndDomain" + message);
-					}
-				}
-			}
-		} catch (Exception err) {
-			log.error("[sendMessageWithClient] ", err);
+			log.error("[sendMessageWithClientByPublicSID] ", err);
 		}
 	}