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 2017/03/14 16:52:28 UTC

svn commit: r1786925 [1/2] - in /openmeetings/application: branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/ branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ branches/3.2.x/o...

Author: solomax
Date: Tue Mar 14 16:52:27 2017
New Revision: 1786925

URL: http://svn.apache.org/viewvc?rev=1786925&view=rev
Log:
[OPENMEETINGS-1601] drop recordings to WB seems to work

Added:
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java
      - copied, changed from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java
      - copied, changed from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java
      - copied, changed from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java
      - copied, changed from r1786924, openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java
      - copied, changed from r1786924, openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java
      - copied, changed from r1786924, openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java
      - copied, changed from r1786924, openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java
      - copied, changed from r1786924, openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java
      - copied, changed from r1786924, openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java
      - copied, changed from r1786924, openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java
Removed:
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java
    openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java
    openmeetings/application/trunk/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java
Modified:
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
    openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx
    openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
    openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java
    openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
    openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
    openmeetings/application/trunk/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
    openmeetings/application/trunk/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java
    openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html
    openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
    openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java
    openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
    openmeetings/application/trunk/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java
    openmeetings/application/trunk/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
    openmeetings/application/trunk/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java

Copied: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java (from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java?p2=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java&p1=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java&r1=1786924&r2=1786925&rev=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectListManagerById.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardCache.java Tue Mar 14 16:52:27 2017
@@ -22,8 +22,8 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.apache.openmeetings.db.dto.room.WhiteboardObject;
-import org.apache.openmeetings.db.dto.room.WhiteboardObjectList;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
+import org.apache.openmeetings.db.dto.room.Whiteboards;
 
 /**
  * Memory based cache, configured as singleton in spring configuration
@@ -31,51 +31,56 @@ import org.apache.openmeetings.db.dto.ro
  * @author sebawagner
  *
  */
-public class WhiteBoardObjectListManagerById {
-	private Map<Long, WhiteboardObjectList> whiteBoardObjectList = new ConcurrentHashMap<>();
+public class WhiteboardCache {
+	private Map<Long, Whiteboards> cache = new ConcurrentHashMap<>();
 
 	private volatile AtomicLong whiteboardId = new AtomicLong(0);
 
 	public long getNewWhiteboardId(Long roomId, String name) {
 		long wbId = whiteboardId.getAndIncrement();
-		setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, new WhiteboardObject(name), wbId);
+		set(roomId, new Whiteboard(name), wbId);
 		return wbId;
 	}
 
 	/*
 	 * Room items a Whiteboard
 	 */
-	public WhiteboardObjectList getWhiteBoardObjectListByRoomId(Long roomId) {
-		if (whiteBoardObjectList.containsKey(roomId)) {
-			return whiteBoardObjectList.get(roomId);
+	public Whiteboards get(Long roomId) {
+		if (roomId == null) {
+			return null;
+		}
+		if (cache.containsKey(roomId)) {
+			return cache.get(roomId);
 		} else {
-			WhiteboardObjectList whiteboardObjectList = new WhiteboardObjectList();
-			whiteboardObjectList.setRoomId(roomId);
-			return whiteboardObjectList;
+			Whiteboards whiteboards = new Whiteboards();
+			whiteboards.setRoomId(roomId);
+			set(roomId, whiteboards);
+			return whiteboards;
 		}
 	}
 
-	public WhiteboardObject getWhiteBoardObjectListByRoomIdAndWhiteboard(Long roomId, Long whiteBoardId){
-		WhiteboardObjectList whiteboardObjectList = getWhiteBoardObjectListByRoomId(roomId);
-		WhiteboardObject whiteboardObjects = whiteboardObjectList.getWhiteboardObjects().get(whiteBoardId);
-		if (whiteboardObjects == null) {
-			whiteboardObjects = new WhiteboardObject();
+	public Whiteboard get(Long roomId, Long whiteBoardId) {
+		Whiteboards whiteboards = get(roomId);
+		Whiteboard wb = whiteboards.getWhiteboards().get(whiteBoardId);
+		if (wb == null) {
+			wb = new Whiteboard();
+			set(roomId, wb, whiteBoardId);
 		}
-		return whiteboardObjects;
+		return wb;
 	}
 
 	/*
 	 * Whiteboard Object List
 	 *
 	 */
-	public void setWhiteBoardObjectListRoomObj(Long roomId, WhiteboardObjectList whiteboardObjectList){
-		whiteBoardObjectList.put(roomId, whiteboardObjectList);
+	public void set(Long roomId, Whiteboards whiteboards) {
+		cache.put(roomId, whiteboards);
 	}
 
-	public void setWhiteBoardObjectListRoomObjAndWhiteboardId(Long roomId, WhiteboardObject whiteboardObjects, long whiteBoardId) {
-		WhiteboardObjectList whiteboardObjectList = getWhiteBoardObjectListByRoomId(roomId);
-		whiteboardObjects.setWhiteBoardId(whiteBoardId);
-		whiteboardObjectList.getWhiteboardObjects().put(whiteBoardId, whiteboardObjects);
-		whiteBoardObjectList.put(roomId, whiteboardObjectList);
+	public void set(Long roomId, Whiteboard wb, long whiteBoardId) {
+		Whiteboards whiteboards = get(roomId);
+		wb.setWhiteBoardId(whiteBoardId);
+		whiteboards.getWhiteboards().put(whiteBoardId, wb);
+		cache.put(roomId, whiteboards);
 	}
 }

Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardManager.java Tue Mar 14 16:52:27 2017
@@ -24,21 +24,21 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.apache.openmeetings.db.dto.room.WhiteboardObject;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 
 public class WhiteboardManager {
 	private static final Logger log = Red5LoggerFactory.getLogger(WhiteboardManager.class, webAppRootKey);
-	
+
 	@Autowired
-	private WhiteBoardObjectListManagerById wbListManagerById;
+	private WhiteboardCache whitebardCache;
 
 	@SuppressWarnings("unchecked")
-	public void addWhiteBoardObjectById(Long roomId, Map<Integer, Object> whiteboardObj, Long whiteBoardId) {
+	public void add(Long roomId, Map<Integer, Object> whiteboardObj, Long whiteBoardId) {
 		try {
-			log.debug("addWhiteBoardObjectById: ", whiteboardObj);
+			log.debug("add: ", whiteboardObj);
 
 			String action = whiteboardObj.get(2).toString();
 
@@ -47,16 +47,11 @@ public class WhiteboardManager {
 
 			List<Object> actionObject = (List<Object>) whiteboardObj.get(3);
 
+			Whiteboard wb = whitebardCache.get(roomId, whiteBoardId);
 			if (action.equals("moveMap")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-
-				whiteboardObject.setX(Integer.valueOf(actionObject.get(1).toString()));
-				whiteboardObject.setY(Integer.valueOf(actionObject.get(2).toString()));
-
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
+				wb.setX(Integer.valueOf(actionObject.get(1).toString()));
+				wb.setY(Integer.valueOf(actionObject.get(2).toString()));
 			} else if (action.equals("draw") || action.equals("redo")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-
 				// log.debug(actionObject);
 				// log.debug(actionObject.size()-1);
 				// log.debug(actionObject.get(actionObject.size()-1));
@@ -65,33 +60,26 @@ public class WhiteboardManager {
 					if (!objectType.equals("pointerWhiteBoard")) {
 						String objectOID = actionObject.get(actionObject.size() - 1).toString();
 						log.debug("objectOID: " + objectOID);
-						whiteboardObject.add(objectOID, actionObject);
-						wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
+						wb.add(objectOID, actionObject);
 					}
 				}
 			} else if (action.equals("clear")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-				whiteboardObject.clear();
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
+				wb.clear();
 			} else if (action.equals("delete") || action.equals("undo")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-				whiteboardObject.remove(actionObject);
-
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
+				wb.remove(actionObject);
 			} else if (action.equals("size") || action.equals("editProp")
 					|| action.equals("editTextMindMapNode")
 					|| action.equals("editText") || action.equals("swf")
 					|| action.equals("flv")
 					|| action.equals("editTextMindMapColor")
 					|| action.equals("editTextMindMapFontColor")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
 				String objectOID = actionObject.get(actionObject.size() - 1).toString();
 				// List roomItem = roomList.get(objectOID);
-				List<Object> currentObject = whiteboardObject.get(objectOID);
+				List<Object> currentObject = wb.get(objectOID);
 				if ("paint".equals(actionObject.get(0))) {
 					actionObject.set(1, currentObject.get(1));
 				}
-				whiteboardObject.add(objectOID, actionObject);
+				wb.add(objectOID, actionObject);
 
 				if (action.equals("swf")) {
 					log.debug("actionObject " + actionObject);
@@ -102,7 +90,7 @@ public class WhiteboardManager {
 
 							log.debug("updateObjectsToSlideNumber :: " + baseObjectName + "," + slidesNumber);
 
-							for (Entry<String, List<Object>> me : whiteboardObject.entrySet()) {
+							for (Entry<String, List<Object>> me : wb.entrySet()) {
 								List<Object> actionObjectStored = me.getValue();
 
 								if (actionObjectStored.get(0).equals("ellipse")
@@ -131,28 +119,18 @@ public class WhiteboardManager {
 						}
 					}
 				}
-
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
 			} else if (action.equals("clearSlide")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-
 				for (Object objectName : actionObject) {
-					whiteboardObject.remove(objectName);
+					wb.remove(objectName);
 				}
-
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
 			} else if (action.equals("whiteboardObj")) {
-				WhiteboardObject whiteboardObject = wbListManagerById.getWhiteBoardObjectListByRoomIdAndWhiteboard(roomId, whiteBoardId);
-
-				whiteboardObject.setFullFit((Boolean) actionObject.get(1));
-				whiteboardObject.setZoom((Integer) actionObject.get(2));
-
-				wbListManagerById.setWhiteBoardObjectListRoomObjAndWhiteboardId(roomId, whiteboardObject, whiteBoardId);
+				wb.setFullFit((Boolean) actionObject.get(1));
+				wb.setZoom((Integer) actionObject.get(2));
 			} else {
 				log.warn("Unkown Type: " + action + " actionObject: " + actionObject);
 			}
 		} catch (Exception err) {
-			log.error("[addWhiteBoardObject]", err);
+			log.error("[add]", err);
 		}
 	}
 }

Copied: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java (from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java?p2=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java&p1=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java&r1=1786924&r2=1786925&rev=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteBoardObjectSyncManager.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/data/whiteboard/WhiteboardObjectSyncManager.java Tue Mar 14 16:52:27 2017
@@ -33,11 +33,11 @@ import org.slf4j.Logger;
  * @author sebawagner
  *
  */
-public class WhiteBoardObjectSyncManager {
+public class WhiteboardObjectSyncManager {
 	private Map<Long, Map<String, WhiteboardSyncLockObject>> whiteBoardSyncList = new ConcurrentHashMap<>();
 	private Map<Long, Map<String, Map<String, WhiteboardSyncLockObject>>> whiteBoardObjectSyncList = new ConcurrentHashMap<>();
 
-	private static final Logger log = Red5LoggerFactory.getLogger(WhiteBoardObjectSyncManager.class, webAppRootKey);
+	private static final Logger log = Red5LoggerFactory.getLogger(WhiteboardObjectSyncManager.class, webAppRootKey);
 
 	/*
 	 * Initial Sync Process

Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/ConferenceLibrary.java Tue Mar 14 16:52:27 2017
@@ -18,27 +18,22 @@
  */
 package org.apache.openmeetings.core.remote;
 
-import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
-import java.io.File;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.commons.io.FileUtils;
 import org.apache.openmeetings.core.data.whiteboard.WhiteboardManager;
 import org.apache.openmeetings.core.documents.LibraryChartLoader;
 import org.apache.openmeetings.core.documents.LibraryDocumentConverter;
 import org.apache.openmeetings.core.documents.LibraryWmlLoader;
-import org.apache.openmeetings.core.documents.LoadLibraryPresentation;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
 import org.apache.openmeetings.db.dao.file.FileExplorerItemDao;
 import org.apache.openmeetings.db.dao.server.ISessionManager;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
-import org.apache.openmeetings.db.dto.file.LibraryPresentation;
 import org.apache.openmeetings.db.dto.server.ClientSessionInfo;
 import org.apache.openmeetings.db.entity.file.FileExplorerItem;
 import org.apache.openmeetings.db.entity.file.FileItem;
@@ -48,8 +43,6 @@ import org.apache.openmeetings.db.entity
 import org.apache.openmeetings.db.util.AuthLevelUtil;
 import org.apache.openmeetings.util.OmFileHelper;
 import org.red5.logging.Red5LoggerFactory;
-import org.red5.server.api.IConnection;
-import org.red5.server.api.Red5;
 import org.red5.server.api.service.IPendingServiceCall;
 import org.red5.server.api.service.IPendingServiceCallback;
 import org.slf4j.Logger;
@@ -72,35 +65,10 @@ public class ConferenceLibrary implement
 	@Autowired
 	private FileExplorerItemDao fileDao;
 	@Autowired
-	private WhiteboardManager whiteboardManagement;
+	private WhiteboardManager whiteboardManager;
 	@Autowired
 	private ScopeApplicationAdapter scopeAdapter;
 
-	public LibraryPresentation getPresentationPreviewFileExplorer(String sid, String parentFolder) {
-		try {
-			Sessiondata sd = sessionDao.check(sid);
-
-			log.debug("#############users_id : " + sd.getUserId());
-
-			if (AuthLevelUtil.hasUserLevel(userDao.getRights(sd.getUserId()))) {
-				File working_dir = new File(OmFileHelper.getUploadFilesDir(), parentFolder);
-				log.debug("############# working_dir : " + working_dir);
-
-				File file = new File(working_dir, OmFileHelper.libraryFileName);
-
-				if (!file.exists()) {
-					throw new Exception(file.getCanonicalPath() + ": does not exist");
-				}
-				return LoadLibraryPresentation.parseLibraryFileToObject(file);
-			} else {
-				throw new Exception("not Authenticated");
-			}
-		} catch (Exception e) {
-			log.error("[getListOfFilesByAbsolutePath]", e);
-			return null;
-		}
-	}
-
 	/**
 	 *
 	 * Save an Object to the library and returns the file-explorer Id
@@ -165,7 +133,7 @@ public class ConferenceLibrary implement
 		wbClear.put(3, null);
 
 		Long roomId = client.getRoomId();
-		whiteboardManagement.addWhiteBoardObjectById(roomId, wbClear, wbId);
+		whiteboardManager.add(roomId, wbClear, wbId);
 
 		for (int k = 0; k < roomItems.size(); k++) {
 			List<?> actionObject = (List<?>)roomItems.get(k);
@@ -174,7 +142,7 @@ public class ConferenceLibrary implement
 			whiteboardObj.put(2, "draw");
 			whiteboardObj.put(3, actionObject);
 
-			whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj, wbId);
+			whiteboardManager.add(roomId, whiteboardObj, wbId);
 		}
 
 		Map<String, Object> sendObject = new HashMap<>();
@@ -206,40 +174,6 @@ public class ConferenceLibrary implement
 		return null;
 	}
 
-	/**
-	 * @param sid
-	 * @param fileId
-	 * @return 1 in case of success, -1 otherwise
-	 */
-	public Long copyFileToCurrentRoom(String sid, Long fileId) {
-		try {
-			Sessiondata sd = sessionDao.check(sid);
-			if (AuthLevelUtil.hasUserLevel(userDao.getRights(sd.getUserId()))) {
-				IConnection current = Red5.getConnectionLocal();
-				String streamid = current.getClient().getId();
-
-				Client client = sessionManager.getClientByStreamId(streamid, null);
-				Long roomId = client.getRoomId();
-
-				FileExplorerItem f = fileDao.get(fileId);
-				if (roomId != null && f != null) {
-					File mp4 = f.getFile(EXTENSION_MP4);
-
-					File targetFolder = OmFileHelper.getStreamsSubDir(roomId);
-
-					File target = new File(targetFolder, mp4.getName());
-					if (mp4.exists() && !target.exists()) {
-						FileUtils.copyFile(mp4, target, false);
-					}
-					return 1L;
-				}
-			}
-		} catch (Exception err) {
-			log.error("[copyFileToCurrentRoom] ", err);
-		}
-		return -1L;
-	}
-
 	@Override
 	public void resultReceived(IPendingServiceCall arg0) {
 		// TODO Auto-generated method stub

Copied: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java (from r1786924, openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java?p2=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java&p1=openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java&r1=1786924&r2=1786925&rev=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteBoardService.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/WhiteboardService.java Tue Mar 14 16:52:27 2017
@@ -32,8 +32,8 @@ import java.util.LinkedList;
 import java.util.Map;
 
 import org.apache.commons.collections4.ComparatorUtils;
-import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById;
-import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectSyncManager;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardObjectSyncManager;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
 import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
 import org.apache.openmeetings.db.dao.label.LabelDao;
@@ -41,9 +41,9 @@ import org.apache.openmeetings.db.dao.se
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
 import org.apache.openmeetings.db.dto.room.Cliparts;
-import org.apache.openmeetings.db.dto.room.WhiteboardObject;
-import org.apache.openmeetings.db.dto.room.WhiteboardObjectList;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
 import org.apache.openmeetings.db.dto.room.WhiteboardSyncLockObject;
+import org.apache.openmeetings.db.dto.room.Whiteboards;
 import org.apache.openmeetings.db.entity.room.Client;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
 import org.apache.openmeetings.db.entity.user.User;
@@ -63,8 +63,8 @@ import org.springframework.beans.factory
  * @author sebastianwagner
  *
  */
-public class WhiteBoardService implements IPendingServiceCallback {
-	private static final Logger log = Red5LoggerFactory.getLogger(WhiteBoardService.class, webAppRootKey);
+public class WhiteboardService implements IPendingServiceCallback {
+	private static final Logger log = Red5LoggerFactory.getLogger(WhiteboardService.class, webAppRootKey);
 	@Autowired
 	private UserDao userDao;
 	@Autowired
@@ -72,9 +72,9 @@ public class WhiteBoardService implement
 	@Autowired
 	private ISessionManager sessionManager;
 	@Autowired
-	private WhiteBoardObjectSyncManager wbListManager;
+	private WhiteboardObjectSyncManager wbListManager;
 	@Autowired
-	private WhiteBoardObjectListManagerById wbListManagerById;
+	private WhiteboardCache wbCache;
 	@Autowired
 	private SessiondataDao sessionDao;
 	@Autowired
@@ -89,7 +89,7 @@ public class WhiteBoardService implement
 			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 			Long roomId = currentClient.getRoomId();
 
-			Long whiteBoardId = wbListManagerById.getNewWhiteboardId(roomId, name);
+			Long whiteBoardId = wbCache.getNewWhiteboardId(roomId, name);
 			scopeAdapter.sendMessageAll(Arrays.asList("newWhiteboard", whiteBoardId, name));
 		} catch (Exception e) {
 			log.error("[getNewWhiteboardId]", e);
@@ -105,12 +105,12 @@ public class WhiteBoardService implement
 			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 			Long roomId = currentClient.getRoomId();
 
-			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
-			Object returnValue = whiteboardObjectList.getWhiteboardObjects().remove(whiteBoardId);
+			Whiteboards whiteboards = wbCache.get(roomId);
+			Object returnValue = whiteboards.getWhiteboards().remove(whiteBoardId);
 
 			log.debug(" :: whiteBoardId :: " + whiteBoardId);
 
-			wbListManagerById.setWhiteBoardObjectListRoomObj(roomId, whiteboardObjectList);
+			wbCache.set(roomId, whiteboards);
 
 			if (returnValue != null) {
 				return true;
@@ -121,8 +121,8 @@ public class WhiteBoardService implement
 		return false;
 	}
 
-	public Map<Long, WhiteboardObject> getRoomItemsBy() {
-		Map<Long, WhiteboardObject> result = new LinkedHashMap<>();
+	public Map<Long, Whiteboard> getRoomItemsBy() {
+		Map<Long, Whiteboard> result = new LinkedHashMap<>();
 		try {
 			IConnection current = Red5.getConnectionLocal();
 			String streamid = current.getClient().getId();
@@ -130,9 +130,9 @@ public class WhiteBoardService implement
 			Long roomId = currentClient.getRoomId();
 
 			log.debug("getRoomItems: " + roomId);
-			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
+			Whiteboards whiteboards = wbCache.get(roomId);
 
-			if (whiteboardObjectList.getWhiteboardObjects().size() == 0) {
+			if (whiteboards.getWhiteboards().isEmpty()) {
 				Long langId = null;
 				{
 					Long userId = currentClient.getUserId();
@@ -142,12 +142,12 @@ public class WhiteBoardService implement
 					User u = userDao.get(userId);
 					langId = u == null ? cfgDao.getConfValue(CONFIG_DEFAULT_LANG_KEY, Long.class, "1") : u.getLanguageId();
 				}
-				wbListManagerById.getNewWhiteboardId(roomId, labelDao.getString("615", langId));
+				wbCache.getNewWhiteboardId(roomId, labelDao.getString("615", langId));
 				log.debug("Init New Room List");
-				whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
+				whiteboards = wbCache.get(roomId);
 			}
-			whiteboardObjectList.getWhiteboardObjects().entrySet().stream()
-					.sorted(Map.Entry.<Long, WhiteboardObject>comparingByKey().reversed())
+			whiteboards.getWhiteboards().entrySet().stream()
+					.sorted(Map.Entry.<Long, Whiteboard>comparingByKey().reversed())
 					.forEachOrdered(x -> result.put(x.getKey(), x.getValue()));
 		} catch (Exception err) {
 			log.error("[getRoomItemsBy]", err);
@@ -162,8 +162,8 @@ public class WhiteBoardService implement
 			Client currentClient = sessionManager.getClientByStreamId(streamid, null);
 			Long roomId = currentClient.getRoomId();
 
-			WhiteboardObjectList whiteboardObjectList = wbListManagerById.getWhiteBoardObjectListByRoomId(roomId);
-			WhiteboardObject wb = whiteboardObjectList.getWhiteboardObjects().get(wbId);
+			Whiteboards whiteboards = wbCache.get(roomId);
+			Whiteboard wb = whiteboards.getWhiteboards().get(wbId);
 			wb.setName(name);
 
 			log.debug(" :: rename whiteBoard :: id = {}, name = {}", wbId, name);

Modified: openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-core/src/main/java/org/apache/openmeetings/core/remote/red5/ScopeApplicationAdapter.java Tue Mar 14 16:52:27 2017
@@ -18,9 +18,11 @@
  */
 package org.apache.openmeetings.core.remote.red5;
 
+import static org.apache.openmeetings.util.OmFileHelper.EXTENSION_MP4;
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 
 import java.awt.Point;
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Date;
@@ -34,11 +36,13 @@ import java.util.Set;
 import java.util.UUID;
 import java.util.concurrent.atomic.AtomicLong;
 
+import org.apache.commons.io.FileUtils;
 import org.apache.openmeetings.IApplication;
 import org.apache.openmeetings.core.data.conference.RoomManager;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
 import org.apache.openmeetings.core.data.whiteboard.WhiteboardManager;
 import org.apache.openmeetings.core.remote.RecordingService;
-import org.apache.openmeetings.core.remote.WhiteBoardService;
+import org.apache.openmeetings.core.remote.WhiteboardService;
 import org.apache.openmeetings.core.remote.util.SessionVariablesUtil;
 import org.apache.openmeetings.core.util.WebSocketHelper;
 import org.apache.openmeetings.db.dao.basic.ConfigurationDao;
@@ -99,9 +103,11 @@ public class ScopeApplicationAdapter ext
 	@Autowired
 	private ISessionManager sessionManager;
 	@Autowired
-	private WhiteBoardService whiteBoardService;
+	private WhiteboardService whiteBoardService;
 	@Autowired
-	private WhiteboardManager whiteboardManagement;
+	private WhiteboardManager whiteboardManager;
+	@Autowired
+	private WhiteboardCache whiteboardCache;
 	@Autowired
 	private RecordingService recordingService;
 	@Autowired
@@ -1160,7 +1166,6 @@ public class ScopeApplicationAdapter ext
 	}
 
 	private static List<?> getWbObject(FileItem fi, String url) {
-		String fuid = UUID.randomUUID().toString();
 		Point size = getSize(fi);
 		String type = "n/a";
 		switch (fi.getType()) {
@@ -1190,7 +1195,7 @@ public class ScopeApplicationAdapter ext
 				, size.x // initwidth //14
 				, size.y // initheight //15
 				, 100 // currentzoom //16 FIXME TODO
-				, fuid // uniquObjectSyncName //17
+				, fi.getHash() // uniquObjectSyncName //17
 				, fi.getName() // standardFileName //18
 				, true // fullFit //19 FIXME TODO
 				, 0 // zIndex //-8
@@ -1200,18 +1205,17 @@ public class ScopeApplicationAdapter ext
 				, 0 // posy //-4
 				, size.x // width //-3
 				, size.y // height //-2
-				, fuid // this.currentlayer.name //-1
+				, fi.getHash() // this.currentlayer.name //-1
 				);
 	}
 
-	private static List<?> getFlvWbObject(FileItem fi) {
-		String fuid = UUID.randomUUID().toString();
+	private static List<?> getMp4WbObject(FileItem fi, String url) {
 		Point size = getSize(fi);
 		return Arrays.asList(
 				"flv" // 0: 'flv'
 				, fi.getId() // 1: 7
 				, fi.getName() // 2: 'BigBuckBunny_512kb.mp4'
-				, false // 3: false //playRemote
+				, url // 3: posterUrl
 				, size.x // 4: 416
 				, size.y // 5: 240
 				, 0 // 6: 1 // z-index
@@ -1221,10 +1225,27 @@ public class ScopeApplicationAdapter ext
 				, 0 // 10: 0 //TODO // y
 				, size.x // 11: 749 // width
 				, size.y // 12: 739 // height
-				, fuid // 13: 'flv_1469602000351'
+				, fi.getHash() // 13: 'flv_1469602000351'
 				);
 	}
 
+	private static void copyFileToRoom(Long roomId, FileItem f) {
+		try {
+			if (roomId != null && f != null) {
+				File mp4 = f.getFile(EXTENSION_MP4);
+
+				File targetFolder = OmFileHelper.getStreamsSubDir(roomId);
+
+				File target = new File(targetFolder, mp4.getName());
+				if (mp4.exists() && !target.exists()) {
+					FileUtils.copyFile(mp4, target, false);
+				}
+			}
+		} catch (Exception err) {
+			log.error("[copyFileToCurrentRoom] ", err);
+		}
+	}
+
 	public void sendToWhiteboard(String uid, Long wbId, FileItem fi, String url, boolean clean) {
 		ClientSessionInfo csi = sessionManager.getClientByPublicSIDAnyServer(uid);
 		if (csi == null) {
@@ -1242,7 +1263,9 @@ public class ScopeApplicationAdapter ext
 				wbObject = getWbObject(fi, url);
 				break;
 			case Video:
-				wbObject = getFlvWbObject(fi);
+			case Recording:
+				wbObject = getMp4WbObject(fi, url);
+				copyFileToRoom(client.getRoomId(), fi);
 				break;
 			default:
 		}
@@ -1251,6 +1274,7 @@ public class ScopeApplicationAdapter ext
 			wbClear.put("id", wbId);
 			wbClear.put("param", Arrays.asList("whiteboard", new Date(), "clear", null));
 
+			whiteboardCache.get(client.getRoomId(), wbId).clear();
 			sendToScope(client.getRoomId(), "sendVarsToWhiteboardById", Arrays.asList(null, wbClear));
 		}
 		sendToWhiteboard(client, Arrays.asList("whiteboard", new Date(), "draw", wbObject), wbId);
@@ -1300,10 +1324,10 @@ public class ScopeApplicationAdapter ext
 
 					whiteboardTempObj.put(3, tempActionObject);
 
-					whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardTempObj, wbId);
+					whiteboardManager.add(roomId, whiteboardTempObj, wbId);
 				}
 			} else {
-				whiteboardManagement.addWhiteBoardObjectById(roomId, whiteboardObj, wbId);
+				whiteboardManager.add(roomId, whiteboardObj, wbId);
 			}
 
 			Map<String, Object> sendObject = new HashMap<>();

Copied: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java (from r1786924, openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java?p2=openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java&p1=openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java&r1=1786924&r2=1786925&rev=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObject.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboard.java Tue Mar 14 16:52:27 2017
@@ -30,8 +30,8 @@ import java.util.concurrent.ConcurrentHa
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
 
-public class WhiteboardObject {
-	private static final Logger log = Red5LoggerFactory.getLogger(WhiteboardObject.class, webAppRootKey);
+public class Whiteboard {
+	private static final Logger log = Red5LoggerFactory.getLogger(Whiteboard.class, webAppRootKey);
 	private long whiteBoardId;
 	private Integer x = 0;
 	private Integer y = 0;
@@ -42,9 +42,9 @@ public class WhiteboardObject {
 	private int zIndex = 1;
 	private String name;
 
-	public WhiteboardObject() {}
+	public Whiteboard() {}
 
-	public WhiteboardObject(String name) {
+	public Whiteboard(String name) {
 		this.name = name;
 	}
 

Copied: openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java (from r1786924, openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java)
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java?p2=openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java&p1=openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java&r1=1786924&r2=1786925&rev=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/WhiteboardObjectList.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-db/src/main/java/org/apache/openmeetings/db/dto/room/Whiteboards.java Tue Mar 14 16:52:27 2017
@@ -19,13 +19,15 @@
 package org.apache.openmeetings.db.dto.room;
 
 import java.util.Map;
+import java.util.UUID;
 import java.util.concurrent.ConcurrentHashMap;
 
-public class WhiteboardObjectList {
+public class Whiteboards {
 	private Long roomId;
-	private Map<Long, WhiteboardObject> whiteboardObjects = new ConcurrentHashMap<>();
+	private final String uid = UUID.randomUUID().toString();
+	private Map<Long, Whiteboard> whiteboards = new ConcurrentHashMap<>();
 
-	public WhiteboardObjectList() {}
+	public Whiteboards() {}
 
 	public Long getRoomId() {
 		return roomId;
@@ -35,11 +37,15 @@ public class WhiteboardObjectList {
 		this.roomId = roomId;
 	}
 
-	public Map<Long, WhiteboardObject> getWhiteboardObjects() {
-		return whiteboardObjects;
+	public Map<Long, Whiteboard> getWhiteboards() {
+		return whiteboards;
 	}
 
-	public void setWhiteboardObjects(Map<Long, WhiteboardObject> whiteboardObjects) {
-		this.whiteboardObjects = whiteboardObjects;
+	public void setWhiteboards(Map<Long, Whiteboard> whiteboards) {
+		this.whiteboards = whiteboards;
+	}
+
+	public String getUid() {
+		return uid;
 	}
 }

Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/baseDrawObject.lzx Tue Mar 14 16:52:27 2017
@@ -7,16 +7,16 @@
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
-  
+
       http://www.apache.org/licenses/LICENSE-2.0
-  
+
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-  
+
 -->
 <library>
 
@@ -25,7 +25,7 @@
 	<attribute name="newSlideNumber" value="1" type="number" />
 	<attribute name="fullFit" value="true" type="boolean" />
 
-	<!-- 
+	<!--
 		Invoked by the Library directly
 		Loads a SWFPresenation to the whiteBoard
 	 -->
@@ -48,17 +48,17 @@
 	<method name="setCurrentScaleByFullFit" args="scaleFactor">
 	<![CDATA[
 		var tScale = Math.round(scaleFactor*100);
-		
+
 		this.getDisplayObject().scaleX = scaleFactor;
 		this.getDisplayObject().scaleY = scaleFactor;
-		
+
 		this.setAttribute("x",0);
 		this.setAttribute("y",0);
-		
+
 		//Already send by x,y change
 		//this.onupdateScale.sendEvent(null);
 		if ($debug) Debug.write("setCurrentScaleByFullFit -1- ",tScale);
-		
+
 		parent.parent.zoombox.setCurrentScaleByFullFit(tScale);
 	]]>
 	</method>
@@ -67,37 +67,37 @@
 	<![CDATA[
 		if (canvas.ismoderator) {
 			if ($debug) Debug.write("doUpdateFullFit ",fullFit,zoom);
-		
+
 			var actionObject = new Array();
 			actionObject.push("whiteboardObj");
 			actionObject.push(fullFit);
-			
+
 			this.doFullFit(fullFit);
-			
+
 			actionObject.push(this.getDisplayObject().scaleX * 100);
-			
+
 			if ($debug) Debug.write("doUpdateFullFit ",fullFit,this.getDisplayObject().scaleX);
 			this.onsharedMessage('whiteboardObj',actionObject);
-		}	
+		}
 	]]>
 	</method>
 
 	<method name="doUpdateZoom" args="fullFit,zoom">
 	<![CDATA[
 		if ($debug) Debug.write("doUpdateZoom ",this.fullFit,zoom);
-		
+
 		this.getDisplayObject().scaleX = zoom / 100;
 		this.getDisplayObject().scaleY = zoom / 100;
-		
+
 		if ($debug) Debug.write("doUpdateZoom is moderator ", canvas.ismoderator);
 		if (canvas.ismoderator) {
 			var actionObject = new Array();
 			actionObject.push("whiteboardObj");
 			actionObject.push(fullFit);
 			actionObject.push(zoom);
-		
+
 			this.onupdateScale.sendEvent(null);
-			this.onsharedMessage('whiteboardObj',actionObject);	
+			this.onsharedMessage('whiteboardObj',actionObject);
 		}
 	]]>
 	</method>
@@ -108,7 +108,7 @@
 		if ($debug) Debug.write("doUpdateFullFitAndZoomRemote ",actionObject[1],actionObject[2]);
 
 		this.doFullFit(actionObject[1]);
-		
+
 		if (!actionObject[1]) {
 			this.getDisplayObject().scaleX = actionObject[2] / 100;
 			this.getDisplayObject().scaleY = actionObject[2] / 100;
@@ -120,9 +120,9 @@
 	<method name="doFullFit" args="v">
 	<![CDATA[
 		if ($debug) Debug.write("Do Full Fit ? doFullFit: ", v, this.ObjectByName);
-	
+
 		this.fullFit = v;
-		if (!!this.ObjectByName && this.ObjectByName.typeOfObject == "swf") {	
+		if (!!this.ObjectByName && this.ObjectByName.typeOfObject == "swf") {
 			if (v) {
 				if ($debug) Debug.write("Do Full Fit ! ", (!!this.ObjectByName._swfView));
 				if (!!this.ObjectByName._swfView) {
@@ -145,23 +145,23 @@
 				this.doDocumentAction('setSlideNumber');
 				return true;
 			}
-		} 
+		}
 		return false;
 	]]>
 	</method>
 
 	<!--
 		alterModus => this is added by the mod not remotely
-		
+
 		adds the SWF-Object to the Layer
 	 -->
 	<method name="addPresentationToLayer" args="obj,urlName,nameing,posx,posy,width,height,alterModus,baseurl,fileName,moduleName,parentPath,room,domain,slideNumber,currentzoom,innerwidth,innerheight,innerx,innery,uniqueObjectSyncName,standardFileName,fullFit">
 	<![CDATA[
 		if ($debug) Debug.write("addPresentationToLayer", standardFileName);
-		
-		var downloadurl = canvas.getUrl() + urlName + "?uid=" + canvas.publicSID;
+
+		var downloadurl = canvas.getUrl() + urlName + "&uid=" + canvas.publicSID;
 		if ($debug) Debug.write("addPresentationToLayer:: downloadurl=", downloadurl);
-		
+
 		this.currentlayer = new lz.swfResourceView(obj,{refObj:this,name:nameing,
 			x:posx,y:posy,alterModus:alterModus,
 			baseurl:baseurl,fileName:fileName,moduleName:moduleName,parentPath:parentPath,
@@ -190,7 +190,7 @@
 			actionObject[17],actionObject[18],actionObject[19]);
 	</method>
 
-	<!-- 
+	<!--
 		Invoked by the remote Host, see sendWatchObject in baseDraw.lzx
 	 -->
 	<method name="addSWFToLayerHistorySynced" args="actionObject,refObj">
@@ -207,8 +207,8 @@
 			actionObject[9],actionObject[10],actionObject[17],actionObject[18],actionObject[19]);
 	</method>
 
-	<!--- 
-		invoke by the initial Loading process in remoteWhiteboard.lzx, 
+	<!---
+		invoke by the initial Loading process in remoteWhiteboard.lzx,
 		does not invoke any Update Handler
 		once this object is loaded, it will throw an Update event of kind
 		addSWFToLayerHistoryToLocalLoaded
@@ -336,22 +336,22 @@
 			} else if (action=="doc_last"){
 				this.ObjectByName._swfView.setAttribute('frame',(this.ObjectByName._swfView.totalframes));
 			} else if (action=="doc_zoom_minus"){
-				
+
 				if ($debug) Debug.write("doc_zoom_minus ");
 				return;
-				
-				this.ObjectByName.currentzoomFactor-=this.ObjectByName.zoomlevel;	   
+
+				this.ObjectByName.currentzoomFactor-=this.ObjectByName.zoomlevel;
 				var newwidth = (this.ObjectByName.initwidth/100)*this.ObjectByName.currentzoomFactor;
 				var newheight = (this.ObjectByName.initheight/100)*this.ObjectByName.currentzoomFactor;
 				this.ObjectByName._swfView.setAttribute('width',newwidth);
 				this.ObjectByName._swfView.setAttribute('height',newheight);
 				this.boundingref.doSetInnerObjectsBounds(newwidth,newheight);
 			} else if (action=="doc_zoom_plus"){
-				
+
 				if ($debug) Debug.write("doc_zoom_plus ");
 				return;
-				
-				this.ObjectByName.currentzoomFactor+=this.ObjectByName.zoomlevel;	   
+
+				this.ObjectByName.currentzoomFactor+=this.ObjectByName.zoomlevel;
 				//Debug.write("doc_zoom_plus 1",this.ObjectByName.currentzoomFactor,this.ObjectByName.zoomlevel);
 				var newwidth = (this.ObjectByName.initwidth/100)*this.ObjectByName.currentzoomFactor;
 				var newheight = (this.ObjectByName.initheight/100)*this.ObjectByName.currentzoomFactor;
@@ -370,9 +370,9 @@
 			}
 			this.ObjectByName.slideNumber =  this.ObjectByName._swfView.frame;
 			this.doUpdateDocumentToolBar();
-			
+
 			if ($debug) Debug.info("doDocumentAction :2: sendCurrentSWFObject");
-			
+
 			this.sendCurrentSWFObject(this.ObjectByName);
 		}
 	]]>
@@ -419,7 +419,7 @@
 	<![CDATA[
 		var p = 0, t = 0;
 		if (this["ObjectByName"] && this.ObjectByName != null && this.ObjectByName._swfView) {
-			if ($debug) Debug.warn("doUpdateDocumentToolBar ", this.ObjectByName.fullFit);
+			//if ($debug) Debug.warn("doUpdateDocumentToolBar ", this.ObjectByName.fullFit);
 			p = this.ObjectByName._swfView.frame;
 			t = this.ObjectByName._swfView.totalframes;
 		}
@@ -467,21 +467,21 @@
 				this.baseactionobjectList[eg][16] = objRef.currentzoomFactor;
 				this.baseactionobjectList[eg][19] = objRef.fullFit;
 				var newA = this.baseactionobjectList[eg];
-				if (newA[0]=='paint') newA[1] = new Array();				
-				this.onsharedMessage('swf',newA);	
+				if (newA[0]=='paint') newA[1] = new Array();
+				this.onsharedMessage('swf',newA);
 				if (sendSlideObjectUpdate) {
 					this.updateObjectsToSlideNumber(this.baseactionobjectList[eg]);
 				}
 				break;
 			}
-		}	
+		}
 	]]>
 	</method>
 
 	<method name="remoteObjectUpdate" args="lastactionObject">
 	<![CDATA[
 		var obj = this.getObjectByName(lastactionObject[lastactionObject.length-1]);
-		
+
 		if ($debug) Debug.write("remoteObjectUpdate :: ",obj.fullFit);
 		obj._swfView.doSendChangeValue = false;
 		var sendSlideObjectUpdate = false;
@@ -494,21 +494,21 @@
 		obj._swfView.setAttribute('width',lastactionObject[11]);
 		obj._swfView.setAttribute('height',lastactionObject[12]);
 		obj.fullFit = lastactionObject[19];
-		
+
 		if ($debug) Debug.write("DO initialLoadFullFit ?? ",obj.fullFit);
-		
+
 		if (obj.fullFit) {
 			if ($debug) Debug.write("DO initialLoadFullFit !! ");
 			obj._swfView.initialLoadFullFit();
 		}
-		
+
 		obj._swfView.setAttribute('frame',obj.slideNumber);
 		obj._swfView.doSendChangeValue = true;
-		
+
 		this.doUpdateDocumentToolBarByParticipant(obj.name);
-		
+
 		this.remoteUpdateBaseObjectList(lastactionObject);
-		
+
 		if (sendSlideObjectUpdate) {
 			this.updateObjectsToSlideNumber(lastactionObject);
 		}
@@ -523,14 +523,14 @@
 				this.baseactionobjectList[eg] = actionObject;
 				break;
 			}
-		}	
+		}
 	]]>
 	</method>
 
 	<method name="playVideoSynced" args="fileId,fileName,flv_width,flv_height">
 	<![CDATA[
 		if ($debug) Debug.write("playVideoSynced : ", fileId,fileName,flv_width,flv_height);
-	
+
 		var tName = 'flv'+this.getCounter();
 		this.currentlayer = new lz.whiteboardVideoPlayer(this,{
 										name:tName,
@@ -540,14 +540,14 @@
 										flv_width:flv_width,
 										flv_height:flv_height
 									});
-		this.layers.push(this.currentlayer);  
+		this.layers.push(this.currentlayer);
 	]]>
 	</method>
 
 	<method name="sendNewVideoRemote" args="refObj">
 	<![CDATA[
 		if ($debug) Debug.write("sendNewVideoRemote : ",refObj.fileId,refObj.title);
-	
+
 		this.flvregisterFinal(refObj.name,refObj.x,refObj.y,refObj.width,refObj.height,
 											refObj.fileId,refObj.title,
 											false, //isPlaying
@@ -579,20 +579,18 @@
 
 	<method name="drawFlvToHistory" args="lastActionObject,parentView">
 	<![CDATA[
-		if ($debug) Debug.write("drawFlvToHistory PLAY :: ",lastActionObject[3]);
-	
+		//if ($debug) Debug.write("drawFlvToHistory POSTER :: ", lastActionObject[3]);
+
 		this.currentlayer = new lz.whiteboardVideoPlayer(this,{
 										name:lastActionObject[lastActionObject.length-1],
 										fileId:lastActionObject[1],
-										title:lastActionObject[2],
+										title: lastActionObject[2],
+										posterUrl: lastActionObject[3],
 										flv_width:lastActionObject[4],
 										flv_height:lastActionObject[5],
 										hash:lastActionObject[7]
 									});
-		if (lastActionObject[3]) {
-			this.currentlayer.playRemote();
-		}
-		this.layers.push(this.currentlayer);  
+		this.layers.push(this.currentlayer);
 	]]>
 	</method>
 
@@ -601,10 +599,10 @@
 		for (var eg=0;eg<this.baseactionobjectList.length;eg++){
 			if (this.baseactionobjectList[eg][this.baseactionobjectList[eg].length-1]==refObj.name) {
 				this.baseactionobjectList[eg][3] = play;
-				
+
 				if ($debug) Debug.write("playFLV :: ",this.baseactionobjectList[eg]);
 				this.onsharedMessage('flv',this.baseactionobjectList[eg]);
-				
+
 				break;
 			}
 		}

Modified: openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-flash/src/main/swf/modules/conference/whiteboard/base/whiteboardVideoPlayer.lzx Tue Mar 14 16:52:27 2017
@@ -7,110 +7,98 @@
   to you under the Apache License, Version 2.0 (the
   "License"); you may not use this file except in compliance
   with the License.  You may obtain a copy of the License at
-  
+
 	  http://www.apache.org/licenses/LICENSE-2.0
-		  
+
   Unless required by applicable law or agreed to in writing,
   software distributed under the License is distributed on an
   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
   KIND, either express or implied.  See the License for the
   specific language governing permissions and limitations
   under the License.
-  
+
 -->
 <library>
 
-<class name="whiteboardVideoPlayer" extends="labelExplorerBox" allowDragging="false" 
-		docking="false" resizeable="false" closable="false" 
+<class name="whiteboardVideoPlayer" extends="labelExplorerBox" allowDragging="false"
+		docking="false" resizeable="false" closable="false"
 		x="0" y="0" width="${ parent.width }" height="${ parent.height - 10 }">
-	
+
 	<attribute name="fileId" value="0" type="number" />
 	<attribute name="timerDelegateStarted" value="false" type="boolean" />
 	<attribute name="deltaInSeconds" value="0" type="number" />
-	<attribute name="currentTime" value="0" type="number" /> 	
+	<attribute name="currentTime" value="0" type="number" />
 	<attribute name="recordingName" value="" type="string" />
 	<attribute name="hash" value="" type="string" />
+	<attribute name="posterUrl" value="" type="string" />
 	<attribute name="isLoaded" value="false" type="boolean" />
 	<attribute name="sendInit" value="false" type="boolean" />
-	<attribute name="flv_width" value="0" type="number" /> 
-	<attribute name="flv_height" value="0" type="number" /> 
+	<attribute name="flv_width" value="0" type="number" />
+	<attribute name="flv_height" value="0" type="number" />
 	<attribute name="isPaused" value="true" type="boolean" />
 	<handler name="oninit">
+	<![CDATA[
 		if ($debug) Debug.write("whiteboardVideoPlayer :: ",this.fileId);
-		
+
 		this.recordingName = hash + ".mp4";
 		calcVideoWidthHeight();
-		this.copyFileToCurrentRoom.doCall();
+
+		this.isLoaded = true;
+
+		this._content._preview.imagePreview.setAttribute("src", canvas.getUrl() + posterUrl
+				 + '&uid=' + canvas.publicSID);
+		this._content._preview.bringToFront();
+
+		if (this.sendInit) {
+			parent.sendNewVideoRemote(this);
+		}
+	]]>
 	</handler>
-	
+
 	<handler name="prepareForDelete" args="tRef">
 		if ($debug) Debug.write("--- prepareForDelete ");
 		this.stopStream();
 	</handler>
-	
+
 	<handler name="onclose">
 		this.stopStreamPlay();
 	</handler>
-	
+
 	<handler name="onwidth" args="w">
 		calcVideoWidthHeight();
 	</handler>
-	
+
 	<handler name="onheight" args="h">
 		calcVideoWidthHeight();
 	</handler>
-	
-	<!--
-	public Long copyFileToCurrentRoom(String SID, Long flvFileExplorerId)
-	 -->
-	<netRemoteCallHib name="copyFileToCurrentRoom" funcname="fileservice.copyFileToCurrentRoom" 
-		remotecontext="$once{ canvas.thishib }" > 
-		<netparam><method name="getValue">return canvas.sessionId;</method></netparam>
-		<netparam><method name="getValue">return parent.parent.fileId;</method></netparam>
-		<handler name="ondata" args="value">
-		<![CDATA[	
-			if ($debug) Debug.write("deleteFileOrFolder: ",value);
-			parent.isLoaded = true;
-			
-			var downloadurl = canvas.getUrl() + 'room/file/' + parent.fileId + '?uid='
-				+ canvas.publicSID + '&preview=true';
-			parent._content._preview.imagePreview.setAttribute("src", downloadurl)
-			parent._content._preview.bringToFront();
 
-			if (parent.sendInit) {
-				parent.parent.sendNewVideoRemote(parent);
-			}
-		]]>
-		</handler>
-	</netRemoteCallHib>
-	
 	<method name="startStreamPlay">
 		parent.playFLV(this,true);
 	</method>
-	
+
 	<method name="stopStreamPlay">
 		parent.playFLV(this,false);
 		this.stopStream();
 	</method>
-	
+
 	<method name="playRemote">
 		this.startStream();
 	</method>
-	
+
 	<method name="stopRemote">
 		this.stopStream();
 	</method>
-	
+
 	<method name="startStream">
 	<![CDATA[
 		if (!this.isLoaded) {
 			return;
 		}
 		if ($debug) Debug.write("startStream ", this.recordingName);
-		
+
 		if (this.recordingName != "") {
 			this.isPaused = false;
-			
+
 			if (!this.timerDelegateStarted) {
 				this.timerDelegateStarted = true;
 			}
@@ -122,53 +110,53 @@
 		}
 	]]>
 	</method>
-	
+
 	<!---
-		calculates the new x, y, width and height of the video so that it is 100% 
+		calculates the new x, y, width and height of the video so that it is 100%
 		visible in the container
 	 -->
 	<method name="calcVideoWidthHeight">
 	<![CDATA[
 		if ($debug) Debug.write("calcVideoWidthHeight ", this.flv_width, this.flv_height);
-	
+
 		var ratio = this.flv_width / this.flv_height;
 		var t = {};
 		var area = {height: parent.height - 62, width: parent.width - 1}
-		
+
 		//max height of container is new height of video;
 		//calc new width and x-position of video
 		t.height = area.height;
-		t.width = ratio * t.height; 
+		t.width = ratio * t.height;
 		t.x = (area.width - t.width) / 2;
 		t.y = 0;
-		
+
 		if ($debug) Debug.write("calcVideoWidthHeight", area, t);
-	 
+
 		if (t.width > area.width) {
 			t.width = area.width;
 			t.height = t.width / ratio;
 			t.x = 0;
 			t.y = (area.height - t.height) / 2;
 		}
-		t.width = Math.round(t.width); 
+		t.width = Math.round(t.width);
 		t.height = Math.round(t.height);
 		t.x = Math.round(t.x);
 		t.y = Math.round(t.y);
-		
+
 		if ($debug) Debug.write("t", t);
-		
+
 		this._content.setAttribute("x", t.x + 1);
 		this._content.setAttribute("y", t.y + 22);
 		this._content.setAttribute("width", t.width);
 		this._content.setAttribute("height", t.height);
-		
+
 		this._content._preview.setAttribute("width", t.width);
 		this._content._preview.setAttribute("height", t.height);
-		
+
 		return t;
 	]]>
 	</method>
-	
+
 	<method name="setDuration">
 	<![CDATA[
 		if ($debug) Debug.write("setDuration ",this.deltaInSeconds);
@@ -183,7 +171,7 @@
 		this._progress._progressbar._duration.setAttribute("text",tString);
 	]]>
 	</method>
-	
+
 	<method name="calcProgressBar">
 	<![CDATA[
 		if ($debug) Debug.write("calcProgressBar ", this.currentTime);
@@ -200,8 +188,8 @@
 		this._progress._progressbar._time.setAttribute("text", tString);
 		this._progress._progressbar._pointer.setAttribute("x", tNewX);
 	]]>
-	</method> 
-	
+	</method>
+
 	<method name="stopStream">
 		if (this.timerDelegateStarted) {
 			this.timerDelegateStarted = false;
@@ -212,33 +200,33 @@
 		this._content._preview.setAttribute('visible', true);
 		this.isPaused = true;
 	</method>
-	
+
 	<method name="toggleStream">
 		if (canvas.ismoderator &amp;&amp; this.isPaused) {
 				this.startStreamPlay();
 		}
 	</method>
-	
+
 	<baseVideoStream name="_content" height="${ parent.height - 62 }" bgcolor="0x000000" y="22" x="1" width="${ parent.width-1 }">
 		<attribute name="timerDelegate" value="null"/>
 		<attribute name="timerDelegateStarted" value="false" type="boolean"/>
-		
+
 		<handler name="oninit">
 			this.timerDelegate = new LzDelegate(this, "calcProgressBar");
 		</handler>
-		
+
 		<method name="playVideoStream" args="streamName, delay">
 			this.playStream(streamName, delay);
 			this.timerDelegateStarted = true;
 			lz.Timer.addTimer(this.timerDelegate , 1000);
 		</method>
-		
+
 		<method name="stopVideo">
 			this._stop();
 			lz.Timer.removeTimer(this.timerDelegate);
 			this.timerDelegateStarted = false;
 		</method>
-		
+
 		<handler name="onNetStatus" args="info">
 			//if ($debug) Debug.write("onNetStatus ",info);
 			if (info.code ==  "NetStream.Play.Stop" ) {
@@ -252,7 +240,7 @@
 			parent.deltaInSeconds = Number(info.duration);
 			parent.setDuration();
 		</handler>
-		
+
 		<method name="calcProgressBar" args="tObjRef">
 			if ($debug) Debug.write("calcProgressBar:: updateRecordingStreamTime", this.timerDelegateStarted, this._ns.time)
 			parent.currentTime = this._ns.time;
@@ -288,23 +276,23 @@
 			</handler>
 			<labelTooltip labelid="875" />
 		</view>
-		
+
 		<view name="_progressbar" x="16" width="${ parent.width - 32 }" y="1" height="16" bgcolor="$once{ canvas.getThemeColor('baseMouseOvercolorizer') }">
-			<view x="0" width="${ parent.width }" y="0" height="16" bgcolor="0xFFFFFF" opacity="0.5" /> 
-			
+			<view x="0" width="${ parent.width }" y="0" height="16" bgcolor="0xFFFFFF" opacity="0.5" />
+
 			<handler name="onclick">
 				//parent.parent.seekStream(this.getMouse("x"));
 			</handler>
-			
+
 			<view name="_pointer" resource="flv_progress_pointer_rsc" visibility="hidden" />
-			
+
 			<text name="_time" resize="true" fontsize="10" />
-			
+
 			<text name="_duration" align="right" resize="true" fontsize="10" />
 		</view>
-		
+
 		<view resource="flv_recorder_stop_small_rsc" align="right" y="1" height="16" width="16"
-			  bgcolor="$once{ canvas.getThemeColor('baseMouseOvercolorizer') }">
+				bgcolor="$once{ canvas.getThemeColor('baseMouseOvercolorizer') }">
 			<handler name="onmouseover">
 				this.setAttribute("bgcolor",0xFFFFFF);
 			</handler>
@@ -318,8 +306,8 @@
 			</handler>
 			<labelTooltip labelid="876" />
 		</view>
-	</view>	
-	
+	</view>
+
 	<simpleLabelButton labelid="85" width="100" x="${ parent.width-118 }" y="${ parent.height-20 }" >
 		<handler name="onclick">
 			if (canvas.ismoderator) {

Modified: openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-service/src/main/java/org/apache/openmeetings/service/quartz/scheduler/CleanupJob.java Tue Mar 14 16:52:27 2017
@@ -29,11 +29,11 @@ import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.math.NumberUtils;
-import org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
 import org.apache.openmeetings.core.session.SessionManager;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
-import org.apache.openmeetings.db.dto.room.WhiteboardObject;
-import org.apache.openmeetings.db.dto.room.WhiteboardObjectList;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
+import org.apache.openmeetings.db.dto.room.Whiteboards;
 import org.apache.openmeetings.util.InitializationContainer;
 import org.red5.logging.Red5LoggerFactory;
 import org.slf4j.Logger;
@@ -50,7 +50,7 @@ public class CleanupJob extends Abstract
 	@Autowired
 	private SessionManager sessionManager;
 	@Autowired
-	private WhiteBoardObjectListManagerById wbManager;
+	private WhiteboardCache wbManager;
 
 	public long getSessionTimeout() {
 		return sessionTimeout;
@@ -122,8 +122,8 @@ public class CleanupJob extends Abstract
 					Long roomId = null;
 					if (NumberUtils.isCreatable(folder.getName())) {
 						roomId = Long.valueOf(folder.getName());
-						WhiteboardObjectList wbList = wbManager.getWhiteBoardObjectListByRoomId(roomId);
-						for (Map.Entry<Long, WhiteboardObject> e : wbList.getWhiteboardObjects().entrySet()) {
+						Whiteboards wbList = wbManager.get(roomId);
+						for (Map.Entry<Long, Whiteboard> e : wbList.getWhiteboards().entrySet()) {
 							if (!e.getValue().getRoomItems().isEmpty()) {
 								roomId = null;
 								break;

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/admin/labels/LangPanel.html Tue Mar 14 16:52:27 2017
@@ -27,7 +27,6 @@
 				, autoOpen: false
 				, resizable: false
 			});
-			ADMIN_TABLE_SHIIFT = 172;
 		};
 	</script>
 </wicket:head>

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomPanel.java Tue Mar 14 16:52:27 2017
@@ -35,6 +35,7 @@ import java.util.Set;
 import java.util.UUID;
 
 import org.apache.directory.api.util.Strings;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
 import org.apache.openmeetings.core.remote.ConferenceLibrary;
 import org.apache.openmeetings.core.remote.red5.ScopeApplicationAdapter;
 import org.apache.openmeetings.core.util.WebSocketHelper;
@@ -64,6 +65,7 @@ import org.apache.openmeetings.web.room.
 import org.apache.openmeetings.web.room.activities.Activity;
 import org.apache.openmeetings.web.room.menu.RoomMenuPanel;
 import org.apache.openmeetings.web.room.sidebar.RoomSidebar;
+import org.apache.openmeetings.web.user.record.JpgRecordingResourceReference;
 import org.apache.wicket.Component;
 import org.apache.wicket.ajax.AbstractDefaultAjaxBehavior;
 import org.apache.wicket.ajax.AjaxRequestTarget;
@@ -633,10 +635,25 @@ public class RoomPanel extends BasePanel
 
 	public void sendFileToWb(FileItem fi, boolean clean) {
 		if (activeWbId > -1 && fi.getId() != null && FileItem.Type.Folder != fi.getType()) {
-			if (fi.getType() == FileItem.Type.WmlFile) {
+			if (FileItem.Type.WmlFile == fi.getType()) {
 				getBean(ConferenceLibrary.class).sendToWhiteboard(getClient().getUid(), activeWbId, fi);
 			} else {
-				String url = urlFor(new RoomResourceReference(), new PageParameters().add("id", fi.getId())).toString();
+				String url = null;
+				PageParameters pp = new PageParameters();
+				pp.add("id", fi.getId())
+					.add("ruid", getBean(WhiteboardCache.class).get(r.getId()).getUid());
+				switch (fi.getType()) {
+					case Video:
+						pp.add("preview", true);
+						url = urlFor(new RoomResourceReference(), pp).toString();
+						break;
+					case Recording:
+						url = urlFor(new JpgRecordingResourceReference(), pp).toString();
+						break;
+					default:
+						url = urlFor(new RoomResourceReference(), pp).toString();
+						break;
+				}
 				getBean(ScopeApplicationAdapter.class).sendToWhiteboard(getClient().getUid(), activeWbId, fi, url, clean);
 			}
 		}

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/RoomResourceReference.java Tue Mar 14 16:52:27 2017
@@ -27,8 +27,13 @@ import static org.apache.openmeetings.we
 import static org.apache.openmeetings.web.app.Application.getOnlineClient;
 
 import java.io.File;
+import java.util.Map.Entry;
 
+import org.apache.directory.api.util.Strings;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
 import org.apache.openmeetings.db.dao.file.FileExplorerItemDao;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
+import org.apache.openmeetings.db.dto.room.Whiteboards;
 import org.apache.openmeetings.db.entity.basic.Client;
 import org.apache.openmeetings.db.entity.file.FileExplorerItem;
 import org.apache.openmeetings.db.entity.file.FileItem;
@@ -93,10 +98,16 @@ public class RoomResourceReference exten
 			return null;
 		}
 		FileExplorerItem f = getBean(FileExplorerItemDao.class).get(id);
-		// impossible to check file permission based on client, file can be dropped on WB
-		// and should be accessible to whole room
-		//FIXME TODO ADDITIONALLY CHECK Rights !! and room !!
-		return f;
+		String ruid = params.get("ruid").toString();
+		Whiteboards wbs = getBean(WhiteboardCache.class).get(c.getRoomId());
+		if (!Strings.isEmpty(ruid) && ruid.equals(wbs.getUid())) {
+			for (Entry<Long, Whiteboard> e : wbs.getWhiteboards().entrySet()) {
+				if (e.getValue().getRoomItems().containsKey(f.getHash())) {
+					return f; // item IS on WB
+				}
+			}
+		}
+		return null;
 	}
 
 	protected File getFile(FileExplorerItem f, String ext) {

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/sidebar/UploadDialog.java Tue Mar 14 16:52:27 2017
@@ -181,6 +181,7 @@ public class UploadDialog extends Abstra
 	protected void onSubmit(AjaxRequestTarget target) {
 		List<FileUpload> ful = uploadField.getFileUploads();
 		if (ful != null) {
+			boolean clean = cleanWb.getModelObject();
 			for (FileUpload fu : ful) {
 				FileExplorerItem f = new FileExplorerItem();
 				f.setSize(fu.getSize());
@@ -208,7 +209,8 @@ public class UploadDialog extends Abstra
 						form.error(getString("convert.errors.file"));
 					} else {
 						if (toWb.getModelObject()) {
-							room.sendFileToWb(f, cleanWb.getModelObject());
+							room.sendFileToWb(f, clean);
+							clean = false;
 						}
 					}
 				} catch (Exception e) {

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/java/org/apache/openmeetings/web/user/record/RecordingResourceReference.java Tue Mar 14 16:52:27 2017
@@ -20,14 +20,22 @@ package org.apache.openmeetings.web.user
 
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 import static org.apache.openmeetings.web.app.Application.getBean;
+import static org.apache.openmeetings.web.app.Application.getOnlineClient;
 import static org.apache.openmeetings.web.app.WebSession.getExternalType;
 import static org.apache.openmeetings.web.app.WebSession.getRecordingId;
 import static org.apache.openmeetings.web.app.WebSession.getUserId;
 import static org.red5.logging.Red5LoggerFactory.getLogger;
 
+import java.util.Map.Entry;
+
+import org.apache.directory.api.util.Strings;
+import org.apache.openmeetings.core.data.whiteboard.WhiteboardCache;
 import org.apache.openmeetings.db.dao.record.RecordingDao;
 import org.apache.openmeetings.db.dao.user.GroupUserDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
+import org.apache.openmeetings.db.dto.room.Whiteboard;
+import org.apache.openmeetings.db.dto.room.Whiteboards;
+import org.apache.openmeetings.db.entity.basic.Client;
 import org.apache.openmeetings.db.entity.file.FileItem.Type;
 import org.apache.openmeetings.db.entity.record.Recording;
 import org.apache.openmeetings.db.entity.user.User;
@@ -50,13 +58,15 @@ public abstract class RecordingResourceR
 	public String getMimeType(Recording r) {
 		return getMimeType();
 	}
-	
+
 	public abstract String getMimeType();
-	
+
 	@Override
 	protected Recording getFileItem(Attributes attributes) {
 		PageParameters params = attributes.getParameters();
 		StringValue _id = params.get("id");
+		String ruid = params.get("ruid").toString();
+		String uid = params.get("uid").toString();
 		Long id = null;
 		try {
 			id = _id.toOptionalLong();
@@ -68,12 +78,12 @@ public abstract class RecordingResourceR
 			id = getRecordingId();
 		}
 		if (id != null && ws.isSignedIn()) {
-			return getRecording(id);
+			return getRecording(id, ruid, uid);
 		}
 		return null;
 	}
-	
-	private static Recording getRecording(Long id) {
+
+	private static Recording getRecording(Long id, String ruid, String uid) {
 		log.debug("Recording with id {} is requested", id);
 		Recording r = getBean(RecordingDao.class).get(id);
 		if (r == null || r.getType() == Type.Folder || r.isDeleted()) {
@@ -82,6 +92,17 @@ public abstract class RecordingResourceR
 		if (id.equals(getRecordingId())) {
 			return r;
 		}
+		Client c = getOnlineClient(uid);
+		if (c != null) {
+			Whiteboards wbs = getBean(WhiteboardCache.class).get(c.getRoomId());
+			if (wbs != null && !Strings.isEmpty(ruid) && ruid.equals(wbs.getUid())) {
+				for (Entry<Long, Whiteboard> e : wbs.getWhiteboards().entrySet()) {
+					if (e.getValue().getRoomItems().containsKey(r.getHash())) {
+						return r; // item IS on WB
+					}
+				}
+			}
+		}
 		//TODO should we check parentId here
 		if (r.getOwnerId() == null && r.getGroupId() == null) {
 			//public

Modified: openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-web/src/main/webapp/WEB-INF/classes/openmeetings-applicationContext.xml Tue Mar 14 16:52:27 2017
@@ -64,9 +64,9 @@
 	<!-- Database cache -->
 	<bean id="openmeetings.DatabaseStore" class="org.apache.openmeetings.core.session.store.DatabaseStore" />
 	
-	<bean id="whiteBoardObjectListManagerById" scope="singleton" class="org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectListManagerById" />
-	<!-- WhiteBoardObjectSyncManager can stay in the memory, even on cluster! -->
-	<bean id="whiteBoardObjectSyncManager" scope="singleton" class="org.apache.openmeetings.core.data.whiteboard.WhiteBoardObjectSyncManager" />
+	<bean id="whiteboardCache" scope="singleton" class="org.apache.openmeetings.core.data.whiteboard.WhiteboardCache" />
+	<!-- WhiteboardObjectSyncManager can stay in the memory, even on cluster! -->
+	<bean id="whiteboardObjectSyncManager" scope="singleton" class="org.apache.openmeetings.core.data.whiteboard.WhiteboardObjectSyncManager" />
 
 	<!-- Cluster related config start -->
 	<bean id="openmeetings.ServerUtil" scope="singleton" class="org.apache.openmeetings.core.session.ServerUtil">
@@ -78,7 +78,7 @@
 	<!-- Start of Services -->
 	<bean id="xmlcrm.service" class="org.apache.openmeetings.core.remote.MainService" />
 	<bean id="languageservice.service" class="org.apache.openmeetings.core.remote.LanguageService" />
-	<bean id="whiteboardservice.service" class="org.apache.openmeetings.core.remote.WhiteBoardService" />
+	<bean id="whiteboardservice.service" class="org.apache.openmeetings.core.remote.WhiteboardService" />
 	<bean id="userservice.service" class="org.apache.openmeetings.core.remote.UserService" />
 	<bean id="fileservice.service" class="org.apache.openmeetings.core.remote.ConferenceLibrary" />
 	<bean id="openmeetings.FileProcessor" class="org.apache.openmeetings.core.data.file.FileProcessor" />
@@ -211,7 +211,7 @@
 	<bean id="generateSWF" class="org.apache.openmeetings.core.converter.GenerateSWF" />
 	<bean id="ldapLoginManagement" class="org.apache.openmeetings.core.ldap.LdapLoginManagement" />
 	<bean id="timezoneUtil" class="org.apache.openmeetings.db.util.TimezoneUtil" />
-	<bean id="whiteboardManagement" class="org.apache.openmeetings.core.data.whiteboard.WhiteboardManager" />
+	<bean id="whiteboardManager" class="org.apache.openmeetings.core.data.whiteboard.WhiteboardManager" />
 	<bean id="backupExport" class="org.apache.openmeetings.backup.BackupExport" />
 	<bean id="backupImport" class="org.apache.openmeetings.backup.BackupImport" />
 	<bean id="appointmentManager" class="org.apache.openmeetings.service.calendar.caldav.AppointmentManager" destroy-method="destroy"/>

Modified: openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java
URL: http://svn.apache.org/viewvc/openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java?rev=1786925&r1=1786924&r2=1786925&view=diff
==============================================================================
--- openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java (original)
+++ openmeetings/application/branches/3.2.x/openmeetings-webservice/src/main/java/org/apache/openmeetings/webservice/FileWebService.java Tue Mar 14 16:52:27 2017
@@ -21,7 +21,6 @@ package org.apache.openmeetings.webservi
 import static org.apache.openmeetings.util.OpenmeetingsVariables.webAppRootKey;
 import static org.apache.openmeetings.webservice.Constants.TNS;
 
-import java.io.File;
 import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.List;
@@ -43,7 +42,6 @@ import javax.ws.rs.core.MediaType;
 import org.apache.cxf.feature.Features;
 import org.apache.cxf.jaxrs.ext.multipart.Multipart;
 import org.apache.openmeetings.core.data.file.FileProcessor;
-import org.apache.openmeetings.core.documents.LoadLibraryPresentation;
 import org.apache.openmeetings.db.dao.file.FileExplorerItemDao;
 import org.apache.openmeetings.db.dao.server.SessiondataDao;
 import org.apache.openmeetings.db.dao.user.UserDao;
@@ -51,12 +49,10 @@ import org.apache.openmeetings.db.dto.ba
 import org.apache.openmeetings.db.dto.basic.ServiceResult.Type;
 import org.apache.openmeetings.db.dto.file.FileExplorerItemDTO;
 import org.apache.openmeetings.db.dto.file.FileExplorerObject;
-import org.apache.openmeetings.db.dto.file.LibraryPresentation;
 import org.apache.openmeetings.db.entity.file.FileExplorerItem;
 import org.apache.openmeetings.db.entity.server.Sessiondata;
 import org.apache.openmeetings.db.entity.user.User.Right;
 import org.apache.openmeetings.db.util.AuthLevelUtil;
-import org.apache.openmeetings.util.OmFileHelper;
 import org.apache.openmeetings.util.process.ConverterProcessResultList;
 import org.apache.openmeetings.webservice.error.ServiceException;
 import org.red5.logging.Red5LoggerFactory;
@@ -216,44 +212,6 @@ public class FileWebService {
 		}
 	}
 
-	/**
-	 * Get a LibraryPresentation-Object for a certain file
-	 *
-	 * @param sid
-	 *            The SID of the User. This SID must be marked as logged in
-	 * @param parentFolder
-	 *
-	 * @return - LibraryPresentation-Object for a certain file
-	 * @throws ServiceException
-	 */
-	public LibraryPresentation getPresentationPreviewFileExplorer(String sid, String parentFolder)
-			throws ServiceException {
-
-		try {
-			Sessiondata sd = sessionDao.check(sid);
-			if (AuthLevelUtil.hasWebServiceLevel(userDao.getRights(sd.getUserId()))) {
-
-				File working_dir = new File(OmFileHelper.getUploadProfilesDir(), parentFolder);
-				log.debug("############# working_dir : " + working_dir);
-
-				File file = new File(working_dir, OmFileHelper.libraryFileName);
-
-				if (!file.exists()) {
-					throw new ServiceException(file.getCanonicalPath() + ": does not exist ");
-				}
-
-				return LoadLibraryPresentation.parseLibraryFileToObject(file);
-			} else {
-				throw new ServiceException("not Authenticated");
-			}
-		} catch (ServiceException e) {
-			throw e;
-		} catch (Exception e) {
-			log.error("[getListOfFilesByAbsolutePath]", e);
-			return null;
-		}
-	}
-
 	/**
 	 * Get a File Explorer Object by a given Room
 	 *