Examples of WhiteboardObject


Examples of org.apache.openmeetings.data.whiteboard.dto.WhiteboardObject

        Long whiteBoardId = this.whiteBoardObjectListManagerById
            .getNewWhiteboardId(room_id);

        this.whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                new WhiteboardObject(), whiteBoardId);

        log.debug("Init New Room List");

        whiteboardObjectList = this.whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomId(room_id);
View Full Code Here

Examples of org.apache.openmeetings.data.whiteboard.dto.WhiteboardObject

 
  private Long whiteboardId = 0L;
 
  public Long getNewWhiteboardId(Long room_id) throws Exception {
    whiteboardId++;
    this.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id, new WhiteboardObject(), whiteboardId);
    return whiteboardId;
  }
View Full Code Here

Examples of org.apache.openmeetings.data.whiteboard.dto.WhiteboardObject

  public synchronized WhiteboardObject getWhiteBoardObjectListByRoomIdAndWhiteboard(Long room_id, Long whiteBoardId){
    WhiteboardObjectList whiteboardObjectList = whiteBoardObjectList.get(room_id);
    if (whiteboardObjectList == null) {
      whiteboardObjectList = new WhiteboardObjectList();
    }
    WhiteboardObject whiteboardObjects = whiteboardObjectList.getWhiteboardObjects().get(whiteBoardId);
    if (whiteboardObjects == null) {
      whiteboardObjects = new WhiteboardObject();
    }
    return whiteboardObjects;
  }
View Full Code Here

Examples of org.apache.openmeetings.data.whiteboard.dto.WhiteboardObject

      log.debug("actionObject: " + whiteboardObj.get(3));

      List actionObject = (List) whiteboardObj.get(3);

      if (action.equals("moveMap")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        whiteboardObject.setX(Integer.valueOf(
            actionObject.get(1).toString()).intValue());
        whiteboardObject.setY(Integer.valueOf(
            actionObject.get(2).toString()).intValue());

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("draw") || action.equals("redo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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
              .setWhiteBoardObjectListRoomObjAndWhiteboardId(
                  room_id, whiteboardObject, whiteBoardId);
        }
      } else if (action.equals("clear")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        whiteboardObject.setRoomItems(new HashMap<String, List>());
        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("delete") || action.equals("undo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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")
            || objectType.equals("drawarrow")
            || objectType.equals("line")
            || objectType.equals("paint")
            || objectType.equals("rectangle")
            || objectType.equals("uline")
            || objectType.equals("image")
            || objectType.equals("letter")
            || objectType.equals("clipart")
            || 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));

          int l = 0;
          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();) {
            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);

            if (zIndexStored >= zIndex) {
              zIndexStored -= 1;
              log.debug("new-zIndex " + zIndexStored);
            }
            actionObjectStored.set(actionObjectStored.size() - 8,
                zIndexStored);

            whiteboardObject.getRoomItems().put(whiteboardObjKey,
                actionObjectStored);
          }

        }

        whiteboardObject.getRoomItems().remove(objectOID);

        whiteBoardObjectListManagerById
            .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
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        String objectOID = actionObject.get(actionObject.size() - 1)
            .toString();
        // List roomItem = roomList.get(objectOID);
        List currentObject = whiteboardObject.getRoomItems().get(
            objectOID);
        if (actionObject.get(0).equals("paint")) {
          actionObject.set(1, currentObject.get(1));
        }
        whiteboardObject.getRoomItems().put(objectOID, actionObject);

        Map roomList = whiteboardObject.getRoomItems();

        if (action.equals("swf")) {

          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);

                }

              }

            }

          }
        }

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("clearSlide")) {

        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        Map roomList = whiteboardObject.getRoomItems();

        for (String objectName : (List<String>) actionObject) {

          roomList.remove(objectName);
View Full Code Here

Examples of org.apache.openmeetings.data.whiteboard.dto.WhiteboardObject

      log.debug("actionObject: " + whiteboardObj.get(3));

      List actionObject = (List) whiteboardObj.get(3);

      if (action.equals("moveMap")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        whiteboardObject.setX(Integer.valueOf(
            actionObject.get(1).toString()).intValue());
        whiteboardObject.setY(Integer.valueOf(
            actionObject.get(2).toString()).intValue());

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("draw") || action.equals("redo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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
              .setWhiteBoardObjectListRoomObjAndWhiteboardId(
                  room_id, whiteboardObject, whiteBoardId);
        }
      } else if (action.equals("clear")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        whiteboardObject.setRoomItems(new HashMap<String, List>());
        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("delete") || action.equals("undo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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")
            || objectType.equals("drawarrow")
            || objectType.equals("line")
            || objectType.equals("paint")
            || objectType.equals("rectangle")
            || objectType.equals("uline")
            || objectType.equals("image")
            || objectType.equals("letter")
            || objectType.equals("clipart")
            || 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));

          int l = 0;
          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();) {
            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);

            if (zIndexStored >= zIndex) {
              zIndexStored -= 1;
              log.debug("new-zIndex " + zIndexStored);
            }
            actionObjectStored.set(actionObjectStored.size() - 8,
                zIndexStored);

            whiteboardObject.getRoomItems().put(whiteboardObjKey,
                actionObjectStored);
          }

        }

        whiteboardObject.getRoomItems().remove(objectOID);

        whiteBoardObjectListManagerById
            .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
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        String objectOID = actionObject.get(actionObject.size() - 1)
            .toString();
        // List roomItem = roomList.get(objectOID);
        List currentObject = whiteboardObject.getRoomItems().get(
            objectOID);
        if (actionObject.get(0).equals("paint")) {
          actionObject.set(1, currentObject.get(1));
        }
        whiteboardObject.getRoomItems().put(objectOID, actionObject);

        Map roomList = whiteboardObject.getRoomItems();

        if (action.equals("swf")) {

          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);

                }

              }

            }

          }
        }

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("clearSlide")) {

        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        Map roomList = whiteboardObject.getRoomItems();

        for (String objectName : (List<String>) actionObject) {

          roomList.remove(objectName);

        }

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("whiteboardObj")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        whiteboardObject.setFullFit((Boolean) actionObject.get(1));
        whiteboardObject.setZoom((Integer) actionObject.get(2));

        whiteBoardObjectListManagerById
        .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
            whiteboardObject, whiteBoardId);
      } else {
View Full Code Here

Examples of org.apache.openmeetings.db.dto.room.WhiteboardObject

        Long whiteBoardId = this.whiteBoardObjectListManagerById
            .getNewWhiteboardId(room_id);

        this.whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                new WhiteboardObject(), whiteBoardId);

        log.debug("Init New Room List");

        whiteboardObjectList = this.whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomId(room_id);
