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

This session provides methods for authoring ballots.

MethodgetBallotId
Description

Gets the Ballot Id associated with this session.

Returnosid.id.Idthe Ballot Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetBallot
Description

Gets the Ballot associated with this session.

Returnosid.voting.Ballotthe Ballot associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanAuthorBallots
Description

Tests if this user can perform author ballots. 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 lookup operations to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRaces
Description

Gets the races on this ballot.

Returnosid.voting.RaceListthe races
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodaddRace
Description

Adds a race to this ballot.

Parametersosid.id.IdraceIdthe Id of the Race
ErrorsALREADY_EXISTS raceId already in ballot
NOT_FOUND raceId not found
NULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodremoveRace
Description

Removes a Race from this ballot.

Parametersosid.id.IdraceIdthe Id of the Race
ErrorsNOT_FOUND raceId not in ballot
NULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodmoveRace
Description

Moves an existing race to follow another race in this ballot.

Parametersosid.id.IdraceIdthe Id of a Race
osid.id.IdpreceedingRaceIdthe Id of a preceeding Race in the sequence
ErrorsNOT_FOUND raceId or preceedingRaceId is not found
NULL_ARGUMENT raceId or preceedingRaceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.
MethodorderRaces
Description

Sequences existing races on this ballot.

Parametersosid.id.Id[]raceIdsthe Id of the Races
ErrorsNOT_FOUNDa raceId was not found
NULL_ARGUMENT raceIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure occurred
CompliancemandatoryThis method must be implemented.