|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectElectoralService
Election
@ThreadRestricted(value="holds lock()") public final class Election
A delegate cascade election, provided as a formal electoral service.
| Nested Class Summary | |
|---|---|
static class |
Election.ConfigurationContext
A context for configuring an election. |
| Field Summary |
|---|
| Fields inherited from class ElectoralService |
|---|
configurationContext, lock, name, serviceEmail, subserverRun |
| Method Summary | |
|---|---|
(package private) File |
configurationDirectory()
The directory containing this election's configuration files. |
File |
configurationFile()
The primary configuration file for this electoral service. |
(package private) Database |
countDatabase()
Database for mounting the relational parts of this election's counts -- a reference to a shared instance (not thread safe). |
Count |
countToReport()
Returns the current count to report, if any. |
Exception |
dispatch(String[] argArray,
CommandResponder.Session commandSession)
Looks up the responder of the specified command, and sends the command to it. |
(package private) long |
electorateSize()
The estimated size of the electorate for this election, if known. |
(package private) String |
electorateSizeExplanation()
An explanation of the estimate of the size of the electorate, for the information of users. |
(package private) JavaScriptIncluder |
eligibilityScript()
The script for testing the eligibility of a voter. |
(package private) ActivityEvent |
newChangeEventOrNull(Vote oldVote,
Vote newVote)
Returns a newly constructed event to record the change that occured between oldVote and newVote; or null, if no significant change occured. |
static Election |
newElection(ElectoralSubserver.Run run,
JavaScriptIncluder s)
Constructs an Election. |
RegionalElectionNode |
regionalNode()
|
String |
snapshotOutputStoreFilebase()
Path to the base directory of the snapshot output store, for this electoral service. |
String |
summaryDescription()
A brief description of this service, in sentence form. |
String |
title()
Title of this election, in title case. |
VoterInputTable |
voterInputTable()
The relational store of voter input, for this service. |
| Methods inherited from class ElectoralService |
|---|
dispatch, ensureSchema, equals, help, helpA, helpB, helpC, init, lock, name, responderByClassName, responderForCommand, responders, serviceEmail, subserverRun, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
@ThreadSafe
public static Election newElection(ElectoralSubserver.Run run,
JavaScriptIncluder s)
throws IOException,
ScriptException,
SQLException
s - the compiled configuration script
IOException
ScriptException
SQLException@ThreadSafe File configurationDirectory()
@ThreadSafe Database countDatabase()
Although this method is thread safe, the object it returns is not; it has its own thread-saftety restrictions, q.v.
countToReport(),
Election.ConfigurationContext.countDatabase()
public Count countToReport()
throws IOException
IOException@ThreadSafe long electorateSize()
Election.ConfigurationContext.setElectorateSize(long)@ThreadSafe String electorateSizeExplanation()
"population of Ward 6 (2008 census)"
Election.ConfigurationContext.setElectorateSizeExplanation(String)JavaScriptIncluder eligibilityScript()
Election.ConfigurationContext.setEligibilityScriptPath(String)
ActivityEvent newChangeEventOrNull(Vote oldVote,
Vote newVote)
public RegionalElectionNode regionalNode()
@ThreadSafe public File configurationFile()
ElectoralServicevotorola-directory/services/service-name/service.js
The language is JavaScript. There are restrictions on the character encoding.
configurationFile in class ElectoralService
public Exception dispatch(String[] argArray,
CommandResponder.Session commandSession)
ElectoralService
dispatch in class ElectoralServiceargArray - an array containing the command name and arguments,
per CommandResponder.respond(argv,session)
CommandResponder.respond(String[],CommandResponder.Session)@ThreadSafe public String summaryDescription()
ElectoralService
summaryDescription in class ElectoralServiceElection.ConfigurationContext.setSummaryDescription(String)@ThreadSafe public String title()
Mayor
Municipal Tax Share (a bill)
Foreign Policy
title in class ElectoralServiceElection.ConfigurationContext.setTitle(String)@ThreadSafe public String snapshotOutputStoreFilebase()
InputStoreMultiple services may share the same base directory. The output files for this particular service will be stored in a subdirectory named after the service: snapshotOutputStoreFilebase/service-name.
snapshotOutputStoreFilebase in interface InputStore@ThreadSafe public VoterInputTable voterInputTable()
InputStore
voterInputTable in interface InputStoreElection.ConfigurationContext.voterInputDatabase()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||