package pl.rozart.uvote.service;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import pl.rozart.uvote.model.Election;
import pl.rozart.uvote.model.Elector;

public interface VoteTokenService {
    void deactiveVoteTokensForElectionId(Long electionId);
    void registerToken(Election election, Elector elector);

    boolean validateToken(String token, String electorHash, Long electionId);

    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    void deactivateToken(String token);
}
