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

This session manages voter allocations. All voters are assumed to have a default allocation form such that this session only provides an update mechanism. The data for update is provided via the VoterAllocationForm.

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.
MethodcanManageVoterAllocations
Description

Tests if this user can manage voter allocation. A return of true does not guarantee successful authorization. A return of false indicates that it is known allocation methods will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer allocation operations to an unauthorized user.

Returnboolean false if voter allocation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetVoterAllocationFormForUpdate
Description

Gets the voter allocation form. A new form should be requested for each update transaction.

Parametersosid.id.IdraceIdthe Id of the Race
osid.id.IdresourceIdthe Id of the Voter
Returnosid.voting.VoterAllocationFormthe voter allocation form
ErrorsNOT_FOUND raceId or resourceId is not found
NULL_ARGUMENT raceId or resourceId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateVoterAllocation
Description

Updates an allocation for a voter.

Parametersosid.voting.VoterAllocationFormvoterAllocationFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE voterAllocationForm already used in a create transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT voterAllocationForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED voterAllocationForm did not originate from getVoterAllocationFormForUpdate()
CompliancemandatoryThis method must be implemented.