|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PollElement
Representation of Poll element.
| Nested Class Summary | |
|---|---|
static class |
PollElement.PollType
Type defining what entry mode is allowed for voting on this poll. |
static class |
PollElement.QuestionSelectionMode
QuestionSelectionMode defining how the question and subsequent answers shown is to be determined. |
| Method Summary | |
|---|---|
PollItem |
addAnswer(java.lang.String answer)
Add an answer to this question. |
PollItem[] |
getItems()
Returns available poll items, calculate percentage of votes for each poll item to display in results page. |
int |
getPollId()
Returns identifier of the current poll question. |
PollElement.PollType |
getPollType()
Returns the poll type. |
java.lang.String |
getQuestion()
Returns poll question. |
PollElement.QuestionSelectionMode |
getQuestionSelectionMode()
Returns the question selection mode. |
int |
getTotalVotes()
Returns sum of all votes on all items. |
java.lang.String |
getType()
Deprecated. |
void |
removeItem(PollItem item)
Remove the indicated item. |
void |
setPollType(PollElement.PollType pollType)
Sets the type to use for this poll. |
void |
setQuestion(java.lang.String question)
Sets the question for this poll. |
void |
setQuestionSelectionMode(PollElement.QuestionSelectionMode mode)
Sets the question selection mode to use for this poll. |
| Methods inherited from interface nl.gx.webmanager.cms.element.Element |
|---|
cleanup, copy, getEditElementHeader, getElementHolder, getHeader, getIcon, getMediaItemVersion, getPageModel, getPageModelElement, getPageVersion, getPersonalization, getWebsite, isAuthorized, setAuthorized, setDefaultPresentation, setEditElementHeader, setHeader, setIcon, setPersonalization |
| Methods inherited from interface nl.gx.webmanager.cms.core.Presentable |
|---|
getPresentation, render, render, setPresentation |
| Methods inherited from interface nl.gx.webmanager.wrapper.Wrapper |
|---|
getId, getUUID, setId, setUUID |
| Methods inherited from interface nl.gx.webmanager.springmvc.DelegatedControllerAware |
|---|
getDelegatedController, setDelegatedController |
| Method Detail |
|---|
int getPollId()
java.lang.String getQuestion()
void setQuestion(java.lang.String question)
question - the questionPollItem addAnswer(java.lang.String answer)
answer - The answer to addvoid removeItem(PollItem item)
item - the item to be removedPollItem[] getItems()
int getTotalVotes()
java.lang.String getType()
PollElement.PollType getPollType()
PollType.MULTIPLECHOICE if multiple answers are allowed,
PollType.SINGLECHOICE if only one answer is allowed.
void setPollType(PollElement.PollType pollType)
pollType - The type to setPollElement.QuestionSelectionMode getQuestionSelectionMode()
void setQuestionSelectionMode(PollElement.QuestionSelectionMode mode)
mode - The question selection mode to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||