Package org.apache.openmeetings.db.entity.room

Examples of org.apache.openmeetings.db.entity.room.Client


  public Boolean setCanShare(String SID, String publicSID, boolean canShare) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkUserLevel(user_level)) {

        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanShare(canShare);
            this.sessionManager.updateClientByStreamId(
                rcl.getStreamid(), rcl, false, null);

            HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
            newMessage.put(0, "updateDrawStatus");
            newMessage.put(1, rcl);
            this.scopeApplicationAdapter
View Full Code Here


  public Boolean setCanRemote(String SID, String publicSID, boolean canRemote) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkUserLevel(user_level)) {

        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanRemote(canRemote);
            this.sessionManager.updateClientByStreamId(
                rcl.getStreamid(), rcl, false, null);

            HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
            newMessage.put(0, "updateDrawStatus");
            newMessage.put(1, rcl);
            this.scopeApplicationAdapter
View Full Code Here

   */
  public synchronized Long addModerator(String publicSID) {
    try {
      log.debug("-----------  addModerator: " + publicSID);

      Client currentClient = this.sessionManager
          .getClientByPublicSID(publicSID, false, null);

      if (currentClient == null) {
        return -1L;
      }
      Long room_id = currentClient.getRoom_id();

      currentClient.setIsMod(true);
      // Put the mod-flag to true for this client
      this.sessionManager.updateClientByStreamId(
          currentClient.getStreamid(), currentClient, false, null);

      List<Client> currentMods = this.sessionManager
          .getCurrentModeratorByRoom(room_id);
     
      //Send message to all users
View Full Code Here

    public Boolean setCanGiveAudio(String SID, String publicSID, boolean canGiveAudio) {
    try {
            log.debug("[setCanGiveAudio] " + SID + ", " + publicSID + ", " + canGiveAudio);
      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      Long users_id = sessiondataDao.checkSession(SID);
      Long user_level = userManager.getUserLevelByID(users_id);

      if (AuthLevelUtil.checkUserLevel(user_level)) {
        if (currentClient.getIsMod()) {
          Client rcl = this.sessionManager
              .getClientByPublicSID(publicSID, false, null);

          if (rcl != null) {
            rcl.setCanGiveAudio(canGiveAudio);
                this.sessionManager.updateClientByStreamId(
                        rcl.getStreamid(), rcl, false, null);

                HashMap<Integer, Object> newMessage = new HashMap<Integer, Object>();
                newMessage.put(0, "updateGiveAudioStatus");
                newMessage.put(1, rcl);
                this.scopeApplicationAdapter
View Full Code Here

  public WhiteboardSyncLockObject startNewSyncprocess() {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
      Long room_id = currentClient.getRoom_id();

      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setInitialLoaded(true);

      Map<String, WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager
          .getWhiteBoardSyncListByRoomid(room_id);

      wSyncLockObject.setCurrentLoadingItem(true);
      wSyncLockObject.setStarttime(new Date());

      syncListRoom.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(
          room_id, syncListRoom);
     
      //Sync to clients
      this.scopeApplicationAdapter.syncMessageToCurrentScope("sendSyncFlag", wSyncLockObject, true);
View Full Code Here

  public void setNewCursorPosition(Object item) {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);

      @SuppressWarnings("rawtypes")
      Map cursor = (Map) item;
      cursor.put("streamPublishName",
          currentClient.getStreamPublishName());

      // Notify all users of the same Scope
      for (Set<IConnection> conset : current.getScope().getConnections()) {
      for (IConnection conn : conset) {
        if (conn != null) {
View Full Code Here

  public void sendCompletedSyncEvent() {
    try {

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
      Long room_id = currentClient.getRoom_id();

      Map<String, WhiteboardSyncLockObject> syncListRoom = this.whiteBoardObjectListManager
          .getWhiteBoardSyncListByRoomid(room_id);

      WhiteboardSyncLockObject wSyncLockObject = syncListRoom
          .get(currentClient.getPublicSID());

      if (wSyncLockObject == null) {
        log.error("WhiteboardSyncLockObject not found for this Client "
            + syncListRoom);
        return;
      } else if (!wSyncLockObject.isCurrentLoadingItem()) {
        log.warn("WhiteboardSyncLockObject was not started yet "
            + syncListRoom);
        return;
      } else {
        syncListRoom.remove(currentClient.getPublicSID());
        this.whiteBoardObjectListManager.setWhiteBoardSyncListByRoomid(
            room_id, syncListRoom);

        int numberOfInitial = this
            .getNumberOfInitialLoaders(syncListRoom);
View Full Code Here

      log.debug("-----------  removeModerator: " + publicSID);

      IConnection current = Red5.getConnectionLocal();
      // String streamid = current.getClient().getId();

      Client currentClient = this.sessionManager
          .getClientByPublicSID(publicSID, false, null);

      if (currentClient == null) {
        return -1L;
      }
      Long room_id = currentClient.getRoom_id();

      currentClient.setIsMod(false);
      // Put the mod-flag to true for this client
      this.sessionManager.updateClientByStreamId(
          currentClient.getStreamid(), currentClient, false, null);

      List<Client> currentMods = this.sessionManager
          .getCurrentModeratorByRoom(room_id);

      // Notify all clients of the same scope (room)
View Full Code Here

      log.debug("startNewObjectSyncprocess: " + object_id);

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
      Long room_id = currentClient.getRoom_id();

      WhiteboardSyncLockObject wSyncLockObject = new WhiteboardSyncLockObject();
      wSyncLockObject.setAddtime(new Date());
      wSyncLockObject.setPublicSID(currentClient.getPublicSID());
      wSyncLockObject.setStarttime(new Date());

      Map<String, WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager
          .getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,
              object_id);
      syncListImage.put(currentClient.getPublicSID(), wSyncLockObject);
      this.whiteBoardObjectListManager
          .setWhiteBoardImagesSyncListByRoomAndObjectId(room_id,
              object_id, syncListImage);

      // Do only send the Token to show the Loading Splash for the
View Full Code Here

      log.debug("sendCompletedObjectSyncEvent: " + object_id);

      IConnection current = Red5.getConnectionLocal();
      String streamid = current.getClient().getId();
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
      Long room_id = currentClient.getRoom_id();

      Map<String, WhiteboardSyncLockObject> syncListImage = this.whiteBoardObjectListManager
          .getWhiteBoardObjectSyncListByRoomAndObjectId(room_id,
              object_id);

      log.debug("sendCompletedObjectSyncEvent syncListImage: "
          + syncListImage);

      WhiteboardSyncLockObject wSyncLockObject = syncListImage
          .get(currentClient.getPublicSID());

      if (wSyncLockObject == null) {
        log.error("WhiteboardSyncLockObject not found for this Client "
            + currentClient.getPublicSID());
        log.error("WhiteboardSyncLockObject not found for this syncListImage "
            + syncListImage);
        return -2;

      } else {

        log.debug("sendCompletedImagesSyncEvent remove: "
            + currentClient.getPublicSID());

        syncListImage.remove(currentClient.getPublicSID());
        this.whiteBoardObjectListManager
            .setWhiteBoardImagesSyncListByRoomAndObjectId(room_id,
                object_id, syncListImage);

        int numberOfInitial = this.whiteBoardObjectListManager
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.db.entity.room.Client

Copyright © 2018 www.massapicom. 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.