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

This session provides methods to apply BallotConstrainers to Ballots. A Ballot with multiple BallotConstrainers means any positive rule evaluation across the constrainers result in an accessible Ballot.

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

Tests if this user can alter ballot constrainer/ballot 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.
MethodassignBallotConstrainerToBallot
Description

Adds an existing BallotConstrainer to a Ballot.

Parametersosid.id.IdballotConstrainerIdthe Id of the BallotConstrainer
osid.id.IdballotIdthe Id of the Ballot
ErrorsALREADY_EXISTS ballotConstrainerId is already applied to ballotId
NOT_FOUND ballotConstrainerId or ballotId not found
NULL_ARGUMENT ballotConstrainerId or ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignBallotConstrainerFromBallot
Description

Removes a BallotConstrainer from a Ballot.

Parametersosid.id.IdballotConstrainerIdthe Id of the BallotConstrainer
osid.id.IdballotIdthe Id of the Ballot
ErrorsNOT_FOUND ballotConstrainerId or ballotId not found or ballotConstrainerId not applied to ballotId
NULL_ARGUMENT ballotConstrainerId or ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanSequenceBallotConstrainers
Description

Tests if this user can order BallotConstrainers. 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 BallotConstrainer ordering is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodmoveBallotConstrainerAhead
Description

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

Parametersosid.id.IdballotConstrainerIdthe Id of a BallotConstrainer
osid.id.IdballotIdthe Id of a Ballot
osid.id.IdreferenceIdthe reference ballot constrainer Id
ErrorsNOT_FOUND ballotConstrainerId, ballotId, or referenceId not found or, ballotConstrainerId or referenceId not related to ballotId
NULL_ARGUMENT ballotConstrainerId, ballotId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodmoveBallotConstrainerBehind
Description

Reorders ballot constrainer for a ballot by moving the specified ballot constrainer behind a reference ballot constrainer.

Parametersosid.id.IdballotConstrainerIdthe Id of a BallotConstrainer
osid.id.IdballotIdthe Id of a Ballot
osid.id.IdreferenceIdthe reference ballot constrainer Id
ErrorsNOT_FOUND ballotConstrainerId, ballotId, or referenceId not found or, ballotConstrainerId or referenceId not related to ballotId
NULL_ARGUMENT ballotConstrainerId, ballotId, or referenceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodorderBallotConstrainers
Description

Reorders a set of ballot constrainers for a ballot

Parametersosid.id.Id[]ballotConstrainerIdsthe Ids for a set of BallotConstrainer
osid.id.IdballotIdthe Id of a Ballot
ErrorsNOT_FOUND ballotId not found or, a ballotConstrainerId not related to ballotId
NULL_ARGUMENT ballotConstrainerIds or ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.