NOT_A_POLL, TEST_POLL_NAME
Constructor and Description |
---|
PollJig() |
Modifier and Type | Method and Description |
---|---|
Count |
count(PollService.VoteServerScope.Run runPoll)
Fetches the currently reported count and caches it for reuse.
|
String |
displayTitle()
An informal, descriptive title for the poll in wiki-style title case, or null if
there is none.
|
String |
issueType()
The issue type of the poll, specified by the short name of its page in the
pollwiki, i.e. without the namespace.
|
String |
name()
The name of the poll.
|
PollService |
poll(PollService.VoteServerScope.Run runPoll)
Fetches the poll service and caches it for reuse.
|
void |
serialize(com.google.gson.stream.JsonWriter out)
Serializes the fields of this object in JSON form, and clears them.
|
void |
setDisplayTitle(String _displayTitle)
Sets the display title.
|
void |
setIssueType(String _issueType)
Sets the issue type.
|
void |
setName(String _name)
Sets the name.
|
public PollJig()
public Count count(PollService.VoteServerScope.Run runPoll) throws IOException, NoSuchItem, ScriptException, SQLException
NoSuchItem
- if no count is currently reported.NullPointerException
- if setName() was not called.IOException
ScriptException
SQLException
public PollService poll(PollService.VoteServerScope.Run runPoll) throws IOException, ScriptException, SQLException
NullPointerException
- if setName() was not called.IOException
ScriptException
SQLException
public String displayTitle()
Poll
displayTitle
in interface Poll
public void setDisplayTitle(String _displayTitle)
public String issueType()
Poll
issueType
in interface Poll
public void setIssueType(String _issueType)
public String name()
Poll
name
in interface Poll
PollService.POLL_NAME_PATTERN
,
VoterService.NAME_MAX_LENGTH
public void setName(String _name)
IllegalStateException
- if the name was already set.public void serialize(com.google.gson.stream.JsonWriter out) throws IOException
SerialJig
serialize
in interface SerialJig
IOException