From 9c4a629a8c9fe85f0d1650d42389c5856b86a1d6 Mon Sep 17 00:00:00 2001 From: Richard Alam Date: Thu, 20 Jun 2013 20:55:58 +0000 Subject: [PATCH] - recieve create poll message on server --- .../conference/service/poll/PollService.java | 79 +------------------ .../src/main/webapp/WEB-INF/bbb-app-poll.xml | 6 +- .../modules/polling/service/MessageSender.as | 4 +- 3 files changed, 5 insertions(+), 84 deletions(-) mode change 100644 => 100755 bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/poll/PollService.java diff --git a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/poll/PollService.java b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/poll/PollService.java old mode 100644 new mode 100755 index 381ba4cdae..e1f92e2306 --- a/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/poll/PollService.java +++ b/bigbluebutton-apps/src/main/java/org/bigbluebutton/conference/service/poll/PollService.java @@ -18,89 +18,16 @@ */ package org.bigbluebutton.conference.service.poll; -import org.apache.commons.lang.time.DateFormatUtils; -import org.bigbluebutton.conference.service.poll.PollApplication; -import org.bigbluebutton.conference.service.poll.Poll; -import java.util.ArrayList; - -import java.util.List; import org.slf4j.Logger; import org.red5.logging.Red5LoggerFactory; -import org.red5.server.api.so.ISharedObject; -import org.red5.server.api.Red5; - -import redis.clients.jedis.Jedis; - - -public class PollService { - +public class PollService { private static Logger log = Red5LoggerFactory.getLogger( PollService.class, "bigbluebutton" ); - private PollApplication application; - private String LOGNAME = "[PollService]"; - private Poll poll; - public void savePoll(ArrayList clientSidePoll){ - String pollTime = DateFormatUtils.formatUTC(System.currentTimeMillis(), "MM/dd/yy HH:mm"); - clientSidePoll.set(6, pollTime); - poll = new Poll(clientSidePoll); - application.savePoll(poll); + public void createPoll(String msg){ + System.out.println("*** PollService:: create poll \n" + msg + "\n"); } - public ArrayList publish(ArrayList clientSidePoll, String pollKey){ - savePoll(clientSidePoll); - return getPoll(pollKey); - } - - public void setPollApplication(PollApplication a) { - log.debug(LOGNAME + "Setting Poll Applications"); - application = a; - } - - public ArrayList getPoll(String pollKey) - { - Poll poll = application.getPoll(pollKey); - - ArrayList values = new ArrayList(); - values.add(poll.title); - values.add(poll.room); - values.add(poll.isMultiple); - values.add(poll.question); - values.add(poll.answers); - values.add(poll.votes); - values.add(poll.time); - values.add(poll.totalVotes); - values.add(poll.status); - values.add(poll.didNotVote); - values.add(poll.publishToWeb); - values.add(poll.webKey); - return values; - } - - public ArrayList vote(String pollKey, ArrayList answerIDs, Boolean webVote) - { - application.vote(pollKey, answerIDs.toArray(), webVote); - return getPoll(pollKey); - } - - public ArrayList titleList() - { - return application.titleList(); - } - - public void setStatus(String pollKey, Boolean status){ - application.setStatus(pollKey, status); - } - - public ArrayList generate(String pollKey){ - ArrayList webInfo = new ArrayList(); - webInfo = application.generate(pollKey); - return webInfo; - } - - public void cutOffWebPoll(String pollKey){ - application.cutOffWebPoll(pollKey); - } } diff --git a/bigbluebutton-apps/src/main/webapp/WEB-INF/bbb-app-poll.xml b/bigbluebutton-apps/src/main/webapp/WEB-INF/bbb-app-poll.xml index 6fa82b92b8..34327131ae 100755 --- a/bigbluebutton-apps/src/main/webapp/WEB-INF/bbb-app-poll.xml +++ b/bigbluebutton-apps/src/main/webapp/WEB-INF/bbb-app-poll.xml @@ -43,11 +43,7 @@ with BigBlueButton; if not, see . - - - - +