OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.VoterAllocation
Implementsosid.OsidObject
Used Byosid.voting.VoterAllocationList
osid.voting.VoterAllocationLookupSession
osid.voting.VotingSession
Description

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

MethodgetRaceId
Description

Gets the race Id of the vote.

Returnosid.id.Id the ballot Id
Compliancemandatory This method must be implemented.
MethodgetRace
Description

Gets the race of the vote.

Returnosid.voting.Race the race
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetVoterId
Description

Gets the resource Id.

Returnosid.id.Id a resource Id
Compliancemandatory This method must be implemented.
MethodgetVoter
Description

Gets the Resource.

Returnosid.resource.Resource the resource
ErrorsOPERATION_FAILED unable to complete request
Compliancemandatory This method must be implemented.
MethodgetTotalVotes
Description

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

Returncardinal the number of votes
Compliancemandatory This method must be implemented.
MethodgetMaxVotesPerCandidate
Description

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

Returncardinal the max votes per candidate
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodgetMaxCandidates
Description

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

Returncardinal the maximum candidates
ErrorsILLEGAL_STATE hasMaxCandidates() is false
Compliancemandatory This 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
Compliancemandatory This 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.TypevoterAllocationRecordType the type of the record to retrieve
Returnosid.voting.records.VoterAllocationRecord the voter allocation record
ErrorsNULL_ARGUMENT voterAllocationRecordType is null
OPERATION_FAILED unable to complete request
UNSUPPORTED hasRecordType(voterAllocationRecordType) is false
Compliancemandatory This method must be implemented.