whiteboardObj.put(i, obj);
i++;
}
// Check if this User is the Mod:
IConnection current = Red5.getConnectionLocal();
Client currentClient = this.sessionManager
.getClientByStreamId(current.getClient().getId(), null);
if (currentClient == null) {
return;
}
Long room_id = currentClient.getRoom_id();
// log.debug("***** sendVars: " + whiteboardObj);
// Store event in list
String action = whiteboardObj.get(2).toString();
if (action.equals("deleteMindMapNodes")) {
// Simulate Single Delete Events for z-Index
List actionObject = (List) whiteboardObj.get(3);
List<List> itemObjects = (List) actionObject.get(3);
Map whiteboardTempObj = new HashMap();
whiteboardTempObj.put(2, "delete");
for (List itemObject : itemObjects) {
List<Object> tempActionObject = new LinkedList<Object>();
tempActionObject.add("mindmapnode");
tempActionObject.add(itemObject.get(0)); // z-Index -8
tempActionObject.add(null); // simulate -7
tempActionObject.add(null); // simulate -6
tempActionObject.add(null); // simulate -5
tempActionObject.add(null); // simulate -4
tempActionObject.add(null); // simulate -3
tempActionObject.add(null); // simulate -2
tempActionObject.add(itemObject.get(1)); // Object-Name -1
whiteboardTempObj.put(3, tempActionObject);
whiteboardManagement.addWhiteBoardObjectById(
room_id, whiteboardTempObj, whiteboardId);
}
} else {
whiteboardManagement.addWhiteBoardObjectById(
room_id, whiteboardObj, whiteboardId);
}
Map<String, Object> sendObject = new HashMap<String, Object>();
sendObject.put("id", whiteboardId);
sendObject.put("param", whiteboardObjParam);
boolean showDrawStatus = getWhiteboardDrawStatus();
// Notify all Clients of that Scope (Room)
for (Set<IConnection> conset : current.getScope().getConnections()) {
for (IConnection conn : conset) {
if (conn != null) {
if (conn instanceof IServiceCapableConnection) {
IClient client = conn.getClient();
if (SessionVariablesUtil.isScreenClient(client)) {
// screen sharing clients do not receive events
continue;
} else if (SessionVariablesUtil.isAVClient(client)) {
// AVClients or potential AVClients do not receive events
continue;
} if (client.getId().equals(
current.getClient().getId())) {
// don't send back to same user
continue;
}
((IServiceCapableConnection) conn).invoke(
"sendVarsToWhiteboardById",