OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.RaceResultsSession
Implementsosid.OsidSession
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.

Returnboolean true 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.

Returnboolean false 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.IdballotId Id of the Ballot
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND ballotId not found
NULL_ARGUMENT ballotId 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.IdballotId Id of the Ballot
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND ballotId not found
NULL_ARGUMENT ballotId 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.IdraceId Id of the Race
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND raceId not found
NULL_ARGUMENT raceId 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.IdraceId Id of the Race
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND raceId not found
NULL_ARGUMENT raceId 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.IdraceId Id of the Race
osid.id.IdcandidateId Id of the Candidate
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND candidateId not in raceId
NULL_ARGUMENT raceId 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.IdresourceId Id of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND resourceId not found
NULL_ARGUMENT resourceId 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.IdresourceId Id of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND resourceId not found
NULL_ARGUMENT resourceId 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.IdraceId Id of the Race
osid.id.IdresourceId Id of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND raceId not found
NULL_ARGUMENT raceId 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.IdraceId Id of the Race
osid.id.IdresourceId Id of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND raceId not found
NULL_ARGUMENT raceId 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.IdraceId Id of the Race
osid.id.IdcandidateId Id of the Candidate
osid.id.IdresourceId Id of a Resource
Returnosid.voting.RaceResultListthe race results
ErrorsNOT_FOUND candidateId not in raceId
NULL_ARGUMENT raceId, candidateId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.