Search in sources :

Example 1 with WitnessMessage

use of com.github.dedis.popstellar.model.objects.WitnessMessage in project popstellar by dedis.

the class ElectionHandler method electionSetupWitnessMessage.

public static WitnessMessage electionSetupWitnessMessage(MessageID messageId, Election election) {
    WitnessMessage message = new WitnessMessage(messageId);
    message.setTitle("New Election Setup");
    message.setDescription("Name : " + election.getName() + "\n" + "Election ID : " + election.getId() + "\n" + "Question : " + election.getElectionQuestions().get(0).getQuestion() + "\n" + "Message ID : " + messageId);
    return message;
}
Also used : WitnessMessage(com.github.dedis.popstellar.model.objects.WitnessMessage)

Example 2 with WitnessMessage

use of com.github.dedis.popstellar.model.objects.WitnessMessage in project popstellar by dedis.

the class LaoHandler method updateLaoNameWitnessMessage.

public static WitnessMessage updateLaoNameWitnessMessage(MessageID messageId, UpdateLao updateLao, Lao lao) {
    WitnessMessage message = new WitnessMessage(messageId);
    message.setTitle("Update Lao Name ");
    message.setDescription("Old Name : " + lao.getName() + "\n" + "New Name : " + updateLao.getName() + "\n" + "Message ID : " + messageId);
    return message;
}
Also used : WitnessMessage(com.github.dedis.popstellar.model.objects.WitnessMessage)

Example 3 with WitnessMessage

use of com.github.dedis.popstellar.model.objects.WitnessMessage in project popstellar by dedis.

the class RollCallHandler method openRollCallWitnessMessage.

public static WitnessMessage openRollCallWitnessMessage(MessageID messageId, RollCall rollCall) {
    WitnessMessage message = new WitnessMessage(messageId);
    message.setTitle("A Roll Call was opened");
    message.setDescription(ROLL_CALL_NAME + rollCall.getName() + "\n" + "Updated ID : " + rollCall.getId() + "\n" + MESSAGE_ID + messageId);
    return message;
}
Also used : WitnessMessage(com.github.dedis.popstellar.model.objects.WitnessMessage)

Example 4 with WitnessMessage

use of com.github.dedis.popstellar.model.objects.WitnessMessage in project popstellar by dedis.

the class RollCallHandler method closeRollCallWitnessMessage.

public static WitnessMessage closeRollCallWitnessMessage(MessageID messageId, RollCall rollCall) {
    WitnessMessage message = new WitnessMessage(messageId);
    message.setTitle("A Roll Call was closed");
    message.setDescription(ROLL_CALL_NAME + rollCall.getName() + "\n" + "Updated ID : " + rollCall.getId() + "\n" + MESSAGE_ID + messageId);
    return message;
}
Also used : WitnessMessage(com.github.dedis.popstellar.model.objects.WitnessMessage)

Example 5 with WitnessMessage

use of com.github.dedis.popstellar.model.objects.WitnessMessage in project popstellar by dedis.

the class RollCallHandler method createRollCallWitnessMessage.

public static WitnessMessage createRollCallWitnessMessage(MessageID messageId, RollCall rollCall) {
    WitnessMessage message = new WitnessMessage(messageId);
    message.setTitle("New Roll Call was created");
    message.setDescription(ROLL_CALL_NAME + rollCall.getName() + "\n" + "Roll Call ID : " + rollCall.getId() + "\n" + "Location : " + rollCall.getLocation() + "\n" + MESSAGE_ID + messageId);
    return message;
}
Also used : WitnessMessage(com.github.dedis.popstellar.model.objects.WitnessMessage)

Aggregations

WitnessMessage (com.github.dedis.popstellar.model.objects.WitnessMessage)13 MessageGeneral (com.github.dedis.popstellar.model.network.method.message.MessageGeneral)6 CloseRollCall (com.github.dedis.popstellar.model.network.method.message.data.rollcall.CloseRollCall)4 CreateRollCall (com.github.dedis.popstellar.model.network.method.message.data.rollcall.CreateRollCall)4 OpenRollCall (com.github.dedis.popstellar.model.network.method.message.data.rollcall.OpenRollCall)4 RollCall (com.github.dedis.popstellar.model.objects.RollCall)4 Test (org.junit.Test)4 UpdateLao (com.github.dedis.popstellar.model.network.method.message.data.lao.UpdateLao)3 ElectionSetup (com.github.dedis.popstellar.model.network.method.message.data.election.ElectionSetup)2 StateLao (com.github.dedis.popstellar.model.network.method.message.data.lao.StateLao)2 Channel (com.github.dedis.popstellar.model.objects.Channel)2 Election (com.github.dedis.popstellar.model.objects.Election)2 Lao (com.github.dedis.popstellar.model.objects.Lao)2 MessageID (com.github.dedis.popstellar.model.objects.security.MessageID)2 RollCallHandler.closeRollCallWitnessMessage (com.github.dedis.popstellar.utility.handler.data.RollCallHandler.closeRollCallWitnessMessage)2 RollCallHandler.createRollCallWitnessMessage (com.github.dedis.popstellar.utility.handler.data.RollCallHandler.createRollCallWitnessMessage)2 RollCallHandler.openRollCallWitnessMessage (com.github.dedis.popstellar.utility.handler.data.RollCallHandler.openRollCallWitnessMessage)2 Manifest (android.Manifest)1 Application (android.app.Application)1 PackageManager (android.content.pm.PackageManager)1