org.exoplatform.poll.service
Class Utils
java.lang.Object
org.exoplatform.poll.service.Utils
public class Utils
- extends Object
Created by The eXo Platform SAS
Author : Vu Duy Tu
tu.duy@exoplatform.com
Apr 28, 2011
|
Constructor Summary |
Utils()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COLON
public static final String COLON
Utils
public Utils()
getGreenwichMeanTime
public static Calendar getGreenwichMeanTime()
isEmpty
public static boolean isEmpty(String s)
isListEmpty
public static boolean isListEmpty(List<String> list)
calculateVote
public static Poll calculateVote(Poll poll,
String userId,
String voteOptions)
throws Exception
- Calculate data of poll when user Voted. Apply for all case (Single vote and multi vote)
- Parameters:
poll - the poll after user vote.userId - the user name voted.voteOptions - the value user voted.
- If is single vote, the value is one number.
- If is multi vote, the value has format a:b:c, with a,b,c is number user selected.
- Throws:
Exception - the exception
Copyright © 2013 eXo Platform SAS. All Rights Reserved.