Package org.openmeetings.app.conference.videobeans

Examples of org.openmeetings.app.conference.videobeans.RoomPoll


      Long uniqueRoomPollName = rc.getRoom_id();
     
      log.debug("rc: "+rc.getStreamid()+" "+rc.getUsername()+" "+rc.getIsMod());
     
      if (rc.getIsMod()){
        RoomPoll roomP = new RoomPoll();
       
        roomP.setCreatedBy(rc);
        roomP.setPollDate(new Date());
        roomP.setPollQuestion(pollQuestion);
        roomP.setPollTypeId(pollTypeId);
        roomP.setRoom_id(rc.getRoom_id());
        List<RoomPollAnswers> rpA = new LinkedList<RoomPollAnswers>();
        roomP.setRoomPollAnswerList(rpA);
       
        pollList.put(uniqueRoomPollName, roomP);
       
        sendNotification(currentcon,"newPoll",new Object[] { roomP });
        returnValue="200";
View Full Code Here


      if (rc==null){
        log.error("RoomClient IS NULL for ClientID: "+current.getClient().getId());
        return -1;
      }
      //get Poll
      RoomPoll roomP = pollList.get(rc.getRoom_id());
     
      if (roomP==null){
        log.error("POLL IS NULL for RoomId: "+rc.getRoom_id());
        return -1;
      }
     
      log.debug("vote: "+pollvalue+" "+pollTypeId+" "+roomP.getPollQuestion());
     
      //Check if this user has already voted
      if(this.hasVoted(roomP,rc.getStreamid())){
        log.debug("hasVoted: true");
        return -1;
      } else {
        log.debug("hasVoted: false");
        RoomPollAnswers rpA = new RoomPollAnswers();
        if (pollTypeId==1){
          log.debug("boolean");
          //Is boolean Question
          if (pollvalue==1){
            rpA.setAnswer(new Boolean(true));
          } else {
            rpA.setAnswer(new Boolean(false));
          }
        } else if(pollTypeId==2){
          log.debug("numeric");
          rpA.setPointList(pollvalue);
        }
        rpA.setVotedClients(rc);
        rpA.setVoteDate(new Date());
        roomP.getRoomPollAnswerList().add(rpA);
        return 1;
      }   
    } catch (Exception err){
      log.error("vote");
      log.error("[vote]",err);
View Full Code Here

    try {
      IConnection current = Red5.getConnectionLocal();
      RoomClient rc = this.clientListManager.getClientByStreamId(current.getClient().getId());
     
      //get Poll
      RoomPoll roomP = pollList.get(rc.getRoom_id());
     
      if (roomP!=null){
        log.debug("checkHasVoted: "+roomP.getPollQuestion());
        //Check if this user has already voted
        if(this.hasVoted(roomP,rc.getStreamid())){
          return -1;
        } else {
          return 1;
View Full Code Here

TOP

Related Classes of org.openmeetings.app.conference.videobeans.RoomPoll

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.