OSID Logo
OSID Specifications
voting rules package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.rules.BallotConstrainerQuery
Implementsosid.OsidConstrainerQuery
Description

This is the query for searching ballot constrainers. Each method match specifies an AND term while multiple invocations of the same method produce a nested OR.

MethodmatchRuledBallotId
Description

Matches rules mapped to a ballot.

Parametersosid.id.IdballotIdthe ballot Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT ballotId is null
CompliancemandatoryThis method must be implemented.
MethodclearRuledBallotIdTerms
Description

Clears the ballot Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsRuledBallotQuery
Description

Tests if a BallotQuery is available.

Returnboolean true if a ballot query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetRuledBallotQuery
Description

Gets the query for a ballot. Multiple retrievals produce a nested OR term.

Returnosid.voting.BallotQuerythe ballot query
ErrorsUNIMPLEMENTED supportsRuledBallotQuery() is false
ComplianceoptionalThis method must be implemented if supportsRuledBallotQuery() is true.
MethodmatchAnyRuledBallot
Description

Matches rules mapped to any ballot.

Parametersbooleanmatch true for rules mapped to any ballot, false to match rules mapped to no ballots
CompliancemandatoryThis method must be implemented.
MethodclearRuledBallotTerms
Description

Clears the ballot query terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Matches rules mapped to the polls.

Parametersosid.id.IdpollsIdthe polls Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT pollsId is null
CompliancemandatoryThis method must be implemented.
MethodclearPollsIdTerms
Description

Clears the polls Id query terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsPollsQuery
Description

Tests if a PollsQuery is available.

Returnboolean true if a polls query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetPollsQuery
Description

Gets the query for a polls. Multiple retrievals produce a nested OR term.

Returnosid.voting.PollsQuerythe polls query
ErrorsUNIMPLEMENTED supportsPollsQuery() is false
ComplianceoptionalThis method must be implemented if supportsPollsQuery() is true.
MethodclearPollsTerms
Description

Clears the polls query terms.

CompliancemandatoryThis method must be implemented.
MethodgetBallotConstrainerQueryRecord
Description

Gets the ballot constrainer query record corresponding to the given BallotConstrainer record Type. Multiple record retrievals produce a nested OR term.

Parametersosid.type.TypeballotConstrainerRecordTypea ballot constrainer record type
Returnosid.voting.rules.records.BallotConstrainerQueryRecordthe ballot constrainer query record
ErrorsNULL_ARGUMENT ballotConstrainerRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(ballotConstrainerRecordType) is false
CompliancemandatoryThis method must be implemented.