OSID Logo
OSID Specifications
voting rules package
Version 3.1.0
Interfaceosid.voting.rules.BallotConstrainerRuleApplicationSession
Implementsosid.OsidSession
Used Byosid.voting.rules.VotingRulesManager
osid.voting.rules.VotingRulesProxyManager
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.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.
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
Compliancemandatory This method must be implemented.
MethodassignBallotConstrainerToBallot
Description

Adds an existing BallotConstrainer to a Ballot.

Parametersosid.id.IdballotConstrainerId the Id of the BallotConstrainer
osid.id.IdballotId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodunassignBallotConstrainerFromBallot
Description

Removes a BallotConstrainer from a Ballot.

Parametersosid.id.IdballotConstrainerId the Id of the BallotConstrainer
osid.id.IdballotId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.IdballotConstrainerId the Id of a BallotConstrainer
osid.id.IdballotId the Id of a Ballot
osid.id.IdreferenceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdballotConstrainerId the Id of a BallotConstrainer
osid.id.IdballotId the Id of a Ballot
osid.id.IdreferenceId the 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_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodorderBallotConstrainers
Description

Reorders a set of ballot constrainers for a ballot

Parametersosid.id.Id[]ballotConstrainerIds the Ids for a set of BallotConstrainer
osid.id.IdballotId the Id of a Ballot
ErrorsNOT_FOUND ballotId not found or, a ballotConstrainerId not related to ballotId
NULL_ARGUMENT ballotConstrainerIds or ballotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.