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

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


      log.error("Executing asterisk originate error: ", e);
    }
  }

    public synchronized String getSipNumber(Long room_id) {
        Room r = roomDao.get(room_id);
        if(r != null && r.getConfno() != null) {
            log.debug("getSipNumber: room_id: {}, sipNumber: {}", new Object[]{room_id, r.getConfno()});
            return r.getConfno();
        }
        return null;
    }
View Full Code Here


        a.setStart(start);
        a.setEnd(end);
        a.setCategory(appointmentCategoryDao.get(1L));
        a.setOwner(from);
        if (bookedRoom) {
          a.setRoom(new Room());
          a.getRoom().setAppointment(true);
          a.getRoom().setName(subject);
          a.getRoom().setRoomtype(roomTypeDao.get(roomtype_id));
          a.getRoom().setNumberOfPartizipants(100L);
          a.getRoom().setAllowUserQuestions(true);
          a.getRoom().setAllowFontStyles(true);
        }
        for (String email : recipients) {
          MeetingMember mm = new MeetingMember();
          mm.setAppointment(a);
          mm.setUser(userDao.getContact(email, users_id));
          a.getMeetingMembers().add(mm);
        }
        a = appointmentDao.update(a, users_id);
        for (MeetingMember mm : a.getMeetingMembers()) {
          User to = mm.getUser();
          Room room = a.getRoom();
         
          //TODO should be reviewed
          if (!to.getUser_id().equals(from.getUser_id())) {
            // One message to the Send
            privateMessagesDao.addPrivateMessage(subject,
View Full Code Here

      log.debug("room_id: " + room_id);
     
      if (room_id == null) {
        return 1; //TODO weird
      }
      Room room = roomDao.get(room_id);
      @SuppressWarnings("rawtypes")
      ArrayList messageMap = (ArrayList) newMessage;
      // adding delimiter space, cause otherwise an emoticon in the last
      // string would not be found
      String messageText = messageMap.get(4) + " ";
      LinkedList<String[]> parsedStringObjects = ChatString.parseChatString(messageText, emoticonsManager.getEmotfilesList(), room.getAllowFontStyles());
      // log.error("parsedStringObjects"+parsedStringObjects.size());
      log.debug("size:" + messageMap.size());
      messageMap.add(parsedStringObjects);
      newMessage = messageMap;     
View Full Code Here

  public int sendMessageWithClientByPublicSID(Object newMessage, String publicSID) {
    try {
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager.getClientByStreamId(current.getClient().getId(), null);
      Long room_id = currentClient.getRoom_id();
      Room room = roomDao.get(room_id);
      log.debug("room_id: " + room_id);

      @SuppressWarnings("rawtypes")
      ArrayList messageMap = (ArrayList) newMessage;
      // adding delimiter space, cause otherwise an emoticon in the last
      // string would not be found
      String messageText = messageMap.get(4).toString() + " ";
      // add server time
      messageMap.set(1, parseDateAsTimeString());
      LinkedList<String[]> parsedStringObjects = ChatString.parseChatString(messageText, emoticonsManager.getEmotfilesList(), room.getAllowFontStyles());
      // log.error("parsedStringObjects"+parsedStringObjects.size());
      log.debug("size:" + messageMap.size());
      messageMap.add(parsedStringObjects);
      newMessage = messageMap;
View Full Code Here

    roomTypeDao.addRoomType("custom", -2, true);
    log.debug("RoomTypes ADDED");
  }

  private Room createRoom(String name, long typeId, long capacity, boolean isPublic, Long orgId) {
    Room r = new Room();
    r.setName(name);
    r.setComment("");
    r.setStarttime(new Date());
    r.setNumberOfPartizipants(capacity);
    r.setRoomtype(roomTypeDao.get(typeId));
    r.setIspublic(isPublic);
    r.setAllowUserQuestions(true);
    r.setIsAudioOnly(false);
    r.setAllowFontStyles(true);

    r.setAppointment(false);

    r.setIsDemoRoom(false);
    r.setDemoTime(null);

    r.setIsModeratedRoom(false);
    r.setHideTopBar(false);

    r.setDeleted(false);

    r.setIsClosed(false);
    r.setRedirectURL(null);

    r.setOwnerId(null);

    r.setWaitForRecording(false);
    r.setAllowRecording(true);
   
    r.setHideChat(false);
    r.setHideActivitiesAndActions(false);
    r.setHideActionsMenu(false);
    r.setHideFilesExplorer(false);
    r.setHideScreenSharing(false)
    r.setHideWhiteboard(false);
    if (orgId != null) {
      RoomOrganisation ro = new RoomOrganisation();
      ro.setRoom(r);
      ro.setOrganisation(organisationDao.get(orgId));
      ro.setStarttime(new Date());
View Full Code Here

      long restricted_Id = 3;
      long interview_Id = 4;

      createRoom("public Interview Room", interview_Id, 16L, true, null);
      createRoom("public Conference Room", conference_Id, 32L, true, null);
      Room r = createRoom("public Video Only Room", conference_Id, 32L, true, null);
      r.setHideWhiteboard(true);
      roomDao.update(r, null);
      createRoom("public Video And Whiteboard Room", conference_Id, 32L, true, null);
      createRoom("public Restricted Room", restricted_Id, 100L, true, null);
      r = createRoom("restricted room with micro option set", restricted_Id, 100L, true, null);
      r.setShowMicrophoneStatus(true);
      roomDao.update(r, null);

      r = createRoom("conference room with micro option set", conference_Id, 32L, true, null);
      r.setShowMicrophoneStatus(true);
      roomDao.update(r, null);

      createRoom("private Conference Room", conference_Id, 32L, false, 1L);
    }
  }
View Full Code Here

      if (currentModList.size() > 0) {
        return 2L;
      } else {
        // No moderator in this room at the moment
        Room room = roomDao.get(currentClient.getRoom_id());

        return room.getIsModeratedRoom() ? 3L : 1L;
      }

    } catch (Exception err) {
      log.error("[applyForModeration]", err);
    }
View Full Code Here

   */
  public synchronized Boolean checkRoomValues(Long room_id) {
    try {

      // appointed meeting or moderated Room?
      Room room = roomDao.get(room_id);

      // not really - default logic
      if (room.getAppointment() == null || room.getAppointment() == false) {

        if (room.getIsModeratedRoom()) {

          // if this is a Moderated Room then the Room can be only
          // locked off by the Moderator Bit
          List<Client> clientModeratorListRoom = this.sessionManager
              .getCurrentModeratorByRoom(room_id);
View Full Code Here

      // This can be set without checking for Moderation Flag
      currentClient.setIsSuperModerator(isSuperModerator);

      sessionManager.updateClientByStreamId(streamid, currentClient, true, null);

            Room room = roomDao.get(room_id);
            if (room.getShowMicrophoneStatus()) {
              currentClient.setCanGiveAudio(true);
            }

      // Log the User
      conferenceLogDao.addConferenceLog("roomEnter",
          currentClient.getUser_id(), streamid, room_id,
          currentClient.getUserip(), "",
          currentClient.getExternalUserId(),
          currentClient.getExternalUserType(),
          currentClient.getMail(), currentClient.getFirstname(),
          currentClient.getLastname());
     
      // Check for Moderation LogicalRoom ENTER
      List<Client> clientListRoom = sessionManager.getClientListByRoom(room_id);

      // appointed meeting or moderated Room? => Check Max Users first
      if (room.getNumberOfPartizipants() != null && clientListRoom.size() > room.getNumberOfPartizipants()) {
        roomStatus.setRoomFull(true);
        return roomStatus;
      }

      // default logic for non regular rooms
      if (room.getAppointment() == null || room.getAppointment() == false) {
        if (room.getIsModeratedRoom()) {
          // if this is a Moderated Room then the Room can be only
          // locked off by the Moderator Bit
          // List<RoomClient> clientModeratorListRoom =
          // this.sessionManager.getCurrentModeratorByRoom(room_id);
View Full Code Here

   */
  // --------------------------------------------------------------------------------------------
  public Appointment getAppointmentByRoom(Long room_id) throws Exception {
    log.debug("getAppointmentByRoom");

    Room room = roomDao.get(room_id);

    if (room == null) {
      throw new Exception("Room does not exist in database!");
    }

    if (!room.getAppointment()) {
      throw new Exception("Room " + room.getName() + " isnt part of an appointed meeting");
    }

    return appointmentDao.getAppointmentByRoom(room_id);
  }
View Full Code Here

TOP

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

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.