|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.planet_ink.coffee_mud.Common.DefaultPoll
public class DefaultPoll
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Poll |
|---|
Poll.PollOption, Poll.PollResult |
| Field Summary | |
|---|---|
protected java.lang.String |
author
|
protected long |
bitmap
|
protected java.lang.String |
description
|
protected long |
expiration
|
boolean |
loaded
|
protected java.lang.String |
name
|
protected java.util.List<Poll.PollOption> |
options
|
protected java.lang.String |
qualZapper
|
protected java.util.List<Poll.PollResult> |
results
|
protected java.lang.String |
subject
|
| Fields inherited from interface com.planet_ink.coffee_mud.Common.interfaces.Poll |
|---|
FLAG_ABSTAIN, FLAG_ACTIVE, FLAG_HIDERESULTS, FLAG_NOTATLOGIN, FLAG_PREVIEWRESULTS, FLAG_VOTEBYIP |
| Constructor Summary | |
|---|---|
DefaultPoll()
|
|
| Method Summary | |
|---|---|
void |
addVoteResult(Poll.PollResult R)
Populates this Poll object if necessary, and adds the given PollResult object that represents a mobs vote in this Poll to the list of results. |
int |
compareTo(CMObject o)
|
CMObject |
copyOf()
Similar to Cloneable.clone(), but does its best to make sure that any internal objects to this class are also copyOfed. |
java.lang.String |
getAuthor()
Returns the Name of the creator of this poll. |
java.lang.String |
getDescription()
Returns the description shown when participating in the poll. |
long |
getExpiration()
Returns the time, in millis since 1970, that this poll expires. |
long |
getFlags()
Returns a bitmap of flags related to this poll. |
Poll.PollResult |
getMyVote(MOB mob)
Populates this Poll object if necessary, and returns the PollResult object that represents the given mobs vote in this Poll, or NULL otherwise. |
java.lang.String |
getName()
A name for this poll, used for internal purposes only. |
java.util.List<Poll.PollOption> |
getOptions()
Returns a list of PollOption objects denoting the poll choices. |
java.lang.String |
getOptionsXML()
Returns a String of PollOption objects rendered as an XML document. |
java.lang.String |
getQualZapper()
Returns a zapper mask string to mask out valid participants. |
java.util.List<Poll.PollResult> |
getResults()
Returns a list of PollResult objects renoting all poll votes. |
java.lang.String |
getResultsXML()
Returns a String of PollResult objects rendered as an XML document. |
java.lang.String |
getSubject()
Returns the title used when showing poll results. |
java.lang.String |
ID()
The CoffeeMud Java Class ID shared by all instances of this object. |
void |
initializeClass()
Called ONCE after all objects are loaded, but before the map is read in during initialization. |
boolean |
loaded()
Returns whether the PollOption and PollResult objects have already been loaded and populated into this object from the database. |
boolean |
mayISeeResults(MOB mob)
Returns true if the given mob may not see the poll results, false otherwise. |
boolean |
mayIVote(MOB mob)
Returns true if the given mob is allowed to vote in this poll, false otherwise. |
java.lang.String |
name()
The displayable name of this object. |
CMObject |
newInstance()
Returns a new instance of this class. |
void |
setAuthor(java.lang.String newname)
Sets the Name of the creator of this poll. |
void |
setDescription(java.lang.String newdescription)
Sets the description shown when participating in the poll. |
void |
setExpiration(long time)
Sets the time, in millis since 1970, that this poll expires. |
void |
setFlags(long flag)
Sets a bitmap of flags related to this poll. |
void |
setLoaded(boolean truefalse)
Sets whether the PollOption and PollResult objects have already been loaded and populated into this object from the database. |
void |
setName(java.lang.String newname)
Sets a name for this poll, used for internal purposes only. |
void |
setOptions(java.util.List<Poll.PollOption> V)
Sets a list of PollOption objects denoting the poll choices. |
void |
setQualZapper(java.lang.String newZap)
Sets a zapper mask string to mask out valid participants. |
void |
setResults(java.util.List<Poll.PollResult> V)
Sets a list of PollResult objects renoting all poll votes. |
void |
setSubject(java.lang.String newsubject)
Sets the title used when showing poll results. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean loaded
protected java.lang.String name
protected java.lang.String subject
protected java.lang.String description
protected java.lang.String author
protected long expiration
protected long bitmap
protected java.lang.String qualZapper
protected java.util.List<Poll.PollOption> options
protected java.util.List<Poll.PollResult> results
| Constructor Detail |
|---|
public DefaultPoll()
| Method Detail |
|---|
public java.lang.String ID()
CMObject
ID in interface CMObjectpublic java.lang.String name()
CMObject
name in interface CMObjectEnvironmental.Name()public CMObject newInstance()
CMObject
newInstance in interface CMObjectpublic void initializeClass()
CMObject
initializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public CMObject copyOf()
CMObject
copyOf in interface CMObjectpublic boolean loaded()
Poll
loaded in interface PollPoll.setLoaded(boolean),
PollManager.loadPollIfNecessary(Poll)public void setLoaded(boolean truefalse)
Poll
setLoaded in interface Polltruefalse - set to true if this object is fully populated from the databasePoll.loaded(),
PollManager.loadPollIfNecessary(Poll)public java.lang.String getName()
Poll
getName in interface PollPoll.setName(String)public void setName(java.lang.String newname)
Poll
setName in interface Pollnewname - a name for this pollPoll.getName()public java.lang.String getSubject()
Poll
getSubject in interface PollPoll.setSubject(String)public void setSubject(java.lang.String newsubject)
Poll
setSubject in interface Pollnewsubject - the title used when showing poll results.Poll.getSubject()public java.lang.String getDescription()
Poll
getDescription in interface PollPoll.setDescription(String)public void setDescription(java.lang.String newdescription)
Poll
setDescription in interface Pollnewdescription - the description shown when participating in the poll.Poll.getDescription()public java.lang.String getAuthor()
Poll
getAuthor in interface PollPoll.setAuthor(String)public void setAuthor(java.lang.String newname)
Poll
setAuthor in interface Pollnewname - the Name of the creator of this poll.Poll.getAuthor()public long getFlags()
Poll
getFlags in interface PollPoll.setFlags(long),
Poll.FLAG_ABSTAIN,
Poll.FLAG_ACTIVEpublic void setFlags(long flag)
Poll
setFlags in interface Pollflag - a bitmap of flags related to this poll.Poll.getFlags(),
Poll.FLAG_ABSTAIN,
Poll.FLAG_ACTIVEpublic java.lang.String getQualZapper()
Poll
getQualZapper in interface PollPoll.setQualZapper(String),
MaskingLibrary.maskCheck(String, Environmental, boolean)public void setQualZapper(java.lang.String newZap)
Poll
setQualZapper in interface PollnewZap - a zapper mask string to mask out valid participants.Poll.getQualZapper(),
MaskingLibrary.maskCheck(String, Environmental, boolean)public long getExpiration()
Poll
getExpiration in interface PollPoll.setExpiration(long)public void setExpiration(long time)
Poll
setExpiration in interface Polltime - the time, in millis since 1970, that this poll expires.Poll.getExpiration()public java.util.List<Poll.PollOption> getOptions()
Poll
getOptions in interface PollPoll.setOptions(List),
Poll.PollOptionpublic void setOptions(java.util.List<Poll.PollOption> V)
Poll
setOptions in interface PollV - a list of PollOption objects denoting the poll choices.Poll.getOptions(),
Poll.PollOptionpublic java.util.List<Poll.PollResult> getResults()
Poll
getResults in interface PollPoll.getResults(),
Poll.PollResultpublic void setResults(java.util.List<Poll.PollResult> V)
Poll
setResults in interface PollV - a list of PollResult objects renoting all poll votes.Poll.getResults(),
Poll.PollResultpublic java.lang.String getOptionsXML()
Poll
getOptionsXML in interface PollPoll.getOptions(),
Poll.PollOption,
PollManager.loadPollIfNecessary(Poll)public java.lang.String getResultsXML()
Poll
getResultsXML in interface PollPoll.getResults(),
Poll.PollResult,
PollManager.loadPollIfNecessary(Poll)public Poll.PollResult getMyVote(MOB mob)
Poll
getMyVote in interface Pollmob - the mob to find a result object for
PollManager.loadPollIfNecessary(Poll),
Poll.addVoteResult(com.planet_ink.coffee_mud.Common.interfaces.Poll.PollResult),
Poll.PollResultpublic void addVoteResult(Poll.PollResult R)
Poll
addVoteResult in interface PollR - the particular vote by a particular mob to addPollManager.loadPollIfNecessary(Poll),
Poll.getMyVote(MOB),
Poll.PollResultpublic boolean mayIVote(MOB mob)
Poll
mayIVote in interface Pollmob - the mob to check for elligibility
Poll.getMyVote(MOB),
Poll.FLAG_VOTEBYIP,
Poll.FLAG_ACTIVEpublic boolean mayISeeResults(MOB mob)
Poll
mayISeeResults in interface Pollmob - the mob to check for elligibility
Poll.FLAG_HIDERESULTS,
Poll.FLAG_PREVIEWRESULTS
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||