View Full Code Here

Examples of org.apache.openmeetings.db.dto.room.WhiteboardObject

      log.debug("actionObject: " + whiteboardObj.get(3));

      List actionObject = (List) whiteboardObj.get(3);

      if (action.equals("moveMap")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        whiteboardObject.setX(Integer.valueOf(
            actionObject.get(1).toString()).intValue());
        whiteboardObject.setY(Integer.valueOf(
            actionObject.get(2).toString()).intValue());

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("draw") || action.equals("redo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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
              .setWhiteBoardObjectListRoomObjAndWhiteboardId(
                  room_id, whiteboardObject, whiteBoardId);
        }
      } else if (action.equals("clear")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        whiteboardObject.setRoomItems(new HashMap<String, List>());
        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("delete") || action.equals("undo")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .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")
            || objectType.equals("drawarrow")
            || objectType.equals("line")
            || objectType.equals("paint")
            || objectType.equals("rectangle")
            || objectType.equals("uline")
            || objectType.equals("image")
            || objectType.equals("letter")
            || objectType.equals("clipart")
            || 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));

          int l = 0;
          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();) {
            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);

            if (zIndexStored >= zIndex) {
              zIndexStored -= 1;
              log.debug("new-zIndex " + zIndexStored);
            }
            actionObjectStored.set(actionObjectStored.size() - 8,
                zIndexStored);

            whiteboardObject.getRoomItems().put(whiteboardObjKey,
                actionObjectStored);
          }

        }

        whiteboardObject.getRoomItems().remove(objectOID);

        whiteBoardObjectListManagerById
            .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
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);
        String objectOID = actionObject.get(actionObject.size() - 1)
            .toString();
        // List roomItem = roomList.get(objectOID);
        List currentObject = whiteboardObject.getRoomItems().get(
            objectOID);
        if (actionObject.get(0).equals("paint")) {
          actionObject.set(1, currentObject.get(1));
        }
        whiteboardObject.getRoomItems().put(objectOID, actionObject);

        Map roomList = whiteboardObject.getRoomItems();

        if (action.equals("swf")) {

          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);

                }

              }

            }

          }
        }

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("clearSlide")) {

        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        Map roomList = whiteboardObject.getRoomItems();

        for (String objectName : (List<String>) actionObject) {

          roomList.remove(objectName);

        }

        whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                whiteboardObject, whiteBoardId);
      } else if (action.equals("whiteboardObj")) {
        WhiteboardObject whiteboardObject = whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomIdAndWhiteboard(room_id,
                whiteBoardId);

        whiteboardObject.setFullFit((Boolean) actionObject.get(1));
        whiteboardObject.setZoom((Integer) actionObject.get(2));

        whiteBoardObjectListManagerById
        .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
            whiteboardObject, whiteBoardId);
      } else {
View Full Code Here

Examples of org.apache.openmeetings.db.dto.room.WhiteboardObject

 
  private Long whiteboardId = 0L;
 
  public Long getNewWhiteboardId(Long room_id) throws Exception {
    whiteboardId++;
    this.setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id, new WhiteboardObject(), whiteboardId);
    return whiteboardId;
  }
View Full Code Here

Examples of org.apache.openmeetings.db.dto.room.WhiteboardObject

  public synchronized WhiteboardObject getWhiteBoardObjectListByRoomIdAndWhiteboard(Long room_id, Long whiteBoardId){
    WhiteboardObjectList whiteboardObjectList = whiteBoardObjectList.get(room_id);
    if (whiteboardObjectList == null) {
      whiteboardObjectList = new WhiteboardObjectList();
    }
    WhiteboardObject whiteboardObjects = whiteboardObjectList.getWhiteboardObjects().get(whiteBoardId);
    if (whiteboardObjects == null) {
      whiteboardObjects = new WhiteboardObject();
    }
    return whiteboardObjects;
  }
View Full Code Here

Examples of org.apache.openmeetings.db.dto.room.WhiteboardObject

        Long whiteBoardId = this.whiteBoardObjectListManagerById
            .getNewWhiteboardId(room_id);

        this.whiteBoardObjectListManagerById
            .setWhiteBoardObjectListRoomObjAndWhiteboardId(room_id,
                new WhiteboardObject(), whiteBoardId);

        log.debug("Init New Room List");

        whiteboardObjectList = this.whiteBoardObjectListManagerById
            .getWhiteBoardObjectListByRoomId(room_id);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.