public class CR_Vote extends CommandResponder.Base
Modifier and Type | Class and Description |
---|---|
static class |
CR_Vote.CountTablePVC
A cached view of a count table restricted to a particular poll.
|
static class |
CR_Vote.TracePair
A pair of vote traces: the old trace as of last count, and a projected trace that
takes into consideration the user's subsequent input if any.
|
CommandResponder.AnonymousIssueException, CommandResponder.Base, CommandResponder.Session, CommandResponder.U
keyPrefix, voterService
Constructor and Description |
---|
CR_Vote(PollService _poll)
Constructs a CR_Vote.
|
CR_Vote(PollService _poll,
String _keyPrefix)
Constructs a CR_Vote as a subclass.
|
Modifier and Type | Method and Description |
---|---|
(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.
|
void |
help(CommandResponder.Session session)
Calls U.
|
protected PollService |
poll() |
Exception |
respond(String[] argv,
CommandResponder.Session s)
Responds to an invocation of the command.
|
protected void |
writeVoteAndEcho(String newCandidateEmail,
Vote vote,
CommandResponder.Session session)
Changes the vote and writes it to the database, and appends an echo of the change
to the reply.
|
acceptsAnonymousIssue, canonicalEmail, commandName, compileBaseOptions, parse
CR_Vote(PollService _poll)
CR_Vote(PollService _poll, String _keyPrefix)
public void help(CommandResponder.Session session)
CommandResponder.Base
help
in interface CommandResponder
help
in class CommandResponder.Base
public Exception respond(String[] argv, CommandResponder.Session s)
CommandResponder
argv
- an array comprising the command name (index 0) and any arguments
(indeces 1..*).static HashMap<String,Option> compileOptions(CommandResponder.Session session)
void echoTraces(Vote vote, CommandResponder.Session session) throws IOException, ScriptException, SQLException, XMLStreamException
session
- the session with wrapping turned off in its reply builder.IOException
ScriptException
SQLException
XMLStreamException
protected PollService poll()
protected void writeVoteAndEcho(String newCandidateEmail, Vote vote, CommandResponder.Session session) throws SQLException, VoterInputTable.BadInputException
session
- the session with wrapping turned off in its reply builder.SQLException
VoterInputTable.BadInputException