Removed the last dependency on the obsolete SystemMessages class.
This dependency was left by mistake. We now read all the system messages of the VB from a protobuf file using the StorageManager component.vbdev2
parent
19deec00bb
commit
e9732561f4
|
@ -1,77 +0,0 @@
|
|||
package meerkat.voting.controller;
|
||||
|
||||
import com.google.protobuf.ByteString;
|
||||
import meerkat.protobuf.Voting.*;
|
||||
|
||||
/**
|
||||
* Created by hai on 18/05/16.
|
||||
*/
|
||||
final public class SystemMessages {
|
||||
|
||||
private SystemMessages() {
|
||||
// This is a static class. No instantiation of this is needed.
|
||||
}
|
||||
|
||||
public static UIElement getWaitForCommitMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Please wait while committing to ballot"))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getWaitForAuditMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Please wait while auditing your ballot"))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getWaitForCastMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Please wait while finalizing your ballot for voting"))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getRestartVotingButton() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Restart voting"))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getUnrecognizedFinalizeResponseMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Could not understand response for Cast or Audit. Force restarting."))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getUnsuccessfulChannelChoiceMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Choice of channel was unsuccessful. Force restarting."))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getOutputDeviceFailureMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Ballot output device failure. Force restarting."))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getUnsuccessfulVotingMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Voting was unsuccessful. Force restarting."))
|
||||
.build();
|
||||
}
|
||||
|
||||
public static UIElement getSomethingWrongMessage() {
|
||||
return UIElement.newBuilder()
|
||||
.setType(UIElementDataType.TEXT)
|
||||
.setData(ByteString.copyFromUtf8("Something was terribly wrong. Force restarting."))
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -306,7 +306,7 @@ public class VotingBoothImpl implements VotingBoothController {
|
|||
systemMessages.get(storageManager.OUTPUT_DEVICE_FAILURE_MESSAGE)));
|
||||
}
|
||||
else {
|
||||
ui.notifyVoterToWaitForFinish(SystemMessages.getWaitForCastMessage(),
|
||||
ui.notifyVoterToWaitForFinish(systemMessages.get(storageManager.WAIT_FOR_CAST_MESSAGE),
|
||||
new WaitForFinishCallback(generateRequestIdentifier(),
|
||||
state.currentBallotSerialNumber,
|
||||
this.queue,
|
||||
|
|
Loading…
Reference in New Issue