Revision: 4134
Author: seba.wagner
Date: Mon Aug 29 14:16:42 2011
Log: Another bunch of warnings removed
http://code.google.com/p/openmeetings/source/detail?r=4134
Modified:
/branches/dev/injection/src/app/org/openmeetings/app/batik/beans/PrintBean.java
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardManagement.java
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardObject.java
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardSyncLockObject.java
/branches/dev/injection/src/roomservice/org/openmeetings/axis/services/RoomReturn.java
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/batik/beans/PrintBean.java
Mon Oct 12 02:51:43 2009
+++
/branches/dev/injection/src/app/org/openmeetings/app/batik/beans/PrintBean.java
Mon Aug 29 14:16:42 2011
@@ -1,47 +1,56 @@
package org.openmeetings.app.batik.beans;
import java.util.List;
-import java.util.Map;
public class PrintBean {
-
+
public String hash;
+ @SuppressWarnings("rawtypes")
public List map;
public int width;
public int height;
-
- public PrintBean(String hash, List map, int width, int height) {
+
+ public PrintBean(String hash, @SuppressWarnings("rawtypes") List map,
+ int width, int height) {
super();
this.hash = hash;
this.height = height;
this.map = map;
this.width = width;
}
+
public String getHash() {
return hash;
}
+
public void setHash(String hash) {
this.hash = hash;
}
+
+ @SuppressWarnings("rawtypes")
public List getMap() {
return map;
}
+
+ @SuppressWarnings("rawtypes")
public void setMap(List map) {
this.map = map;
}
+
public int getWidth() {
return width;
}
+
public void setWidth(int width) {
this.width = width;
}
+
public int getHeight() {
return height;
}
+
public void setHeight(int height) {
this.height = height;
}
-
-
}
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardManagement.java
Sat Jun 11 00:57:08 2011
+++
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardManagement.java
Mon Aug 29 14:16:42 2011
@@ -1,6 +1,5 @@
package org.openmeetings.app.conference.whiteboard;
-import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -9,75 +8,84 @@
import org.openmeetings.app.remote.red5.ScopeApplicationAdapter;
import org.openmeetings.app.remote.red5.WhiteBoardObjectListManager;
import org.openmeetings.app.remote.red5.WhiteBoardObjectListManagerById;
-import org.slf4j.Logger;
import org.red5.logging.Red5LoggerFactory;
+import org.slf4j.Logger;
public class WhiteboardManagement {
-
- private static final Logger log =
Red5LoggerFactory.getLogger(WhiteboardManagement.class,
ScopeApplicationAdapter.webAppRootKey);
-
- private WhiteboardManagement() {}
-
+
+ private static final Logger log = Red5LoggerFactory.getLogger(
+ WhiteboardManagement.class,
ScopeApplicationAdapter.webAppRootKey);
+
+ private WhiteboardManagement() {
+ }
+
private static WhiteboardManagement instance = null;
-
+
public static synchronized WhiteboardManagement getInstance() {
if (instance == null) {
instance = new WhiteboardManagement();
}
return instance;
}
-
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
public void addWhiteBoardObject(Long room_id, Map whiteboardObj) {
try {
- log.debug("addWhiteBoardObject: "+whiteboardObj);
-
- //log.debug("whiteboardObj 0: Event:
"+whiteboardObj.get(0));
- //log.debug("whiteboardObj 1: Event:
"+whiteboardObj.get(1));
- //log.debug("whiteboardObj 2: Event:
"+whiteboardObj.get(2));
- //log.debug("whiteboardObj 3: Event:
"+whiteboardObj.get(3));
-
- //log.debug("whiteboardObj NUMB3:
Event: "+whiteboardObj.get(3).getClass().getName());
-
- //Date dateOfEvent = (Date) whiteboardObj.get(1);
- String action = whiteboardObj.get(2).toString();
+ log.debug("addWhiteBoardObject: " + whiteboardObj);
+
+ // log.debug("whiteboardObj 0: Event:
"+whiteboardObj.get(0));
+ // log.debug("whiteboardObj 1: Event:
"+whiteboardObj.get(1));
+ // log.debug("whiteboardObj 2: Event:
"+whiteboardObj.get(2));
+ // log.debug("whiteboardObj 3: Event:
"+whiteboardObj.get(3));
+
+ // log.debug("whiteboardObj NUMB3:
Event: "+whiteboardObj.get(3).getClass().getName());
+
+ // Date dateOfEvent = (Date) whiteboardObj.get(1);
+ String action = whiteboardObj.get(2).toString();
List actionObject = (List) whiteboardObj.get(3);
-
- log.debug("action: "+action);
-
- if (action.equals("draw") || action.equals("redo")){
- HashMap<String,List> roomList =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectListByRoomId(room_id);
-
- //log.debug(actionObject);
- //log.debug(actionObject.size()-1);
-
//log.debug(actionObject.get(actionObject.size()-1));
+
+ log.debug("action: " + action);
+
+ if (action.equals("draw") || action.equals("redo")) {
+ HashMap<String, List> roomList =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectListByRoomId(room_id);
+
+ // log.debug(actionObject);
+ // log.debug(actionObject.size()-1);
+ //
log.debug(actionObject.get(actionObject.size()-1));
String objectType =
actionObject.get(0).toString();
- if (!objectType.equals("pointerWhiteBoard")){
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
- log.debug("objectOID: "+objectOID);
+ if (!objectType.equals("pointerWhiteBoard")) {
+ String objectOID = actionObject
+
.get(actionObject.size() - 1).toString();
+ log.debug("objectOID: " + objectOID);
roomList.put(objectOID, actionObject);
-
WhiteBoardObjectListManager.getInstance().setWhiteBoardObjectListRoomObj(room_id,
roomList);
+
WhiteBoardObjectListManager.getInstance()
+
.setWhiteBoardObjectListRoomObj(room_id, roomList);
}
} else if (action.equals("clear")) {
-
- WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(room_id,
new WhiteboardObject());
-
+
+
WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(
+ room_id, new
WhiteboardObject());
+
} else if (action.equals("delete") ||
action.equals("undo")) {
- HashMap<String,List> roomList =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectListByRoomId(room_id);
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
+ HashMap<String, List> roomList =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectListByRoomId(room_id);
+ String objectOID =
actionObject.get(actionObject.size() - 1)
+ .toString();
String objectType =
actionObject.get(0).toString();
- log.debug("removal of objectOID: "+objectOID);
-
-// "ellipse"
-// || this.baseactionobjectList[i][0] == "drawarrow"
-// || this.baseactionobjectList[i][0] == "line"
-// || this.baseactionobjectList[i][0] == "paint"
-// || this.baseactionobjectList[i][0] == "rectangle"
-// || this.baseactionobjectList[i][0] == "uline"
-// || this.baseactionobjectList[i][0] == "image"
-// || this.baseactionobjectList[i][0] == "letter"
-
- //Re-Index all items in its zIndex
- if (objectType.equals("ellipse")
+ log.debug("removal of objectOID: " + objectOID);
+
+ // "ellipse"
+ // || this.baseactionobjectList[i][0] ==
"drawarrow"
+ // || this.baseactionobjectList[i][0] == "line"
+ // || this.baseactionobjectList[i][0] == "paint"
+ // || this.baseactionobjectList[i][0] ==
"rectangle"
+ // || this.baseactionobjectList[i][0] == "uline"
+ // || this.baseactionobjectList[i][0] == "image"
+ // || this.baseactionobjectList[i][0] ==
"letter"
+
+ // Re-Index all items in its zIndex
+ if (objectType.equals("ellipse")
||
objectType.equals("drawarrow")
|| objectType.equals("line")
|| objectType.equals("paint")
@@ -86,225 +94,295 @@
|| objectType.equals("image")
|| objectType.equals("letter")
|| objectType.equals("swf")) {
-
- Integer zIndex =
Integer.valueOf(actionObject.get(actionObject.size()-8).toString()).intValue();
-
- log.debug("1|zIndex "+zIndex);
- log.debug("2|
zIndex "+actionObject.get(actionObject.size()-8).toString());
- log.debug("3|zIndex
"+actionObject.get(actionObject.size()-8));
-
+
+ Integer zIndex = Integer.valueOf(
+
actionObject.get(actionObject.size() - 8)
+
.toString()).intValue();
+
+ log.debug("1|zIndex " + zIndex);
+ log.debug("2|zIndex "
+ +
actionObject.get(actionObject.size() - 8)
+
.toString());
+ log.debug("3|zIndex "
+ +
actionObject.get(actionObject.size() - 8));
+
int l = 0;
- for (Iterator debugIter =
actionObject.iterator();debugIter.hasNext();) {
- log.debug("4|zIndex "+l+" --
"+debugIter.next());
+ for (Iterator debugIter =
actionObject.iterator(); debugIter
+ .hasNext();) {
+ log.debug("4|zIndex " + l + " --
" + debugIter.next());
l++;
}
-
- for (Iterator<String>
iter=roomList.keySet().iterator();iter.hasNext();) {
+
+ for (Iterator<String> iter =
roomList.keySet().iterator(); iter
+ .hasNext();) {
String whiteboardObjKey =
iter.next();
- List actionObjectStored =
roomList.get(whiteboardObjKey);
-
- Integer zIndexStored =
Integer.valueOf(actionObjectStored.get(actionObjectStored.size()-8).toString()).intValue();
-
- log.debug("zIndexStored|zIndex
"+zIndexStored+"|"+zIndex);
-
+ List actionObjectStored =
roomList
+
.get(whiteboardObjKey);
+
+ Integer zIndexStored =
Integer.valueOf(
+
actionObjectStored.get(
+
actionObjectStored.size() - 8)
+
.toString()).intValue();
+
+ log.debug("zIndexStored|zIndex " +
zIndexStored + "|"
+ + zIndex);
+
if (zIndexStored >= zIndex) {
- zIndexStored-=1;
- log.debug("new-zIndex
"+zIndexStored);
- }
-
actionObjectStored.set(actionObjectStored.size()-8, zIndexStored);
-
+ zIndexStored -= 1;
+ log.debug("new-zIndex "
+ zIndexStored);
+ }
+
actionObjectStored.set(actionObjectStored.size() - 8,
+ zIndexStored);
+
roomList.put(whiteboardObjKey,
actionObjectStored);
}
-
- }
-
+
+ }
+
roomList.remove(objectOID);
-
WhiteBoardObjectListManager.getInstance().setWhiteBoardObjectListRoomObj(room_id,
roomList);
- } else if (action.equals("size") ||
action.equals("editProp")
+ WhiteBoardObjectListManager.getInstance()
+
.setWhiteBoardObjectListRoomObj(room_id, roomList);
+ } else if (action.equals("size") ||
action.equals("editProp")
|| action.equals("editText") ||
action.equals("swf")) {
- HashMap<String,List> roomList =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectListByRoomId(room_id);
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
- //List roomItem = roomList.get(objectOID);
+ HashMap<String, List> roomList =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectListByRoomId(room_id);
+ String objectOID =
actionObject.get(actionObject.size() - 1)
+ .toString();
+ // List roomItem = roomList.get(objectOID);
List currentObject = roomList.get(objectOID);
roomList.put(objectOID, actionObject);
-
+
if (action.equals("swf")) {
if (actionObject.get(0).equals("swf")) {
-
- if (actionObject.get(8) != currentObject.get(8)) {
-
-
- String baseObjectName =
actionObject.get(actionObject.size()-1).toString();
- Integer slidesNumber =
Integer.valueOf(actionObject.get(8).toString()).intValue();
-
-
log.debug("updateObjectsToSlideNumber :: "+baseObjectName+","+slidesNumber);
-
- for (Iterator<String>
iter=roomList.keySet().iterator();iter.hasNext();) {
- String whiteboardObjKey
= iter.next();
- List actionObjectStored
= roomList.get(whiteboardObjKey);
-
- if
(actionObjectStored.get(0).equals("ellipse")
- ||
actionObjectStored.get(0).equals("drawarrow")
- ||
actionObjectStored.get(0).equals("line")
- ||
actionObjectStored.get(0).equals("paint")
- ||
actionObjectStored.get(0).equals("rectangle")
- ||
actionObjectStored.get(0).equals("uline")
- ||
actionObjectStored.get(0).equals("image")
- ||
actionObjectStored.get(0).equals("letter")) {
-
- Map swfObj = (Map)
actionObjectStored.get(actionObjectStored.size()-7);
- log.debug("swfObj :1: "+swfObj);
-
- if (swfObj != null) {
-
- if
(swfObj.get("name").equals(baseObjectName)) {
-
- if
(Integer.valueOf(swfObj.get("slide").toString()).intValue() ==
slidesNumber) {
-
-
swfObj.put("isVisible",true);
-
-
actionObjectStored.set(actionObjectStored.size()-7,swfObj);
-
- } else {
-
-
swfObj.put("isVisible",false);
-
-
actionObjectStored.set(actionObjectStored.size()-7,swfObj);
-
- }
-
- }
-
- }
-
- log.debug("swfObj :1: "+swfObj);
-
- }
-
- }
-
- }
-
+
+ if (actionObject.get(8) !=
currentObject.get(8)) {
+
+ String baseObjectName =
actionObject.get(
+
actionObject.size() - 1).toString();
+ Integer slidesNumber =
Integer.valueOf(
+
actionObject.get(8).toString()).intValue();
+
+
log.debug("updateObjectsToSlideNumber :: "
+ + baseObjectName
+ "," + slidesNumber);
+
+ for (Iterator<String>
iter = roomList.keySet()
+
.iterator(); iter.hasNext();) {
+ String
whiteboardObjKey = iter.next();
+ List
actionObjectStored = roomList
+
.get(whiteboardObjKey);
+
+ if
(actionObjectStored.get(0).equals("ellipse")
+
|| actionObjectStored.get(0).equals(
+
"drawarrow")
+
|| actionObjectStored.get(0).equals(
+
"line")
+
|| actionObjectStored.get(0).equals(
+
"paint")
+
|| actionObjectStored.get(0).equals(
+
"rectangle")
+
|| actionObjectStored.get(0).equals(
+
"uline")
+
|| actionObjectStored.get(0).equals(
+
"image")
+
|| actionObjectStored.get(0).equals(
+
"letter")) {
+
+ Map
swfObj = (Map) actionObjectStored
+
.get(actionObjectStored.size() - 7);
+
log.debug("swfObj :1: " + swfObj);
+
+ if
(swfObj != null) {
+
+ if
(swfObj.get("name").equals(
+
baseObjectName)) {
+
+
if (Integer.valueOf(
+
swfObj.get("slide")
+
.toString())
+
.intValue() == slidesNumber) {
+
+
swfObj.put("isVisible", true);
+
+
actionObjectStored.set(
+
actionObjectStored
+
.size() - 7,
+
swfObj);
+
+
} else {
+
+
swfObj.put("isVisible", false);
+
+
actionObjectStored.set(
+
actionObjectStored
+
.size() - 7,
+
swfObj);
+
+
}
+
+
}
+
+ }
+
+
log.debug("swfObj :1: " + swfObj);
+
+ }
+
+ }
+
+ }
+
}
}
-
-
WhiteBoardObjectListManager.getInstance().setWhiteBoardObjectListRoomObj(room_id,
roomList);
+
+ WhiteBoardObjectListManager.getInstance()
+
.setWhiteBoardObjectListRoomObj(room_id, roomList);
} else if (action.equals("clearSlide")) {
-
- HashMap<String,List> roomList =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectListByRoomId(room_id);
-
+
+ HashMap<String, List> roomList =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectListByRoomId(room_id);
+
for (String objectName : (List<String>)
actionObject) {
-
+
roomList.remove(objectName);
-
- }
-
-
WhiteBoardObjectListManager.getInstance().setWhiteBoardObjectListRoomObj(room_id,
roomList);
-
+
+ }
+
+ WhiteBoardObjectListManager.getInstance()
+
.setWhiteBoardObjectListRoomObj(room_id, roomList);
+
} else {
- log.warn("Unkown Type: "+action+" actionObject:
"+actionObject);
- }
-
+ log.warn("Unkown Type: " + action + " actionObject:
"
+ + actionObject);
+ }
+
} catch (Exception err) {
- log.error("[addWhiteBoardObject]",err);
+ log.error("[addWhiteBoardObject]", err);
}
}
+ @SuppressWarnings({ "rawtypes" })
public void updateWhiteboardObject(Long room_id, List actionObject) {
try {
-
- WhiteboardObject whiteBoardObject =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectRoomId(room_id);
-
+
+ WhiteboardObject whiteBoardObject =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectRoomId(room_id);
+
whiteBoardObject.setFullFit((Boolean)
actionObject.get(1));
whiteBoardObject.setZoom((Integer) actionObject.get(2));
-
- WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(room_id,
whiteBoardObject);
-
+
+
WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(
+ room_id, whiteBoardObject);
+
} catch (Exception err) {
- log.error("[updateWhiteboardObject]",err);
+ log.error("[updateWhiteboardObject]", err);
}
}
+ @SuppressWarnings({ "rawtypes" })
public void updateWhiteboardObjectPos(Long room_id, List actionObject) {
try {
-
- WhiteboardObject whiteBoardObject =
WhiteBoardObjectListManager.getInstance().getWhiteBoardObjectRoomId(room_id);
-
+
+ WhiteboardObject whiteBoardObject =
WhiteBoardObjectListManager
+
.getInstance().getWhiteBoardObjectRoomId(room_id);
+
whiteBoardObject.setX((Integer) actionObject.get(1));
whiteBoardObject.setY((Integer) actionObject.get(2));
-
- WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(room_id,
whiteBoardObject);
-
+
+
WhiteBoardObjectListManager.getInstance().setWhiteBoardObject(
+ room_id, whiteBoardObject);
+
} catch (Exception err) {
- log.error("[updateWhiteboardObjectPos]",err);
+ log.error("[updateWhiteboardObjectPos]", err);
}
}
-
-
- public void addWhiteBoardObjectById(Long room_id, Map whiteboardObj, Long
whiteBoardId) {
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ public void addWhiteBoardObjectById(Long room_id, Map whiteboardObj,
+ Long whiteBoardId) {
try {
- log.debug("addWhiteBoardObjectById: ",whiteboardObj);
-
- //log.debug("whiteboardObj 0: Event:
"+whiteboardObj.get(0));
- //log.debug("whiteboardObj 1: Event:
"+whiteboardObj.get(1));
- //log.debug("whiteboardObj 2: Event:
"+whiteboardObj.get(2));
- //log.debug("whiteboardObj 3: Event:
"+whiteboardObj.get(3));
-
- //log.debug("whiteboardObj NUMB3:
Event: "+whiteboardObj.get(3).getClass().getName());
-
- //Date dateOfEvent = (Date) whiteboardObj.get(1);
- String action = whiteboardObj.get(2).toString();
-
- log.debug("action: "+action);
- log.debug("actionObject: "+whiteboardObj.get(3));
-
+ log.debug("addWhiteBoardObjectById: ", whiteboardObj);
+
+ // log.debug("whiteboardObj 0: Event:
"+whiteboardObj.get(0));
+ // log.debug("whiteboardObj 1: Event:
"+whiteboardObj.get(1));
+ // log.debug("whiteboardObj 2: Event:
"+whiteboardObj.get(2));
+ // log.debug("whiteboardObj 3: Event:
"+whiteboardObj.get(3));
+
+ // log.debug("whiteboardObj NUMB3:
Event: "+whiteboardObj.get(3).getClass().getName());
+
+ // Date dateOfEvent = (Date) whiteboardObj.get(1);
+ String action = whiteboardObj.get(2).toString();
+
+ log.debug("action: " + action);
+ log.debug("actionObject: " + whiteboardObj.get(3));
+
List actionObject = (List) whiteboardObj.get(3);
-
-
-
- if (action.equals("moveMap")){
- WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
-
-
whiteboardObject.setX(Integer.valueOf(actionObject.get(1).toString()).intValue());
-
whiteboardObject.setY(Integer.valueOf(actionObject.get(2).toString()).intValue());
-
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
- } else if (action.equals("draw") ||
action.equals("redo")){
- WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
-
- //log.debug(actionObject);
- //log.debug(actionObject.size()-1);
-
//log.debug(actionObject.get(actionObject.size()-1));
+
+ if (action.equals("moveMap")) {
+ WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+
+ whiteboardObject.setX(Integer.valueOf(
+
actionObject.get(1).toString()).intValue());
+ whiteboardObject.setY(Integer.valueOf(
+
actionObject.get(2).toString()).intValue());
+
+ WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
+
whiteboardObject, whiteBoardId);
+ } else if (action.equals("draw") ||
action.equals("redo")) {
+ WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+
+ // log.debug(actionObject);
+ // log.debug(actionObject.size()-1);
+ //
log.debug(actionObject.get(actionObject.size()-1));
String objectType =
actionObject.get(0).toString();
- if (!objectType.equals("pointerWhiteBoard")){
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
- log.debug("objectOID: "+objectOID);
-
whiteboardObject.getRoomItems().put(objectOID, actionObject);
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
+ if (!objectType.equals("pointerWhiteBoard")) {
+ String objectOID = actionObject
+
.get(actionObject.size() - 1).toString();
+ log.debug("objectOID: " + objectOID);
+ whiteboardObject.getRoomItems()
+ .put(objectOID,
actionObject);
+
WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(
+
room_id, whiteboardObject, whiteBoardId);
}
} else if (action.equals("clear")) {
- WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
- whiteboardObject.setRoomItems(new
HashMap<String,List>());
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
+ WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+ whiteboardObject.setRoomItems(new HashMap<String,
List>());
+ WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
+
whiteboardObject, whiteBoardId);
} else if (action.equals("delete") ||
action.equals("undo")) {
- WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
+ WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+ String objectOID =
actionObject.get(actionObject.size() - 1)
+ .toString();
String objectType =
actionObject.get(0).toString();
- log.debug("removal of objectOID: "+objectOID);
-
- log.debug("removal of objectOID: "+objectOID);
-
-// "ellipse"
-// || this.baseactionobjectList[i][0] == "drawarrow"
-// || this.baseactionobjectList[i][0] == "line"
-// || this.baseactionobjectList[i][0] == "paint"
-// || this.baseactionobjectList[i][0] == "rectangle"
-// || this.baseactionobjectList[i][0] == "uline"
-// || this.baseactionobjectList[i][0] == "image"
-// || this.baseactionobjectList[i][0] == "letter"
-
- //Re-Index all items in its zIndex
- if (objectType.equals("ellipse")
+ log.debug("removal of objectOID: " + objectOID);
+
+ log.debug("removal of objectOID: " + objectOID);
+
+ // "ellipse"
+ // || this.baseactionobjectList[i][0] ==
"drawarrow"
+ // || this.baseactionobjectList[i][0] == "line"
+ // || this.baseactionobjectList[i][0] == "paint"
+ // || this.baseactionobjectList[i][0] ==
"rectangle"
+ // || this.baseactionobjectList[i][0] == "uline"
+ // || this.baseactionobjectList[i][0] == "image"
+ // || this.baseactionobjectList[i][0] ==
"letter"
+
+ // Re-Index all items in its zIndex
+ if (objectType.equals("ellipse")
||
objectType.equals("drawarrow")
|| objectType.equals("line")
|| objectType.equals("paint")
@@ -316,137 +394,192 @@
|| objectType.equals("swf")
||
objectType.equals("mindmapnode")
|| objectType.equals("flv")) {
-
- Integer zIndex =
Integer.valueOf(actionObject.get(actionObject.size()-8).toString()).intValue();
-
- log.debug("1|zIndex "+zIndex);
- log.debug("2|
zIndex "+actionObject.get(actionObject.size()-8).toString());
- log.debug("3|zIndex
"+actionObject.get(actionObject.size()-8));
-
+
+ Integer zIndex = Integer.valueOf(
+
actionObject.get(actionObject.size() - 8)
+
.toString()).intValue();
+
+ log.debug("1|zIndex " + zIndex);
+ log.debug("2|zIndex "
+ +
actionObject.get(actionObject.size() - 8)
+
.toString());
+ log.debug("3|zIndex "
+ +
actionObject.get(actionObject.size() - 8));
+
int l = 0;
- for (Iterator debugIter =
actionObject.iterator();debugIter.hasNext();) {
- log.debug("4|zIndex "+l+" --
"+debugIter.next());
+ for (Iterator debugIter =
actionObject.iterator(); debugIter
+ .hasNext();) {
+ log.debug("4|zIndex " + l + " --
" + debugIter.next());
l++;
}
-
- for (Iterator<String>
iter=whiteboardObject.getRoomItems().keySet().iterator();iter.hasNext();) {
+
+ for (Iterator<String> iter =
whiteboardObject
+
.getRoomItems().keySet().iterator(); iter.hasNext();) {
String whiteboardObjKey =
iter.next();
- List actionObjectStored =
whiteboardObject.getRoomItems().get(whiteboardObjKey);
-
- Integer zIndexStored =
Integer.valueOf(actionObjectStored.get(actionObjectStored.size()-8).toString()).intValue();
-
- log.debug("zIndexStored|zIndex
"+zIndexStored+"|"+zIndex);
-
+ List actionObjectStored =
whiteboardObject
+
.getRoomItems().get(whiteboardObjKey);
+
+ Integer zIndexStored =
Integer.valueOf(
+
actionObjectStored.get(
+
actionObjectStored.size() - 8)
+
.toString()).intValue();
+
+ log.debug("zIndexStored|zIndex " +
zIndexStored + "|"
+ + zIndex);
+
if (zIndexStored >= zIndex) {
- zIndexStored-=1;
- log.debug("new-zIndex
"+zIndexStored);
- }
-
actionObjectStored.set(actionObjectStored.size()-8, zIndexStored);
-
- whiteboardObject.getRoomItems().put(whiteboardObjKey,
actionObjectStored);
- }
-
- }
-
+ zIndexStored -= 1;
+ log.debug("new-zIndex "
+ zIndexStored);
+ }
+
actionObjectStored.set(actionObjectStored.size() - 8,
+ zIndexStored);
+
+
whiteboardObject.getRoomItems().put(whiteboardObjKey,
+
actionObjectStored);
+ }
+
+ }
+
whiteboardObject.getRoomItems().remove(objectOID);
-
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
- } 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 =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
- String objectOID =
actionObject.get(actionObject.size()-1).toString();
- //List roomItem = roomList.get(objectOID);
- List currentObject = (List)
whiteboardObject.getRoomItems().get(objectOID);
+
+ WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
+
whiteboardObject, whiteBoardId);
+ } 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 =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+ String objectOID =
actionObject.get(actionObject.size() - 1)
+ .toString();
+ // List roomItem = roomList.get(objectOID);
+ List currentObject =
whiteboardObject.getRoomItems().get(
+ objectOID);
whiteboardObject.getRoomItems().put(objectOID,
actionObject);
-
+
Map roomList = whiteboardObject.getRoomItems();
-
+
if (action.equals("swf")) {
-
- log.debug("actionObject "+actionObject);
-
+
+ log.debug("actionObject " +
actionObject);
+
if (actionObject.get(0).equals("swf")) {
-
- if (actionObject.get(8) != currentObject.get(8)) {
-
-
- String baseObjectName =
actionObject.get(actionObject.size()-1).toString();
- Integer slidesNumber =
Integer.valueOf(actionObject.get(8).toString()).intValue();
-
-
log.debug("updateObjectsToSlideNumber :: "+baseObjectName+","+slidesNumber);
-
- for (Iterator<String>
iter=roomList.keySet().iterator();iter.hasNext();) {
- String whiteboardObjKey
= iter.next();
- List actionObjectStored
= (List) roomList.get(whiteboardObjKey);
-
- if
(actionObjectStored.get(0).equals("ellipse")
- ||
actionObjectStored.get(0).equals("drawarrow")
- ||
actionObjectStored.get(0).equals("line")
- ||
actionObjectStored.get(0).equals("clipart")
- ||
actionObjectStored.get(0).equals("paint")
- ||
actionObjectStored.get(0).equals("rectangle")
- ||
actionObjectStored.get(0).equals("uline")
- ||
actionObjectStored.get(0).equals("image")
- ||
actionObjectStored.get(0).equals("letter")) {
-
- Map swfObj = (Map)
actionObjectStored.get(actionObjectStored.size()-7);
- log.debug("swfObj :1: "+swfObj);
-
- if (swfObj != null) {
-
- if
(swfObj.get("name").equals(baseObjectName)) {
-
- if
(Integer.valueOf(swfObj.get("slide").toString()).intValue() ==
slidesNumber) {
-
-
swfObj.put("isVisible",true);
-
-
actionObjectStored.set(actionObjectStored.size()-7,swfObj);
-
- } else {
-
-
swfObj.put("isVisible",false);
-
-
actionObjectStored.set(actionObjectStored.size()-7,swfObj);
-
- }
-
- }
-
- }
-
- log.debug("swfObj :1: "+swfObj);
-
- }
-
- }
-
- }
-
+
+ if (actionObject.get(8) !=
currentObject.get(8)) {
+
+ String baseObjectName =
actionObject.get(
+
actionObject.size() - 1).toString();
+ Integer slidesNumber =
Integer.valueOf(
+
actionObject.get(8).toString()).intValue();
+
+
log.debug("updateObjectsToSlideNumber :: "
+ + baseObjectName
+ "," + slidesNumber);
+
+ for (Iterator<String>
iter = roomList.keySet()
+
.iterator(); iter.hasNext();) {
+ String
whiteboardObjKey = iter.next();
+ List
actionObjectStored = (List) roomList
+
.get(whiteboardObjKey);
+
+ if
(actionObjectStored.get(0).equals("ellipse")
+
|| actionObjectStored.get(0).equals(
+
"drawarrow")
+
|| actionObjectStored.get(0).equals(
+
"line")
+
|| actionObjectStored.get(0).equals(
+
"clipart")
+
|| actionObjectStored.get(0).equals(
+
"paint")
+
|| actionObjectStored.get(0).equals(
+
"rectangle")
+
|| actionObjectStored.get(0).equals(
+
"uline")
+
|| actionObjectStored.get(0).equals(
+
"image")
+
|| actionObjectStored.get(0).equals(
+
"letter")) {
+
+ Map
swfObj = (Map) actionObjectStored
+
.get(actionObjectStored.size() - 7);
+
log.debug("swfObj :1: " + swfObj);
+
+ if
(swfObj != null) {
+
+ if
(swfObj.get("name").equals(
+
baseObjectName)) {
+
+
if (Integer.valueOf(
+
swfObj.get("slide")
+
.toString())
+
.intValue() == slidesNumber) {
+
+
swfObj.put("isVisible", true);
+
+
actionObjectStored.set(
+
actionObjectStored
+
.size() - 7,
+
swfObj);
+
+
} else {
+
+
swfObj.put("isVisible", false);
+
+
actionObjectStored.set(
+
actionObjectStored
+
.size() - 7,
+
swfObj);
+
+
}
+
+
}
+
+ }
+
+
log.debug("swfObj :1: " + swfObj);
+
+ }
+
+ }
+
+ }
+
}
}
-
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
+
+ WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
+
whiteboardObject, whiteBoardId);
} else if (action.equals("clearSlide")) {
-
- WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById.getInstance().getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
whiteBoardId);
-
+
+ WhiteboardObject whiteboardObject =
WhiteBoardObjectListManagerById
+ .getInstance()
+
.getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
+ whiteBoardId);
+
Map roomList = whiteboardObject.getRoomItems();
-
+
for (String objectName : (List<String>)
actionObject) {
-
+
roomList.remove(objectName);
-
- }
-
-
WhiteBoardObjectListManagerById.getInstance().setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
whiteboardObject, whiteBoardId);
+
+ }
+
+ WhiteBoardObjectListManagerById.getInstance()
+
.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
+
whiteboardObject, whiteBoardId);
} else {
- log.warn("Unkown Type: "+action+" actionObject:
"+actionObject);
- }
-
+ log.warn("Unkown Type: " + action + " actionObject:
"
+ + actionObject);
+ }
+
} catch (Exception err) {
- log.error("[addWhiteBoardObject]",err);
+ log.error("[addWhiteBoardObject]", err);
}
}
-
-}
+
+}
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardObject.java
Tue Apr 19 02:36:04 2011
+++
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardObject.java
Mon Aug 29 14:16:42 2011
@@ -2,7 +2,6 @@
import java.util.Date;
import java.util.HashMap;
-import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -12,52 +11,67 @@
private Integer x = 0;
private Integer y = 0;
private Integer zoom = 100;
- private Boolean fullFit = true;
- private Map<String,List> roomItems = new HashMap<String,List>();
+ private Boolean fullFit = true;
+ @SuppressWarnings("rawtypes")
+ private Map<String, List> roomItems = new HashMap<String, List>();
private Date created = new Date();
-
+
public Long getWhiteBoardId() {
return whiteBoardId;
}
+
public void setWhiteBoardId(Long whiteBoardId) {
this.whiteBoardId = whiteBoardId;
}
+
public Integer getX() {
return x;
}
+
public void setX(Integer x) {
this.x = x;
}
+
public Integer getY() {
return y;
}
+
public void setY(Integer y) {
this.y = y;
}
- public Map<String,List> getRoomItems() {
+
+ @SuppressWarnings("rawtypes")
+ public Map<String, List> getRoomItems() {
return roomItems;
}
- public void setRoomItems(Map<String,List> roomItems) {
+
+ @SuppressWarnings("rawtypes")
+ public void setRoomItems(Map<String, List> roomItems) {
this.roomItems = roomItems;
}
+
public Date getCreated() {
return created;
}
+
public void setCreated(Date created) {
this.created = created;
}
+
public Integer getZoom() {
- return zoom;
- }
+ return zoom;
+ }
+
public void setZoom(Integer zoom) {
- this.zoom = zoom;
- }
+ this.zoom = zoom;
+ }
+
public Boolean getFullFit() {
- return fullFit;
- }
+ return fullFit;
+ }
+
public void setFullFit(Boolean fullFit) {
- this.fullFit = fullFit;
+ this.fullFit = fullFit;
}
-
-}
+}
=======================================
---
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardSyncLockObject.java
Sat Jul 23 04:28:08 2011
+++
/branches/dev/injection/src/app/org/openmeetings/app/conference/whiteboard/WhiteboardSyncLockObject.java
Mon Aug 29 14:16:42 2011
@@ -2,14 +2,12 @@
import java.util.Date;
-import org.openmeetings.app.persistence.beans.recording.RoomClient;
-
public class WhiteboardSyncLockObject {
-
+
private String publicSID;
private boolean isInitialLoaded = false;
private boolean isCurrentLoadingItem = false;
-
+
private Date addtime;
private Date starttime;
=======================================
---
/branches/dev/injection/src/roomservice/org/openmeetings/axis/services/RoomReturn.java
Thu May 27 13:58:33 2010
+++
/branches/dev/injection/src/roomservice/org/openmeetings/axis/services/RoomReturn.java
Mon Aug 29 14:16:42 2011
@@ -1,45 +1,53 @@
package org.openmeetings.axis.services;
import java.util.Date;
-import java.util.List;
public class RoomReturn {
-
+
private Long room_id;
private String name;
private String creator;
private Date created;
private RoomUser[] roomUser;
-
+
public Long getRoom_id() {
return room_id;
}
+
public void setRoom_id(Long roomId) {
room_id = roomId;
}
+
public String getName() {
return name;
}
+
public void setName(String name) {
this.name = name;
}
+
public String getCreator() {
return creator;
}
+
public void setCreator(String creator) {
this.creator = creator;
}
+
public Date getCreated() {
return created;
}
+
public void setCreated(Date created) {
this.created = created;
}
+
public RoomUser[] getRoomUser() {
return roomUser;
}
+
public void setRoomUser(RoomUser[] roomUser) {
this.roomUser = roomUser;
}
-
-}
+
+}
--
You received this message because you are subscribed to the Google Groups
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/openmeetings-dev?hl=en.