OSID Logo
OSID Specifications
voting rules package
Version 3.1.0
Interfaceosid.voting.rules.RaceConstrainerRuleApplicationSession
Implementsosid.OsidSession
Used Byosid.voting.rules.VotingRulesManager
osid.voting.rules.VotingRulesProxyManager
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.Id the Polls Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Polls the polls
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodassignRaceConstrainerToRace
Description

Adds an existing RaceConstrainer to a Race.

Parametersosid.id.IdraceConstrainerId the Id of the RaceConstrainer
osid.id.IdraceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignRaceConstrainerFromRace
Description

Removes a RaceConstrainer from a Race.

Parametersosid.id.IdraceConstrainerId the Id of the RaceConstrainer
osid.id.IdraceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdraceConstrainerId the Id of a RaceConstrainer
osid.id.IdraceId the Id of a Race
osid.id.IdreferenceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdraceConstrainerId the Id of a RaceConstrainer
osid.id.IdraceId the Id of a Race
osid.id.IdreferenceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodorderRaceConstrainers
Description

Reorders a set of race constrainers for a race.

Parametersosid.id.Id[]raceConstrainerIds the Ids for a set of RaceConstrainers
osid.id.IdraceId the Id of a Race
ErrorsNOT_FOUND raceId not found or, a raceConstrainerId not related to raceId
NULL_ARGUMENT raceConstrainerIds or raceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.