ch.openchvote.inspectionclient.plain.EventContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of inspection-client Show documentation
Show all versions of inspection-client Show documentation
This module implements the 'verification client' party of the CHVote protocol.
The newest version!
/*
* Copyright (C) 2024 Berner Fachhochschule https://e-voting.bfh.ch
*
* - This program is free software: you can redistribute it and/or modify -
* - it under the terms of the GNU Affero General Public License as published by -
* - the Free Software Foundation, either version 3 of the License, or -
* - (at your option) any later version. -
* - -
* - This program is distributed in the hope that it will be useful, -
* - but WITHOUT ANY WARRANTY; without even the implied warranty of -
* - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -
* - GNU General Public License for more details. -
* - -
* - You should have received a copy of the GNU Affero General Public License -
* - along with this program. If not, see . -
*/
package ch.openchvote.inspectionclient.plain;
import ch.openchvote.framework.party.State;
import ch.openchvote.inspectionclient.plain.states.S600;
import ch.openchvote.utilities.serializer.TypeReference;
import ch.openchvote.utilities.tuples.Sextuple;
/**
* Instances of this class represent the election inspection client's event context. The private constructor
* {@link EventContext#EventContext(String, String, String)} defines the inspection client's initial state and its
* public and secret event data. The framework calls this constructor using reflection.
*/
@SuppressWarnings("unused")
public final class EventContext extends ch.openchvote.framework.party.EventContext {
@SuppressWarnings("MissingJavadoc")
static public final TypeReference> TYPE_REFERENCE = new TypeReference<>() {
};
// private constructor for an empty event context set to the initial state
private EventContext(String eventId, String protocolId, String securityLevel) {
this(eventId, protocolId, securityLevel, State.getId(S600.class), new PublicData(), new SecretData());
}
// private constructor for initializing all fields
private EventContext(String eventId, String protocolId, String securityLevel, String stateId, PublicData publicData, SecretData secretData) {
super(eventId, protocolId, securityLevel, stateId, publicData, secretData);
}
// private copy constructor
private EventContext(EventContext eventContext) {
super(eventContext);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy