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

This session provides methods to apply RaceConstrainers to Races. A Race with multiple RaceConstrainers means any positive rule evaluation across the constrainers result in an accessible Race.

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

Tests if this user can alter race constrainer/race mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodassignRaceConstrainerToRace
Description

Adds an existing RaceConstrainer to a Race.

Parametersosid.id.IdraceConstrainerIdthe Id of the RaceConstrainer
osid.id.IdraceIdthe Id of the Race
ErrorsALREADY_EXISTS raceConstrainerId is already applied to raceId
NOT_FOUND raceConstrainerId or raceId not found
NULL_ARGUMENT raceConstrainerId or raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignRaceConstrainerFromRace
Description

Removes a RaceConstrainer from a Race.

Parametersosid.id.IdraceConstrainerIdthe Id of the RaceConstrainer
osid.id.IdraceIdthe Id of the Race
ErrorsNOT_FOUND raceConstrainerId or raceId not found or raceConstrainerId not applied to raceId
NULL_ARGUMENT raceConstrainerId or raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanSequenceRaceConstrainers
Description

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

Returnboolean false if RaceConstrainer ordering is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveRaceConstrainerAhead
Description

Reorders race constrainers for a race by moving the specified race constrainer in front of a reference race constrainer.

Parametersosid.id.IdraceConstrainerIdthe Id of a RaceConstrainer
osid.id.IdraceIdthe Id of a Race
osid.id.IdreferenceIdthe reference race constrainer Id
ErrorsNOT_FOUND raceConstrainerId, raceId, or referenceId not found or, raceConstrainerId or referenceId not related to raceId
NULL_ARGUMENT raceConstrainerId, raceId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmoveRaceConstrainerBehind
Description

Reorders race constrainers for a race by moving the specified race constrainer behind a reference race constrainer.

Parametersosid.id.IdraceConstrainerIdthe Id of a RaceConstrainer
osid.id.IdraceIdthe Id of a Race
osid.id.IdreferenceIdthe reference race constrainer Id
ErrorsNOT_FOUND raceConstrainerId, raceId, or referenceId not found or, raceConstrainerId or referenceId not related to raceId
NULL_ARGUMENT raceConstrainerId, raceId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderRaceConstrainers
Description

Reorders a set of race constrainers for a race.

Parametersosid.id.Id[]raceConstrainerIdsthe Ids for a set of RaceConstrainers
osid.id.IdraceIdthe Id of a Race
ErrorsNOT_FOUND raceId not found or, a raceConstrainerId not related to raceId
NULL_ARGUMENT raceConstrainerIds or raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.