|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectCommandResponder.Base
CR_Vote
public class CR_Vote
Responder for the command 'vote' - to cast a vote in an election.
| Nested Class Summary | |
|---|---|
(package private) static class |
CR_Vote.CachedCountNodeTable
A count-node table that caches its nodes. |
(package private) static class |
CR_Vote.TracePair
A pair of vote traces: the old trace, as of last count; and a newly projected trace, based on the voter's subsequent input (if any). |
| Nested classes/interfaces inherited from interface CommandResponder |
|---|
CommandResponder.AnonymousIssueException, CommandResponder.Base, CommandResponder.Session, CommandResponder.X |
| Field Summary |
|---|
| Fields inherited from class CommandResponder.Base |
|---|
electoralService, keyPrefix |
| Constructor Summary | |
|---|---|
CR_Vote(Election election)
Constructs a CR_Vote. |
|
CR_Vote(Election election,
String keyPrefix)
Constructs a CR_Vote as a subclass. |
|
| Method Summary | |
|---|---|
protected void |
commitVoteAndEcho(String newCandidateEmail,
Vote vote,
CommandResponder.Session session)
Changes and commits the voter's vote, and appends an echo of the change to the reply. |
(package private) static HashMap<String,Option> |
compileOptions(CommandResponder.Session session)
Compiles a map of launch options. |
(package private) void |
echoTraces(Vote vote,
CommandResponder.Session session)
Appends vote traces to the reply. |
protected Election |
election()
|
(package private) static String |
finalRecipientOrNobody(CountNode[] trace,
ResourceBundle b)
|
void |
help(CommandResponder.Session session)
Calls X. |
Exception |
respond(String[] argv,
CommandResponder.Session session)
Responds to an invocation of the command. |
| Methods inherited from class CommandResponder.Base |
|---|
acceptsAnonymousIssue, canonicalEmail, commandName, compileBaseOptions, parse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
CR_Vote(Election election)
CR_Vote(Election election,
String keyPrefix)
| Method Detail |
|---|
public void help(CommandResponder.Session session)
CommandResponder.Base
help in interface CommandResponderhelp in class CommandResponder.Base
public Exception respond(String[] argv,
CommandResponder.Session session)
CommandResponder
argv - array of command name (index 0)
and any arguments (indeces 1..*)
protected void commitVoteAndEcho(String newCandidateEmail,
Vote vote,
CommandResponder.Session session)
throws SQLException,
VoterInputTable.BadInputException
session - with wrapping turned off in its reply builder
SQLException
VoterInputTable.BadInputExceptionstatic HashMap<String,Option> compileOptions(CommandResponder.Session session)
void echoTraces(Vote vote,
CommandResponder.Session session)
throws IOException,
NoSuchMethodException,
ScriptException,
SQLException
session - with wrapping turned off in its reply builder
IOException
NoSuchMethodException
ScriptException
SQLExceptionprotected Election election()
static String finalRecipientOrNobody(CountNode[] trace,
ResourceBundle b)
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||