|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectElectoralService
Register
@ThreadRestricted(value="holds lock()") public final class Register
A register, provided as a formal electoral service.
| Nested Class Summary | |
|---|---|
static class |
Register.ConfigurationContext
A context for configuring a register. |
| Field Summary |
|---|
| Fields inherited from class ElectoralService |
|---|
configurationContext, lock, name, serviceEmail, subserverRun |
| Method Summary | |
|---|---|
(package private) File |
configurationDirectory()
The directory containing this register's configuration files. |
File |
configurationFile()
The primary configuration file for this electoral service. |
Exception |
dispatch(String[] argArray,
CommandResponder.Session commandSession)
Looks up the responder of the specified command, and sends the command to it. |
DoubtSignal.Table |
doubtTable()
The relational store of doubt signals, backing this register's doubt signaling network. |
(package private) long |
electorateSize()
The estimated size of the electorate, if known. |
(package private) String |
electorateSizeExplanation()
An explanation of the estimate of the size of the electorate, for the information of users. |
String |
fieldDescription_link()
A brief description of the allowable content of this register's link field, in sentence form. |
String |
fieldDescription_name()
A brief description of the allowable content of this register's name field, in sentence form. |
String |
fieldDescription_note()
A brief description of the allowable content of this register's note field, in sentence form. |
String |
fieldDescription_residence()
A brief description of the allowable content of this register's residence field, in sentence form. |
String |
fieldExample_link()
An example of the allowable content for this register's link field. |
String |
fieldExample_name()
An example of the allowable content for this register's name field. |
String |
fieldExample_note()
An example of the allowable content for this register's note field. |
String |
fieldExample_residence()
An example of the allowable content for this register's residence field. |
Geocode.GoogleGeocoding |
geocodingMethod()
The geocoding method, for conversion of addresses to cartographic coordinates in the trust script. |
ListNode |
getListNode(VoterList list,
String voterEmail)
Retrieves a voter's list node from a compiled voter list. |
Database |
listDatabase()
Database for mounting the relational parts of this register's compiled voter lists, and its doubt table -- a reference to a shared instance (not thread safe). |
JavaScriptIncluder |
listScript()
The script 'list.js', for configuring the compilation of voter lists. |
String |
listSummaryDescription()
The summary description for newly compiled voter lists. |
VoterList |
listToReport()
Returns the current voter list to report, if any. |
static Register |
newRegister(ElectoralSubserver.Run subserverRun,
JavaScriptIncluder s)
Constructs a Register. |
int |
preRegistrationTrustLevel()
The minimum level of trust that a registrant must have, in order to pre-register another registrant. |
(package private) List<TrustEdge.Primary> |
primaryTrustList()
The configured list of primary trust edges, for the neighbourhood trust network. |
File |
readyToReportLink()
Returns the symbolic link to the ready directory of the current voter list to report, if any. |
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 electoral register, in title case. |
JavaScriptIncluder |
trustScript()
The script 'trust.js', for restricting the scope of trust edges among voters. |
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 Register newRegister(ElectoralSubserver.Run subserverRun,
JavaScriptIncluder s)
throws ScriptException,
SQLException
s - the compiled configuration script
ScriptException
SQLException@ThreadSafe File configurationDirectory()
@ThreadSafe public DoubtSignal.Table doubtTable()
listDatabase()@ThreadSafe long electorateSize()
Register.ConfigurationContext.setElectorateSize(long)@ThreadSafe String electorateSizeExplanation()
"population of region (2008 census)"
Register.ConfigurationContext.setElectorateSizeExplanation(String)@ThreadSafe public String fieldDescription_link()
Register.ConfigurationContext.setFieldDescription_link(String)@ThreadSafe public String fieldExample_link()
Register.ConfigurationContext.setFieldExample_link(String)@ThreadSafe public String fieldDescription_name()
Register.ConfigurationContext.setFieldDescription_name(String)@ThreadSafe public String fieldExample_name()
Register.ConfigurationContext.setFieldExample_name(String)@ThreadSafe public String fieldDescription_note()
Register.ConfigurationContext.setFieldDescription_note(String)@ThreadSafe public String fieldExample_note()
Register.ConfigurationContext.setFieldExample_note(String)@ThreadSafe public String fieldDescription_residence()
Register.ConfigurationContext.setFieldDescription_residence(String)@ThreadSafe public String fieldExample_residence()
Register.ConfigurationContext.setFieldExample_residence(String)@ThreadSafe public Geocode.GoogleGeocoding geocodingMethod()
Register.ConfigurationContext.setGeocodingMethodGoogle(String)
@ThreadSafe
public ListNode getListNode(VoterList list,
String voterEmail)
throws IOException,
SQLException
list - the voter list to use; or null, to lookup the currently
reported list (which involves locking overhead
in threaded runs)
IOException
SQLException@ThreadSafe public Database listDatabase()
Although this method is thread safe, the object it returns is not; it has its own thread-saftety restrictions, q.v.
doubtTable(),
listToReport(),
Register.ConfigurationContext.listDatabase()public JavaScriptIncluder listScript()
@ThreadSafe public String listSummaryDescription()
VoterList.summaryDescription(),
Register.ConfigurationContext.setListSummaryDescription(String)
public VoterList listToReport()
throws IOException
IOExceptionreadyToReportLink()@ThreadSafe public int preRegistrationTrustLevel()
Registration.isWriteableAll(),
Register.ConfigurationContext.setPreRegistrationTrustLevel(int)List<TrustEdge.Primary> primaryTrustList()
Register.ConfigurationContext.addPrimaryTrust(String,int)@ThreadSafe public File readyToReportLink()
listToReport()public JavaScriptIncluder trustScript()
@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 ElectoralServiceRegister.ConfigurationContext.setSummaryDescription(String)@ThreadSafe public String title()
title in class ElectoralServiceRegister.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 InputStoreRegister.ConfigurationContext.voterInputDatabase()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||