Interface RaceResultsSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for examining voting results.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can examine race results.getPolls()Gets thePollsassociated with this session.Gets thePollsIdassociated with this session.getRaceResultsByVoter(Id resourceId) Gets all race results on this ballot by voter.getRaceResultsByVoterForCandidate(Id raceId, Id candidateId, Id resourceId) Gets the race results by voter for a candidate in a race.getRaceResultsByVoterForRace(Id raceId, Id resourceId) Gets all race results by a resource in a race ordered from the most votes to the fewest votes.getRaceResultsForBalot(Id ballotId) Gets all race results on a ballot.getRaceResultsForCandidate(Id raceId, Id candidateId) Gets the race results for a candidate in a race.getRaceResultsForRace(Id raceId) Gets all race results in a race ordered from the most votes to the fewest votes.getTopRaceResultsByVoter(Id resourceId) Gets the top race results for each race by voter,getWinningRaceResultsByVoterForRace(Id raceId, Id resourceId) Gets the winning race results by a resource in a race ordered from the most votes to the fewest votes.getWinningRaceResultsForBallot(Id ballotId) Gets the winning race results for each race on a ballot.getWinningRaceResultsForRace(Id raceId) Gets the winning race results in a race.booleanisOpen()Tests if this ballot is still open.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getPollsId
Id getPollsId()Gets thePollsIdassociated with this session.- Returns:
- the
Polls Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getPolls
Gets thePollsassociated with this session.- Returns:
- the polls
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
isOpen
boolean isOpen()Tests if this ballot is still open.- Returns:
trueif the ballot is open,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
canExamineRaceResults
boolean canExamineRaceResults()Tests if this user can examine race results. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer relationship operations.- Returns:
falseif race results methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
getRaceResultsForBalot
RaceResultList getRaceResultsForBalot(Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all race results on a ballot.- Parameters:
ballotId-Idof theBallot- Returns:
- the race results
- Throws:
NotFoundException-ballotIdnot foundNullArgumentException-ballotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getWinningRaceResultsForBallot
RaceResultList getWinningRaceResultsForBallot(Id ballotId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the winning race results for each race on a ballot.- Parameters:
ballotId-Idof theBallot- Returns:
- the race results
- Throws:
NotFoundException-ballotIdnot foundNullArgumentException-ballotIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRaceResultsForRace
RaceResultList getRaceResultsForRace(Id raceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all race results in a race ordered from the most votes to the fewest votes.- Parameters:
raceId-Idof theRace- Returns:
- the race results
- Throws:
NotFoundException-raceIdnot foundNullArgumentException-raceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getWinningRaceResultsForRace
RaceResultList getWinningRaceResultsForRace(Id raceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the winning race results in a race.- Parameters:
raceId-Idof theRace- Returns:
- the race results
- Throws:
NotFoundException-raceIdnot foundNullArgumentException-raceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRaceResultsForCandidate
RaceResultList getRaceResultsForCandidate(Id raceId, Id candidateId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the race results for a candidate in a race.- Parameters:
raceId-Idof theRacecandidateId-Idof theCandidate- Returns:
- the race results
- Throws:
NotFoundException-candidateIdnot inraceIdNullArgumentException-raceId orcandidateId isnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRaceResultsByVoter
RaceResultList getRaceResultsByVoter(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all race results on this ballot by voter.- Parameters:
resourceId-Idof aResource- Returns:
- the race results
- Throws:
NotFoundException-resourceIdnot foundNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getTopRaceResultsByVoter
RaceResultList getTopRaceResultsByVoter(Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the top race results for each race by voter,- Parameters:
resourceId-Idof aResource- Returns:
- the race results
- Throws:
NotFoundException-resourceIdnot foundNullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRaceResultsByVoterForRace
RaceResultList getRaceResultsByVoterForRace(Id raceId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets all race results by a resource in a race ordered from the most votes to the fewest votes.- Parameters:
raceId-Idof theRaceresourceId-Idof aResource- Returns:
- the race results
- Throws:
NotFoundException-raceIdnot foundNullArgumentException-raceIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getWinningRaceResultsByVoterForRace
RaceResultList getWinningRaceResultsByVoterForRace(Id raceId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the winning race results by a resource in a race ordered from the most votes to the fewest votes.- Parameters:
raceId-Idof theRaceresourceId-Idof aResource- Returns:
- the race results
- Throws:
NotFoundException-raceIdnot foundNullArgumentException-raceIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getRaceResultsByVoterForCandidate
RaceResultList getRaceResultsByVoterForCandidate(Id raceId, Id candidateId, Id resourceId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets the race results by voter for a candidate in a race.- Parameters:
raceId-Idof theRacecandidateId-Idof theCandidateresourceId-Idof aResource- Returns:
- the race results
- Throws:
NotFoundException-candidateIdnot inraceIdNullArgumentException-raceId, candidateId orresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-