|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.dotmarketing.cms.polls.business.PollsAPILiferayImpl
public class PollsAPILiferayImpl
| Constructor Summary | |
|---|---|
PollsAPILiferayImpl()
|
|
| Method Summary | |
|---|---|
java.util.List<com.liferay.portlet.polls.model.PollsQuestion> |
getActiveQuestions()
Returns a list of PollQuestion objects This implementation uses the Liferay API's to obtain the list of PollQuestion objects |
java.util.List<com.liferay.portlet.polls.model.PollsQuestion> |
getActiveQuestions(java.lang.String orderBy,
int direction)
Returns a list of PollQuestion objects This implementation uses the Liferay API's to obtain the list of PollQuestion objects |
java.util.List<com.liferay.portlet.polls.model.PollsQuestion> |
getActiveQuestions(java.lang.String orderBy,
int direction,
java.util.List<java.lang.String> portletGroupIds)
Returns a list of PollQuestion objects This implementation uses the Liferay API's to obtain the list of PollQuestion objects |
java.util.List |
getChoices(java.lang.String questionId)
Returns a List object containing string representations of the choices of a question, given a valid question id. |
int |
getChoiceVotes(java.lang.String questionId,
java.lang.String choiceId)
Returns the integer representation of the total vote count for a choice given a question id and a choice id. |
java.util.List<com.liferay.portlet.polls.model.PollsQuestion> |
getInactiveQuestions()
Returns a list of inactive PollQuestion objects This implementation uses the Liferay API's to obtain the list of PollQuestion objects |
java.util.List<com.liferay.portlet.polls.model.PollsQuestion> |
getInactiveQuestions(java.lang.String orderBy,
int direction)
Returns a list of inactive PollQuestion objects This implementation uses the Liferay API's to obtain the list of PollQuestion objects |
com.liferay.portlet.polls.model.PollsQuestion |
getQuestion(java.lang.String questionId)
Returns a PollQuestion object given a question id. |
int |
getTotalVotes(java.lang.String questionId)
Returns the integer representation of the total vote count for a question given a question id. |
boolean |
hasExpired(java.lang.String questionId)
Returns whether a question has expired or not. |
boolean |
hasVoted(java.lang.String questionId)
Returns whether a vote has been casted on a question given a question id. |
boolean |
questionExists(java.lang.String questionId)
Returns whether a question exists or not. |
void |
vote(java.lang.String voteUserId,
java.lang.String questionId,
java.lang.String choiceId)
Performs a vote operation using Liferay API's given a valid user, question id an choice id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PollsAPILiferayImpl()
| Method Detail |
|---|
public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getActiveQuestions()
getActiveQuestions in interface PollsAPI
public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getActiveQuestions(java.lang.String orderBy,
int direction)
getActiveQuestions in interface PollsAPIorderBy - Permitted values createDate, expirationDate and questionIddirection - value -1 descending order and 1 to ascending order
public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getActiveQuestions(java.lang.String orderBy,
int direction,
java.util.List<java.lang.String> portletGroupIds)
getActiveQuestions in interface PollsAPIorderBy - Permitted values createDate, expirationDate and questionIddirection - value -1 descending order and 1 to ascending orderportletGroupIds - array list of group ids configured with the poll portlet
public com.liferay.portlet.polls.model.PollsQuestion getQuestion(java.lang.String questionId)
This implementation uses the Liferay API's to obtain a PollQuestion object given a valid question id.
getQuestion in interface PollsAPIquestionId - a valid question id
public java.util.List getChoices(java.lang.String questionId)
This implementation uses the Liferay API's to obtain the list of choices.
getChoices in interface PollsAPIquestionId - a valid question id
public void vote(java.lang.String voteUserId,
java.lang.String questionId,
java.lang.String choiceId)
vote in interface PollsAPIvoteUserId - a user idquestionId - a valid question idchoiceId - a valid choice idpublic int getTotalVotes(java.lang.String questionId)
getTotalVotes in interface PollsAPIquestionId - a valid question id
public int getChoiceVotes(java.lang.String questionId,
java.lang.String choiceId)
getChoiceVotes in interface PollsAPIquestionId - a valid question idchoiceId - a valid choice id
public boolean hasExpired(java.lang.String questionId)
hasExpired in interface PollsAPIquestionId - a valid question id
public boolean questionExists(java.lang.String questionId)
questionExists in interface PollsAPIquestionId - a valid question id
public boolean hasVoted(java.lang.String questionId)
hasVoted in interface PollsAPIquestionId - a valid question id
public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getInactiveQuestions()
getInactiveQuestions in interface PollsAPI
public java.util.List<com.liferay.portlet.polls.model.PollsQuestion> getInactiveQuestions(java.lang.String orderBy,
int direction)
getInactiveQuestions in interface PollsAPIorderBy - Permitted values createDate, expirationDate and questionIddirection - value -1 descending order and 1 to ascending order
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||