OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.VoterAllocation
Implementsosid.OsidObject
Description

An allocation of votes for an individual resource or a resource group.

MethodgetRaceId
Description

Gets the race Id of the vote.

Returnosid.id.Idthe ballot Id
CompliancemandatoryThis method must be implemented.
MethodgetRace
Description

Gets the race of the vote.

Returnosid.voting.Racethe race
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetVoterId
Description

Gets the resource Id.

Returnosid.id.Ida resource Id
CompliancemandatoryThis method must be implemented.
MethodgetVoter
Description

Gets the Resource.

Returnosid.resource.Resourcethe resource
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetTotalVotes
Description

Gets the total number of votes the resource can cast in this race.

Returncardinalthe number of votes
CompliancemandatoryThis method must be implemented.
MethodgetMaxVotesPerCandidate
Description

Gets the maximum votes per candidate the resource can cast in this race.

Returncardinalthe max votes per candidate
CompliancemandatoryThis method must be implemented.
MethodhasMaxCandidates
Description

Tests if this resource can vote for a limited number of candidates.

Returnboolean true if a limit on the number of candidates exists, false if no limit exists
CompliancemandatoryThis method must be implemented.
MethodgetMaxCandidates
Description

Gets the maximum number of candidates for which this resource can vote.

Returncardinalthe maximum candidates
ErrorsILLEGAL_STATE hasMaxCandidates() is false
CompliancemandatoryThis method must be implemented.
MethodreallocatesVotesWhenCandidateDrops
Description

Tests if this resource gets the number of votes cast for a candidate when the candidate is no longer running in a race.

Returnboolean true if votes are returned to the resource when the candidate drops from the race, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocationRecord
Description

Gets the voter allocation record corresponding to the given VoterAllocation record Type. This method is used to retrieve an object implementing the requested record. The voterAllocationRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(voterAllocationRecordType) is true .

Parametersosid.type.TypevoterAllocationRecordTypethe type of the record to retrieve
Returnosid.voting.records.VoterAllocationRecordthe voter allocation record
ErrorsNULL_ARGUMENT voterAllocationRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(voterAllocationRecordType) is false
CompliancemandatoryThis method must be implemented.