OSID Logo
OSID Specifications
voting package
Version 3.0.0
Interfaceosid.voting.RaceResultsSession
Implementsosid.OsidSession
Used Byosid.voting.VotingManager
osid.voting.VotingProxyManager
Description

This session provides methods for examining voting results.

MethodgetPollsId
Description

Gets the Polls Id associated with this session.

Returnosid.id.Idthe Polls Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Pollsthe polls
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodisOpen
Description

Tests if this ballot is still open.

Returnbooleantrue if the ballot is open, false otherwise
CompliancemandatoryThis method must be implemented.
MethodcanExamineRaceResults
Description

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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer relationship operations.

Returnbooleanfalse if race results methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRaceResultsForBalot
Description

Gets all race results on a ballot.

Parametersosid.id.IdballotIdId of the Ballot
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDballotId not found
NULL_ARGUMENTballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetWinningRaceResultsForBallot
Description

Gets the winning race results for each race on a ballot.

Parametersosid.id.IdballotIdId of the Ballot
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDballotId not found
NULL_ARGUMENTballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetRaceResultsForRace
Description

Gets all race results in a race ordered from the most votes to the fewest votes.

Parametersosid.id.IdraceIdId of the Race
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDraceId not found
NULL_ARGUMENTraceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetWinningRaceResultsForRace
Description

Gets the winning race results in a race.

Parametersosid.id.IdraceIdId of the Race
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDraceId not found
NULL_ARGUMENTraceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetRaceResultsForCandidate
Description

Gets the race results for a candidate in a race.

Parametersosid.id.IdraceIdId of the Race
osid.id.IdcandidateIdId of the Candidate
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDcandidateId not in raceId
NULL_ARGUMENTraceId or candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetRaceResultsByVoter
Description

Gets all race results on this ballot by voter.

Parametersosid.id.IdresourceIdId of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDresourceId not found
NULL_ARGUMENTresourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetTopRaceResultsByVoter
Description

Gets the top race results for each race by voter,

Parametersosid.id.IdresourceIdId of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDresourceId not found
NULL_ARGUMENTresourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetRaceResultsByVoterForRace
Description

Gets all race results by a resource in a race ordered from the most votes to the fewest votes.

Parametersosid.id.IdraceIdId of the Race
osid.id.IdresourceIdId of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDraceId not found
NULL_ARGUMENTraceId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetWinningRaceResultsByVoterForRace
Description

Gets the winning race results by a resource in a race ordered from the most votes to the fewest votes.

Parametersosid.id.IdraceIdId of the Race
osid.id.IdresourceIdId of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDraceId not found
NULL_ARGUMENTraceId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetRaceResultsByVoterForCandidate
Description

Gets the race results by voter for a candidate in a race.

Parametersosid.id.IdraceIdId of the Race
osid.id.IdcandidateIdId of the Candidate
osid.id.IdresourceIdId of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUNDcandidateId not in raceId
NULL_ARGUMENTraceId , candidateId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.