org.sakaiproject.poll.model
Class Poll

java.lang.Object
  extended by org.sakaiproject.poll.model.Poll
All Implemented Interfaces:
org.sakaiproject.entity.api.Entity

public class Poll
extends Object
implements org.sakaiproject.entity.api.Entity


Field Summary
 
Fields inherited from interface org.sakaiproject.entity.api.Entity
SEPARATOR
 
Constructor Summary
Poll()
           
 
Method Summary
 void addOption(Option option)
           
 void addVote(Vote vote)
          Attach a vote to the list of votes for this poll
 Date getCreationDate()
           
 List<Vote> getCurrentUserVotes()
           
 String getDescription()
           
 String getDetails()
           
 String getDisplayResult()
           
 String getId()
           
 boolean getIsPublic()
           
 boolean getLimitVoting()
           
 int getMaxOptions()
           
 int getMinOptions()
          Get the minimum number of options that must be selected to vote
 String getOwner()
           
 Long getPollId()
          Get the id of the poll
 List<Option> getPollOptions()
           
 String getPollText()
           
 org.sakaiproject.entity.api.ResourceProperties getProperties()
           
 String getReference()
           
 String getReference(String arg0)
           
 String getSiteId()
           
 String getText()
           
 String getUrl()
           
 String getUrl(String arg0)
           
 Date getVoteClose()
           
 Date getVoteOpen()
           
 List<Vote> getVotes()
           
 boolean isCurrentUserVoted()
           
 void setCreationDate(Date creationDate)
           
 void setCurrentUserVoted(boolean currentUserVoted)
           
 void setCurrentUserVotes(List<Vote> currentUserVotes)
           
 void setDescription(String description)
           
 void setDetails(String value)
           
 void setDisplayResult(String value)
          Set when to display the results
 void setId(String s)
           
 void setIsPublic(boolean isPublic)
           
 void setLimitVoting(boolean value)
           
 void setMaxOptions(int value)
           
 void setMinOptions(int value)
           
 void setOptions(List<Option> value)
           
 void setOwner(String owner)
           
 void setPollId(Long id)
           
 void setPollText(String pollText)
           
 void setSiteId(String siteId)
           
 void setText(String poll)
           
 void setVoteClose(Date value)
           
 void setVoteOpen(Date value)
           
 void setVotes(List<Vote> value)
          Set the votes list for this poll
 String toString()
           
 Element toXml(Document doc, Stack stack)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Poll

public Poll()
Method Detail

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-2012 Sakai Project. All Rights Reserved.