OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.VoterAllocationLookupSession
Implementsosid.OsidSession
Description

This session provides methods for looking up voter allocations.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
MethodgetPollsId
Description

Gets the Polls Id associated with this session.

Returnosid.id.Idthe Polls Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Pollsthe polls
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupVoterAllocations
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 PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer relationship operations.

Returnboolean false if voter allocation lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeVoterAllocationView
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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryVoterAllocationView
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.

CompliancemandatoryThis method is must be implemented.
MethodgetVoterAllocation
Description

Gets a VoterAllocation specified by the race and voter.

Parametersosid.id.IdraceId Id of the Race
osid.id.IdresourceId Id of the Resource
Returnosid.voting.VoterAllocationthe voter allocation
ErrorsNOT_FOUND raceId or resourceId not found
NULL_ARGUMENT raceId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetVoterAllocationsByRecordType
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.

Parametersosid.type.TypevoterAllocationRecordTypea voter allocation record type
Returnosid.voting.VoterAllocationListthe voter allocations
ErrorsNULL_ARGUMENT voterAllocationRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocationsByRace
Description

Gets the VoterAllocations in a race.

Parametersosid.id.IdraceId Id of a Race
Returnosid.voting.VoterAllocationListthe voter allocations
ErrorsNOT_FOUND candidateId is not found
NULL_ARGUMENT candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocationsByVoter
Description

Gets the VoterAllocations for a voter.

Parametersosid.id.IdresourceId Id of a Resource
Returnosid.voting.VoterAllocationListthe voter allocations
ErrorsNOT_FOUND resourceId is not found
NULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocationsByVoterForBallot
Description

Gets the VoterAllocations for a voter on a ballot.

Parametersosid.id.IdballotId Id of a Ballot
osid.id.IdresourceId Id of a Resource
Returnosid.voting.VoterAllocationListthe voter allocations
ErrorsNOT_FOUND ballotId or resourceId is not found
NULL_ARGUMENT ballotId or resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocations
Description

Gets all VoterAllocations on this ballot.

Returnosid.voting.VoterAllocationListthe voter allocations
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.