Package org.openmeetings.app.persistence.beans.rooms

Examples of org.openmeetings.app.persistence.beans.rooms.Rooms


   
    log.debug("addRoom");
   
    try {
      if (AuthLevelmanagement.getInstance().checkModLevel(user_level)){
        Rooms r = new Rooms();
        r.setName(name);
        r.setComment(comment);
        r.setStarttime(new Date());
        r.setNumberOfPartizipants(numberOfPartizipants);
        r.setRoomtype(this.getRoomTypesById(roomtypes_id));
        r.setIspublic(ispublic);
       
        r.setAllowUserQuestions(allowUserQuestions);
        r.setAppointment(appointment);
       
        r.setIsDemoRoom(isDemoRoom);
        r.setDemoTime(demoTime);
       
        r.setIsModeratedRoom(isModeratedRoom);
       
        r.setDeleted("false");
        Object idf = PersistenceSessionUtil.createSession();
        EntityManager session = PersistenceSessionUtil.getSession();
        EntityTransaction tx = session.getTransaction();
        tx.begin();
        r = session.merge(r);
        long returnId = r.getRooms_id();
        tx.commit();
        PersistenceSessionUtil.closeSession(idf);
       
        this.addRoomToOrganisation(3, returnId, organisation_id);
       
        if (roomModerators!=null) {
          RoomModeratorsDaoImpl.getInstance().addRoomModeratorByUserList(roomModerators, r.getRooms_id());
        }
       
        return returnId;
      }
    } catch (Exception ex2) {
View Full Code Here


                        Boolean hideTopBar){

                log.debug("addExternalRoom");

                try {
                    Rooms r = new Rooms();
                    r.setName(name);
                    r.setComment(comment);
                    r.setStarttime(new Date());
                    r.setNumberOfPartizipants(numberOfPartizipants);
                    r.setRoomtype(this.getRoomTypesById(roomtypes_id));
                    r.setIspublic(ispublic);
                   
                    r.setAllowUserQuestions(allowUserQuestions);
                    r.setIsAudioOnly(isAudioOnly);

                    r.setAppointment(appointment);

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

                    r.setIsModeratedRoom(isModeratedRoom);

                    r.setDeleted("false");

          r.setExternalRoomId(externalRoomId);
          r.setExternalRoomType(externalRoomType);
         
          r.setIsClosed(isClosed);
          r.setRedirectURL(redirectURL);
         
          r.setWaitForRecording(waitForRecording);
          r.setAllowRecording(allowRecording);
         
          r.setHideTopBar(hideTopBar);

                    Object idf = PersistenceSessionUtil.createSession();
                    EntityManager session = PersistenceSessionUtil.getSession();
                    EntityTransaction tx = session.getTransaction();
                    tx.begin();
                    r = session.merge(r);

                    session.flush();
                    long returnId = r.getRooms_id();
                    tx.commit();
                    PersistenceSessionUtil.closeSession(idf);

                    if (organisations!=null){
                            Long t = this.updateRoomOrganisations(organisations, r);
                            if (t==null) return null;
                    }

                    if (roomModerators!=null) {
                            RoomModeratorsDaoImpl.getInstance().addRoomModeratorByUserList(roomModerators, r.getRooms_id());
                    }

                    return returnId;
                } catch (Exception ex2) {
                        log.error("[addExternalRoom] ", ex2);
View Full Code Here

      if (AuthLevelmanagement.getInstance().checkModLevel(user_level)){
       
        //TODO: testen
        if (this.checkUserOrgRoom(user_id, rooms_id)){
         
          Rooms r = this.getRoomById(rooms_id);
          r.setComment(comment);
          r.setIspublic(ispublic);
          r.setName(name);
          r.setRoomtype(this.getRoomTypesById(roomtypes_id));
          r.setUpdatetime(new Date());
          Object idf = PersistenceSessionUtil.createSession();
          EntityManager session = PersistenceSessionUtil.getSession();
          EntityTransaction tx = session.getTransaction();
          tx.begin();
          if (r.getRooms_id() == null) {
            session.persist(r);
              } else {
                if (!session.contains(r)) {
                  session.merge(r);
              }
View Full Code Here

      Boolean waitForRecording,
      Boolean allowRecording,
      Boolean hideTopBar){
    try {
      log.debug("*** updateRoom numberOfPartizipants: "+numberOfPartizipants);
      Rooms r = this.getRoomById(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.setIsAudioOnly(isAudioOnly);

      r.setIsDemoRoom(isDemoRoom);
      r.setDemoTime(demoTime);
     
      r.setAppointment(appointment);
     
      r.setIsModeratedRoom(isModeratedRoom);
      r.setHideTopBar(hideTopBar);
     
      r.setIsClosed(isClosed);
      r.setRedirectURL(redirectURL);

      r.setSipNumber(sipNumber);
      r.setConferencePin(conferencePin);
      r.setOwnerId(ownerId);
     
      r.setWaitForRecording(waitForRecording);
      r.setAllowRecording(allowRecording);
     
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
      if (r.getRooms_id() == null) {
        session.persist(r);
          } else {
            if (!session.contains(r)) {
              r = session.merge(r);
          }
      }
     
      session.flush();
     
      session.refresh(r);
     
      tx.commit();
      PersistenceSessionUtil.closeSession(idf);
     
      if (organisations!=null){
        Long t = this.updateRoomOrganisations(organisations, r);
        if (t==null) return null;
      }
      if (roomModerators!=null) {
        RoomModeratorsDaoImpl.getInstance().updateRoomModeratorByUserList(roomModerators,r.getRooms_id());
      }
     
      return r.getRooms_id();
    } catch (Exception ex2) {
      log.error("[updateRoom] ", ex2);
    }
    return null;
  }
View Full Code Here

      List roomModerators,
      Boolean allowUserQuestions){
    try {
      log.debug("*** updateRoom numberOfPartizipants: "+numberOfPartizipants);
      if (AuthLevelmanagement.getInstance().checkModLevel(user_level)){
        Rooms r = this.getRoomById(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);
       
        Object idf = PersistenceSessionUtil.createSession();
        EntityManager session = PersistenceSessionUtil.getSession();
        EntityTransaction tx = session.getTransaction();
        tx.begin();
        if (r.getRooms_id() == null) {
          session.persist(r);
            } else {
              if (!session.contains(r)) {
                session.merge(r);
            }
        }
        tx.commit();
        PersistenceSessionUtil.closeSession(idf);
       
        //FIXME: Organizations will not be changed when you do an update as Moderator
       
        if (roomModerators!=null) {
          RoomModeratorsDaoImpl.getInstance().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{
     
      Rooms room = this.getRoomById(rooms_id);
     
      room.setIsClosed(status);
     
      this.updateRoomObject(room);
     
    }catch(Exception e){
      log.error("Error updateRoomObject : " , e);
View Full Code Here

      String hql = "select c from Rooms as c " +
          "where c.ownerId = :ownerId " +
          "AND c.roomtype.roomtypes_id = :roomtypesId " +
          "AND c.deleted <> :deleted";
         
      Rooms room = null;
     
      Object idf = PersistenceSessionUtil.createSession();
      EntityManager session = PersistenceSessionUtil.getSession();
      EntityTransaction tx = session.getTransaction();
      tx.begin();
View Full Code Here

            roomType);

        Appointment app = AppointmentLogic.getInstance()
            .getAppointMentById(appointmentId);

        Rooms room = app.getRoom();
        if (room != null) {

          room.setComment(appointmentDescription);
          room.setName(appointmentName);
          room.setRoomtype(rt);

          Roommanagement.getInstance().updateRoomObject(room);
        }

        Users user = Usermanagement.getInstance().getUserById(users_id);
View Full Code Here

        RoomTypes rt = roommanagement.getRoomTypesById(roomType);

        Appointment app = appointmentLogic
            .getAppointMentById(appointmentId);

        Rooms room = app.getRoom();
        if (room != null) {

          room.setComment(appointmentDescription);
          room.setName(appointmentName);
          room.setRoomtype(rt);

          roommanagement.updateRoomObject(room);
        }

        Users user = userManagement.getUserById(users_id);
View Full Code Here

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

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

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

TOP

Related Classes of org.openmeetings.app.persistence.beans.rooms.Rooms

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.