Interface | osid.voting.VoterAllocationLookupSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session provides methods for looking up voter allocations. This session defines views that offer differing behaviors when retrieving multiple objects.
| ||
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 | canLookupVoterAllocations | ||
Description |
Tests if this user can access voter allocations. 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 voter allocation lookup methods are not authorized,
true otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | useComparativeVoterAllocationView | ||
Description |
The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | usePlenaryVoterAllocationView | ||
Description |
A complete view of the voter allocation returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getVoterAllocation | ||
Description |
Gets a | ||
Parameters | osid.id.Id | raceId | Id of the Race |
osid.id.Id | resourceId | Id of the Resource | |
Return | osid.voting.VoterAllocation | the voter allocation | |
Errors | NOT_FOUND | raceId or resourceId not found | |
NULL_ARGUMENT | raceId or resourceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getVoterAllocationsByRecordType | ||
Description |
Gets the voter allocations for the voter allocation record type. In plenary mode, the returned list contains all known allocations or an error results. Otherwise, the returned list may contain only those allocations that are accessible through this session. | ||
Parameters | osid.type.Type | voterAllocationRecordType | a voter allocation record type |
Return | osid.voting.VoterAllocationList | the voter allocations | |
Errors | NULL_ARGUMENT | voterAllocationRecordType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getVoterAllocationsByRace | ||
Description |
Gets the | ||
Parameters | osid.id.Id | raceId | Id of a Race |
Return | osid.voting.VoterAllocationList | the voter allocations | |
Errors | NOT_FOUND | candidateId is not found | |
NULL_ARGUMENT | candidateId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getVoterAllocationsByVoter | ||
Description |
Gets the | ||
Parameters | osid.id.Id | resourceId | Id of a Resource |
Return | osid.voting.VoterAllocationList | the voter allocations | |
Errors | NOT_FOUND | resourceId is not found | |
NULL_ARGUMENT | resourceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getVoterAllocationsByVoterForBallot | ||
Description |
Gets the | ||
Parameters | osid.id.Id | ballotId | Id of a Ballot |
osid.id.Id | resourceId | Id of a Resource | |
Return | osid.voting.VoterAllocationList | the voter allocations | |
Errors | NOT_FOUND | ballotId or resourceId is not found | |
NULL_ARGUMENT | ballotId or resourceId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getVoterAllocations | ||
Description |
Gets all | ||
Return | osid.voting.VoterAllocationList | the voter allocations | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |