Package org.apache.openmeetings.persistence.beans.room

Examples of org.apache.openmeetings.persistence.beans.room.Room


      List<Map<String, Object>> roomModerators, Boolean allowUserQuestions) {
    try {
      log.debug("*** updateRoom numberOfPartizipants: "
          + numberOfPartizipants);
      if (authLevelUtil.checkModLevel(user_level)) {
        Room r = roomDao.get(rooms_id);
        r.setComment(comment);

        r.setIspublic(ispublic);
        r.setNumberOfPartizipants(numberOfPartizipants);
        r.setName(name);
        r.setRoomtype(this.getRoomTypesById(roomtypes_id));
        r.setUpdatetime(new Date());
        r.setAllowUserQuestions(allowUserQuestions);

        r.setIsDemoRoom(isDemoRoom);
        r.setDemoTime(demoTime);

        r.setAppointment(appointment);

        r.setIsModeratedRoom(isModeratedRoom);

        if (r.getRooms_id() == null) {
          em.persist(r);
        } else {
          if (!em.contains(r)) {
            em.merge(r);
          }
        }

        // FIXME: Organizations will not be changed when you do an
        // update as Moderator

        if (roomModerators != null) {
          roomModeratorsDao.updateRoomModeratorByUserList(
              roomModerators, r.getRooms_id());
        }

        return r.getRooms_id();
      }
    } catch (Exception ex2) {
      log.error("[updateRoom] ", ex2);
    }
    return null;
View Full Code Here


  // --------------------------------------------------------------------------------------------

  public void closeRoom(Long rooms_id, Boolean status) {
    try {

      Room room = roomDao.get(rooms_id);

      room.setIsClosed(status);

      roomDao.update(room, -1L);

    } catch (Exception e) {
      log.error("Error updateRoomObject : ", e);
View Full Code Here

      if (roomtypesId == null || roomtypesId == 0) {
        return null;
      }
      log.debug("getRoomByOwnerAndTypeId : " + ownerId + " || "
          + roomtypesId);
      Room room = null;
      TypedQuery<Room> query = em.createNamedQuery("getRoomByOwnerAndTypeId", Room.class);
      query.setParameter("ownerId", ownerId);
      query.setParameter("roomtypesId", roomtypesId);
      query.setParameter("deleted", true);
      List<Room> ll = query.getResultList();
View Full Code Here

     
      if (room_id == null) {
        return 1; //TODO weird
      }
      Long user_level = userManager.getUserLevelByID(currentClient.getUser_id());
      Room room = roomManager.getRoomById(user_level, 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

    try {
      IConnection current = Red5.getConnectionLocal();
      Client currentClient = this.sessionManager.getClientByStreamId(current.getClient().getId(), null);
      Long room_id = currentClient.getRoom_id();
      Long user_level = userManager.getUserLevelByID(currentClient.getUser_id());
      Room room = roomManager.getRoomById(user_level, 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

      if (authLevelUtil.checkUserLevel(user_level)) {

        log.debug("updateAppointment");

        Appointment app = appointmentLogic.getAppointMentById(appointmentId);
        Room room = app.getRoom();
        if (roomId > 0) {
          if ( room.getRooms_id() != roomId) {
            app.setRoom(roomDao.get(roomId));
            appointmentDao.updateAppointment(app);
            boolean isAppRoom = room.getAppointment();
            if (isAppRoom) {
              roomDao.delete(room, users_id);
            }
          }
        } else {
          RoomType rt = roomManager.getRoomTypesById(roomType);
 
          if (room != null) {
 
            room.setComment(appointmentDescription);
            room.setName(appointmentName);
            room.setRoomtype(rt);
 
            roomDao.update(room, users_id);
          }
        }
        User user = userManager.getUserById(users_id);
View Full Code Here

      // Filter : no appointed meetings
      List<Room> filtered = new ArrayList<Room>();

      for (Iterator<Room> iter = roomList.iterator(); iter.hasNext();) {
        Room rooms = iter.next();

        if (!rooms.getAppointment()) {
          rooms.setCurrentusers(this.getRoomClientsListByRoomId(rooms
              .getRooms_id()));
          filtered.add(rooms);
        }
      }
View Full Code Here

   * @return - Appointment in case the room is appointment, null otherwise
   */
  public Appointment getAppointMentDataForRoom(Long room_id) {
    log.debug("getAppointMentDataForRoom");

    Room room = roomDao.get(room_id);

    if (room.getAppointment() == false)
      return null;

    try {
      Appointment ment = appointmentLogic.getAppointmentByRoom(room_id);

View Full Code Here

      log.debug("getCurrentRoomClient -2- " + streamid);
 
      Client currentClient = this.sessionManager
          .getClientByStreamId(streamid, null);
 
      Room room = roomDao.get(room_id);
 
      if (room.getAppointment() == false) {
        throw new IllegalStateException("Room has no appointment");
      }
   
      Appointment appointment = appointmentLogic
          .getAppointmentByRoom(room_id);
View Full Code Here

      if (points != null) {
        for (int i = 0; i < points.size(); i++) {
          Appointment ment = points.get(i);

          Long rooms_id = ment.getRoom().getRooms_id();
          Room rooom = roomDao.get(rooms_id);

          if (!rooom.getRoomtype().getRoomtypes_id()
              .equals(room_types_id))
            continue;

          rooom.setCurrentusers(getRoomClientsListByRoomId(rooom
              .getRooms_id()));
          result.add(rooom);
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.openmeetings.persistence.beans.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.