Interface | osid.voting.VotingSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session provides methods for voting on a ballot. | ||
Method | getPollsId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Polls Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getPolls | ||
Description |
Gets the | ||
Return | osid.voting.Polls | the polls | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | isOpen | ||
Description |
Tests if this ballot is open. | ||
Return | boolean | true if the ballot is open, false otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | canVote | ||
Description |
Tests if this user can vote. 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 | ||
Return | boolean | false if voting methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | getRace | ||
Description |
Gets a race. | ||
Parameters | osid.id.Id | raceId | Id of the Race |
Return | osid.voting.Race | the race | |
Errors | NOT_FOUND | raceId not found | |
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getRacesForBallot | ||
Description |
Gets all | ||
Parameters | osid.id.Id | ballotId | Id of the Ballot |
Return | osid.voting.RaceList | the races | |
Errors | NOT_FOUND | ballotId not found | |
NULL_ARGUMENT | ballotId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getMyUncastRacesForBallot | ||
Description |
Gets all | ||
Parameters | osid.id.Id | ballotId | Id of the Ballot |
Return | osid.voting.RaceList | the uncast races | |
Errors | NOT_FOUND | ballotId not found | |
NULL_ARGUMENT | ballotId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canVoteWithRecordTypes | ||
Description |
Tests if this user can create a single | ||
Parameters | osid.id.Id | raceId | a race Id |
osid.type.Type[] | voteRecordTypes | array of vote record types | |
Return | boolean | true if Vote creation using the specified
record Types is supported, false otherwise | |
Errors | NULL_ARGUMENT | ballotId or voteRecordTypes is null
| |
Compliance | mandatory | This method must be implemented. | |
Method | getVotingAllocation | ||
Description |
Gets the voter allocation for a race. | ||
Parameters | osid.id.Id | raceId | Id of the Race |
Return | osid.voting.VoterAllocation | the allocation | |
Errors | NOT_FOUND | raceId not found | |
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getVoteForm | ||
Description |
Gets a vote form for a race. | ||
Parameters | osid.id.Id | raceId | Id of the Race |
osid.id.Id | candidateId | a candidate | |
osid.type.Type[] | voteRecordTypes | array of vote record types | |
Return | osid.voting.VoteForm | the race | |
Errors | NOT_FOUND | raceId or candidateId not found | |
NULL_ARGUMENT | raceId, candidateId, or voteRecordTypes is
null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | cannot get form with requested record types | ||
Compliance | mandatory | This method is must be implemented. | |
Method | vote | ||
Description |
Votes for a candidate in a race. | ||
Parameters | osid.voting.VoteForm | voteForm | the vote form |
Return | osid.voting.Vote | the vote | |
Errors | ILLEGAL_STATE | voteForm already used in a voting transaction | |
INVALID_ARGUMENT | form is invalid | ||
NULL_ARGUMENT | voteForm is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
UNSUPPORTED | voteForm did not originate from getVoteForm() | ||
Compliance | mandatory | This method must be implemented. | |
Method | getMyVotesForBallot | ||
Description |
Gets all my | ||
Parameters | osid.id.Id | ballotId | a ballot |
Return | osid.voting.VoteList | the votes | |
Errors | NOT_FOUND | ballotId is not found | |
NULL_ARGUMENT | ballotId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getMyVotesForRace | ||
Description |
Gets all my | ||
Parameters | osid.id.Id | raceId | a race |
Return | osid.voting.VoteList | the votes | |
Errors | NOT_FOUND | raceId is not found | |
NULL_ARGUMENT | raceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canRevote | ||
Description |
Tests if this user can change a vote by deleting a vote and voting again. | ||
Parameters | osid.id.Id | ballotId | a ballot |
Return | boolean | true if changing a vote is permitted, false
otherwise | |
Errors | NOT_FOUND | ballotId is not found | |
NULL_ARGUMENT | ballotId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | deleteMyVote | ||
Description |
Deletes a vote in a race. | ||
Parameters | osid.id.Id | voteId | a vote |
Errors | ILLEGAL_STATE | canRevote() is false | |
NOT_FOUND | voteId is not found | ||
NULL_ARGUMENT | voteId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |