Some small changes according to code review
parent
0fa5d4094a
commit
d1bc0d7c84
|
@ -8,22 +8,18 @@ import meerkat.protobuf.Voting.*;
|
|||
public interface VotingBooth {
|
||||
|
||||
/**
|
||||
* setting all the different components of the Voting Booth to be recognized by this controller
|
||||
* initialize using the BoothParams protobuf and sett all the different components of the Voting Booth to be recognized by this controller
|
||||
* @param boothParams
|
||||
* @param outputDevice the ballot output device. Naturally a printer and/or ethernet connection
|
||||
* @param vbEncryptor the encryption module
|
||||
* @param vbUI User interface in which the voter chooses his answers
|
||||
* @param vbStorageManager storage component for handling files and USB sticks
|
||||
*/
|
||||
public void setComponenets (BallotOutputDevice outputDevice,
|
||||
VotingBoothEncryptor vbEncryptor,
|
||||
VotingBoothUI vbUI,
|
||||
StorageManager vbStorageManager);
|
||||
|
||||
/**
|
||||
* initialize using the BoothParams protobuf
|
||||
* @param boothParams
|
||||
*/
|
||||
public void initBoothParams (BoothParams boothParams);
|
||||
public void init (BoothParams boothParams,
|
||||
BallotOutputDevice outputDevice,
|
||||
VotingBoothEncryptor vbEncryptor,
|
||||
VotingBoothUI vbUI,
|
||||
StorageManager vbStorageManager);
|
||||
|
||||
/**
|
||||
* set the voting questions
|
||||
|
|
|
@ -8,7 +8,7 @@ import meerkat.protobuf.Voting.*;
|
|||
*/
|
||||
public interface VotingBoothUI {
|
||||
|
||||
enum FinalizeBallotChoice {
|
||||
public static enum FinalizeBallotChoice {
|
||||
CAST,
|
||||
AUDIT
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public interface VotingBoothUI {
|
|||
* @param question a question to determine the right voting channel for this voter
|
||||
* @param callback that's where we store the channel for the current voter
|
||||
*/
|
||||
public void chooseChannel (BallotQuestion question, FutureCallback<Integer> callback);
|
||||
public void chooseChannel (BallotQuestion question, FutureCallback<BallotAnswer> callback);
|
||||
|
||||
/**
|
||||
* Presents the set of questions to the voter. Collect all his responses.
|
||||
|
@ -50,14 +50,14 @@ public interface VotingBoothUI {
|
|||
* @param message a message to show the user on the UI device while waiting
|
||||
* @param callback a success return value of the wait (cancelling returns false)
|
||||
*/
|
||||
public void askVoterToWaitForFinish (String message, FutureCallback<Boolean> callback);
|
||||
public void notifyVoterToWaitForFinish (UIElement message, FutureCallback<Boolean> callback);
|
||||
|
||||
/**
|
||||
* show a fatal error message in the UI. Halts system. Waits for administrator interrupt or reset
|
||||
* @param errorMessage message to show in UI device
|
||||
* @param callback returns interrupt
|
||||
*/
|
||||
public void showErrorMessageAndHalt (String errorMessage, FutureCallback<Boolean> callback);
|
||||
public void showErrorMessageAndHalt (UIElement errorMessage, FutureCallback<Boolean> callback);
|
||||
|
||||
/**
|
||||
* show an error message and let user press his chosen button for continuation
|
||||
|
@ -65,7 +65,7 @@ public interface VotingBoothUI {
|
|||
* @param buttonLabels labels for buttons to present to voter
|
||||
* @param callback the number of the selected button
|
||||
*/
|
||||
public void showErrorMessageWithButtons (String errorMessage, String[] buttonLabels,
|
||||
public void showErrorMessageWithButtons (UIElement errorMessage, UIElement[] buttonLabels,
|
||||
FutureCallback<Integer> callback);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue