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

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


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

        if (room.getIsModeratedRoom()) {
          return 3L;
        } else {
          return 1L;
        }
      }
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

      currentClient.setIsSuperModerator(isSuperModerator);

      this.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

      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, baseURL, 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

    add(new ListView<Room>("list", rooms) {
      private static final long serialVersionUID = 9189085478336224890L;

      @Override
      protected void populateItem(ListItem<Room> item) {
        final Room r = item.getModelObject();
        WebMarkupContainer roomContainer;
        item.add((roomContainer = new WebMarkupContainer("roomContainer")).add(new AjaxEventBehavior("onclick"){
          private static final long serialVersionUID = 1L;
         
          @Override
          protected void onEvent(AjaxRequestTarget target) {
            roomId = r.getRooms_id();
            updateRoomDetails(target);
          }
        }));
        roomContainer.add(new Label("roomName", r.getName()));
        final IModel<Integer> curUsersModel = new Model<Integer>(Application.getBean(ISessionManager.class).getClientListByRoom(r.getRooms_id()).size());
        final Label curUsers = new Label("curUsers", curUsersModel);
        roomContainer.add(curUsers.setOutputMarkupId(true));
        roomContainer.add(new Label("totalUsers", r.getNumberOfPartizipants()));
        item.add(new Button("enter").add(new RoomEnterBehavior(r.getRooms_id())));
        roomContainer.add(new AjaxLink<Void>("refresh") {
          private static final long serialVersionUID = -3426813755917489787L;

          @Override
          public void onClick(AjaxRequestTarget target) {
            roomId = r.getRooms_id();
            curUsersModel.setObject(Application.getBean(ISessionManager.class).getClientListByRoom(r.getRooms_id()).size());
            target.add(curUsers);
            updateRoomDetails(target);
          }
        });
      }
View Full Code Here

  }

  void updateRoomDetails(AjaxRequestTarget target) {
    final List<Client> clientsInRoom = Application.getBean(ISessionManager.class).getClientListByRoom(roomId);
    clients.setDefaultModelObject(clientsInRoom);
    Room room = Application.getBean(RoomDao.class).get(roomId);
    roomID.setObject(room.getRooms_id());
    roomName.setObject(room.getName());
    roomComment.setObject(room.getComment());
    target.add(clientsContainer, details);
  }
View Full Code Here

    SearchableDataView<Room> dataView = new SearchableDataView<Room>("roomList", new SearchableDataProvider<Room>(RoomDao.class)) {
      private static final long serialVersionUID = 8715559628755439596L;

      @Override
      protected void populateItem(final Item<Room> item) {
        Room room = item.getModelObject();
        final long roomId = room.getRooms_id();
        item.add(new Label("rooms_id", "" + room.getRooms_id()));
        item.add(new Label("name", "" + room.getName()));
        item.add(new Label("ispublic", "" + room.getIspublic()));
        item.add(new AjaxEventBehavior("onclick") {
          private static final long serialVersionUID = -8069413566800571061L;

          protected void onEvent(AjaxRequestTarget target) {
            form.hideNewRecord();
            form.setModelObject(getBean(RoomDao.class).get(roomId));
            form.updateView(target);
            target.add(form, listContainer);
            target.appendJavaScript("omRoomPanelInit();");
          }
        });
        item.add(AttributeModifier.replace("class", "clickable ui-widget-content"
            + (room.getRooms_id().equals(form.getModelObject().getRooms_id()) ? " ui-state-active" : "")));
      }
    };
   
    add(listContainer.add(dataView).setOutputMarkupId(true));
    PagedEntityListPanel navigator = new PagedEntityListPanel("navigator", dataView) {
      private static final long serialVersionUID = -1L;

      @Override
      protected void onEvent(AjaxRequestTarget target) {
        target.add(listContainer);
      }
    };
    DataViewContainer<Room> container = new DataViewContainer<Room>(listContainer, dataView, navigator);
    container.addLink(new OmOrderByBorder<Room>("orderById", "rooms_id", container))
      .addLink(new OmOrderByBorder<Room>("orderByName", "name", container))
      .addLink(new OmOrderByBorder<Room>("orderByPublic", "ispublic", container));
    add(container.getLinks());
    add(navigator);

        add(form = new RoomForm("form", listContainer, new Room()));
  }
View Full Code Here

    add(moderatorChoice.add(new OnChangeAjaxBehavior() {
      private static final long serialVersionUID = 1L;

      @Override
      protected void onUpdate(AjaxRequestTarget target) {
        Room r = RoomForm.this.getModelObject();
        User u = moderator2add.getObject();
        boolean found = false;
        if (u != null) {
          for (RoomModerator rm : r.getModerators()) {
            if (rm.getUser().getUser_id().equals(u.getUser_id())) {
              found = true;
              break;
            }
          }
          if (!found) {
            RoomModerator rm = new RoomModerator();
            rm.setRoomId(r.getRooms_id());
            rm.setUser(u);
            r.getModerators().add(0, rm);
            moderator2add.setObject(null);
            target.add(moderatorContainer, moderatorChoice);
          }
        }
      }
View Full Code Here

    target.add(clientsContainer);
  }
 
  @Override
  protected void onSaveSubmit(AjaxRequestTarget target, Form<?> form) {
    Room r = getModelObject();
    boolean newRoom = r.getRooms_id() == null;
    r = getBean(RoomDao.class).update(r, getUserId());
    if (newRoom) {
      for (RoomModerator rm : r.getModerators()) {
        rm.setRoomId(r.getRooms_id());
      }
      // FIXME double update
      getBean(RoomDao.class).update(getModelObject(), getUserId());
    }
    hideNewRecord();
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.