org.sakaiproject.poll.model
Class Poll
java.lang.Object
org.sakaiproject.poll.model.Poll
- All Implemented Interfaces:
- org.sakaiproject.entity.api.Entity
public class Poll
- extends Object
- implements org.sakaiproject.entity.api.Entity
| Fields inherited from interface org.sakaiproject.entity.api.Entity |
SEPARATOR |
|
Constructor Summary |
Poll()
|
Poll
public Poll()
getPollId
public Long getPollId()
- Get the id of the poll
- Returns:
- the polls ID
setPollId
public void setPollId(Long id)
getOwner
public String getOwner()
setOwner
public void setOwner(String owner)
getSiteId
public String getSiteId()
setSiteId
public void setSiteId(String siteId)
getCreationDate
public Date getCreationDate()
setCreationDate
public void setCreationDate(Date creationDate)
getText
public String getText()
setText
public void setText(String poll)
setMinOptions
public void setMinOptions(int value)
getMinOptions
public int getMinOptions()
- Get the minimum number of options that must be selected to vote
- Returns:
setMaxOptions
public void setMaxOptions(int value)
getMaxOptions
public int getMaxOptions()
setVoteOpen
public void setVoteOpen(Date value)
getVoteOpen
public Date getVoteOpen()
setVoteClose
public void setVoteClose(Date value)
getVoteClose
public Date getVoteClose()
getPollText
public String getPollText()
setPollText
public void setPollText(String pollText)
getDescription
public String getDescription()
setDescription
public void setDescription(String description)
isCurrentUserVoted
public boolean isCurrentUserVoted()
setCurrentUserVoted
public void setCurrentUserVoted(boolean currentUserVoted)
getCurrentUserVotes
public List<Vote> getCurrentUserVotes()
setCurrentUserVotes
public void setCurrentUserVotes(List<Vote> currentUserVotes)
setDisplayResult
public void setDisplayResult(String value)
- Set when to display the results
- Parameters:
display - String which can be:
open - can be viewd at any time
never - not diplayed
afterVoting - after user has voted
afterClosing - once the vote has closed
getDisplayResult
public String getDisplayResult()
setVotes
public void setVotes(List<Vote> value)
- Set the votes list for this poll
- Parameters:
votes -
getVotes
public List<Vote> getVotes()
addVote
public void addVote(Vote vote)
- Attach a vote to the list of votes for this poll
- Parameters:
vote -
setOptions
public void setOptions(List<Option> value)
getPollOptions
public List<Option> getPollOptions()
addOption
public void addOption(Option option)
setLimitVoting
public void setLimitVoting(boolean value)
getLimitVoting
public boolean getLimitVoting()
setDetails
public void setDetails(String value)
getDetails
public String getDetails()
toString
public String toString()
- Overrides:
toString in class Object
getUrl
public String getUrl()
- Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity
getReference
public String getReference()
- Specified by:
getReference in interface org.sakaiproject.entity.api.Entity
getUrl
public String getUrl(String arg0)
- Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity
getReference
public String getReference(String arg0)
- Specified by:
getReference in interface org.sakaiproject.entity.api.Entity
getId
public String getId()
- Specified by:
getId in interface org.sakaiproject.entity.api.Entity
setId
public void setId(String s)
getIsPublic
public boolean getIsPublic()
setIsPublic
public void setIsPublic(boolean isPublic)
getProperties
public org.sakaiproject.entity.api.ResourceProperties getProperties()
- Specified by:
getProperties in interface org.sakaiproject.entity.api.Entity
toXml
public Element toXml(Document doc,
Stack stack)
- Specified by:
toXml in interface org.sakaiproject.entity.api.Entity
Copyright © 2003-2013 Sakai Project. All Rights Reserved.