@ThreadRestricted(value="holds lock()") public final class Poll extends VoterService implements InputStore
| Modifier and Type | Class and Description |
|---|---|
static class |
Poll.ConstructionContext
A context for configuring the construction of a poll.
|
static class |
Poll.VoteServerScope
API for all polls within the scope of a vote-server.
|
VoterService.IllegalNameException, VoterService.NoSuchServiceExceptionInputStore.U| Modifier and Type | Field and Description |
|---|---|
static String |
NOT_A_POLL
A name that is guaranteed not to designate an actual poll, though it is otherwise
valid as a poll name.
|
static Pattern |
POLL_NAME_PATTERN
The allowable pattern of a poll name.
|
static String |
TEST_POLL_NAME
The name of the local test poll, which is "Sys/p/sandbox".
|
constructionContext, lock, name, NAME_MAX_LENGTH, NAME_PATTERN, vsRun| Modifier and Type | Method and Description |
|---|---|
(package private) JavaScriptIncluder |
configurationScript()
The compiled configuration script for the poll.
|
Count |
countToReport()
The current count to report, or null if there is none.
|
Count |
countToReportT()
The current count to report, or null if there is none.
|
Exception |
dispatch(String[] argArray,
CommandResponder.Session commandSession)
Looks up the responder of the specified command, and sends the command
to it.
|
Set<String> |
divisionalComponents()
The set of divisions whose members are exclusively eligible to vote in this poll.
|
String |
divisionPageName()
The polling division, specified by its pollwiki pagename.
|
String |
divisionSmallMapPageName()
A small map of the polling division, specified by its pollwiki pagename.
|
ActivityEvent |
newChangeEventOrNull(Vote oldVote,
Vote newVote)
Either constructs an event to record the change that occured between oldVote and
newVote; or returns null, if no significant change occured.
|
static StringBuilder |
pollNameToXMLColonName(StringBuilder b)
Converts a poll name to an XML name by replacing all instances of slashes '/' with
colons ':'.
|
long |
populationSize()
The estimated number of eligible voters for this poll.
|
String |
populationSizeExplanation()
An explanation of the population size.
|
File |
startupConfigurationFile()
The startup configuration file for this service.
|
String |
summaryDescription()
A short description that summarizes this service.
|
String |
title()
The display title of this service in wiki-style title case.
|
InputTable |
voterInputTable()
The relational store of voter input for this service.
|
String |
wgLogoImageLocation()
The wiki logo (wgLogo) image location for this poll; or null if none is specified.
|
String |
wgLogoLinkTarget()
The wiki logo (wgLogo) link target for this poll.
|
static StringBuilder |
xmlColonNameToPollName(StringBuilder b)
Converts an XML name to a poll name by replacing all instances of colons ':' with
slashes '/'.
|
dispatch, equals, help, helpA_1, helpA_2, helpA_3, helpA, helpB, helpC, init, isNonPoll, lock, name, responderByClassName, responderForCommand, responders, serviceDirectory, toString, vsRunpublic static final String NOT_A_POLL
public static final Pattern POLL_NAME_PATTERN
public static final String TEST_POLL_NAME
@Warning(value="thread restricted object") JavaScriptIncluder configurationScript()
public Count countToReport() throws IOException, SQLException
IOExceptionSQLException@ThreadSafe public Count countToReportT() throws IOException, SQLException
IOExceptionSQLException@ThreadSafe public Set<String> divisionalComponents()
Poll.ConstructionContext.addDivisionalComponent(String),
zelea.com/w/Property:Division#Divisions@ThreadSafe public String divisionPageName()
Poll.ConstructionContext.setDivisionPageName(String),
zelea.com/w/Property:Division@ThreadSafe public String divisionSmallMapPageName()
Poll.ConstructionContext.setDivisionSmallMapPageName(String),
zelea.com/w/Property:Small_mappublic ActivityEvent newChangeEventOrNull(Vote oldVote, Vote newVote)
public static StringBuilder pollNameToXMLColonName(StringBuilder b)
xmlColonNameToPollName(StringBuilder)@ThreadSafe public long populationSize()
Poll.ConstructionContext.setPopulationSize(long),
zelea.com/w/Property:Population size@ThreadSafe public String populationSizeExplanation()
@ThreadSafe public String wgLogoImageLocation()
@ThreadSafe public String wgLogoLinkTarget()
public static StringBuilder xmlColonNameToPollName(StringBuilder b)
pollNameToXMLColonName(StringBuilder)public Exception dispatch(String[] argArray, CommandResponder.Session commandSession)
VoterServicedispatch in class VoterServiceargArray - an array containing the command name and arguments,
per CommandResponder.respond(argv,session)CommandResponder.respond(String[],CommandResponder.Session)@ThreadSafe public File startupConfigurationFile()
VoterServicestartupConfigurationFile in class VoterServicePoll.VoteServerScope.configurationFile()@ThreadSafe public String summaryDescription()
VoterServicesummaryDescription in class VoterServicePoll.ConstructionContext.setSummaryDescription(String)@ThreadSafe public String title()
VoterServicetitle in class VoterServicePoll.ConstructionContext.setTitle(String)@ThreadSafe public InputTable voterInputTable()
InputStorevoterInputTable in interface InputStoreVoteServer.Run.database()