Interface | osid.voting.VoterAllocation | ||
---|---|---|---|
Implements | osid.OsidObject | ||
Description |
An allocation of votes for an individual resource or a resource group. | ||
Method | getRaceId | ||
Description |
Gets the race | ||
Return | osid.id.Id | the ballot Id | |
Compliance | mandatory | This method must be implemented. | |
Method | getRace | ||
Description |
Gets the race of the vote. | ||
Return | osid.voting.Race | the race | |
Errors | OPERATION_FAILED | unable to complete request | |
Compliance | mandatory | This method must be implemented. | |
Method | getVoterId | ||
Description |
Gets the resource | ||
Return | osid.id.Id | a resource Id | |
Compliance | mandatory | This method must be implemented. | |
Method | getVoter | ||
Description |
Gets the | ||
Return | osid.resource.Resource | the resource | |
Errors | OPERATION_FAILED | unable to complete request | |
Compliance | mandatory | This method must be implemented. | |
Method | getTotalVotes | ||
Description |
Gets the total number of votes the resource can cast in this race. | ||
Return | cardinal | the number of votes | |
Compliance | mandatory | This method must be implemented. | |
Method | getMaxVotesPerCandidate | ||
Description |
Gets the maximum votes per candidate the resource can cast in this race. | ||
Return | cardinal | the max votes per candidate | |
Compliance | mandatory | This method must be implemented. | |
Method | hasMaxCandidates | ||
Description |
Tests if this resource can vote for a limited number of candidates. | ||
Return | boolean | true if a limit on the number of candidates exists,
false if no limit exists | |
Compliance | mandatory | This method must be implemented. | |
Method | getMaxCandidates | ||
Description |
Gets the maximum number of candidates for which this resource can vote. | ||
Return | cardinal | the maximum candidates | |
Errors | ILLEGAL_STATE | hasMaxCandidates() is false | |
Compliance | mandatory | This method must be implemented. | |
Method | reallocatesVotesWhenCandidateDrops | ||
Description |
Tests if this resource gets the number of votes cast for a candidate when the candidate is no longer running in a race. | ||
Return | boolean | true if votes are returned to the resource when the
candidate drops from the race, false otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getVoterAllocationRecord | ||
Description |
Gets the voter allocation record corresponding to the
given | ||
Parameters | osid.type.Type | voterAllocationRecordType | the type of the record to retrieve |
Return | osid.voting.records.VoterAllocationRecord | the voter allocation record | |
Errors | NULL_ARGUMENT | voterAllocationRecordType is null | |
OPERATION_FAILED | unable to complete request | ||
UNSUPPORTED | hasRecordType(voterAllocationRecordType) is false
| ||
Compliance | mandatory | This method must be implemented. |