OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.VoteQuery
Implementsosid.OsidRelationshipQuery
Description

This is the query for searching votes. Each method match request produces an AND term while multiple invocations of a method produces a nested OR.

MethodmatchCandidateId
Description

Sets the candidate Id for this query.

Parametersosid.id.IdcandidateIda candidate Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT candidateId is null
CompliancemandatoryThis method must be implemented.
MethodclearCandidateIdTerms
Description

Clears the candidate Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsCandidateQuery
Description

Tests if a CandidateQuery is available for querying candidates.

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

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

Returnosid.voting.CandidateQuerythe candidate query
ErrorsUNIMPLEMENTED supportsCandidateQuery() is false
ComplianceoptionalThis method must be implemented if supportsCandidateQuery() is true.
MethodclearCandidateTerms
Description

Clears the candidate terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVoterId
Description

Sets the resource Id for this query.

Parametersosid.id.IdresourceIda resource Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT resourceId is null
CompliancemandatoryThis method must be implemented.
MethodclearVoterIdTerms
Description

Clears the voter agent Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVoterQuery
Description

Tests if a ResourceQuery is available for querying candidates.

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

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

Returnosid.resource.ResourceQuerythe resource query
ErrorsUNIMPLEMENTED supportsVoterQuery() is false
ComplianceoptionalThis method must be implemented if supportsVoterQuery() is true.
MethodclearVoterTerms
Description

Clears the voter terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVotingAgentId
Description

Sets the voting agent Id for this query.

Parametersosid.id.IdagentIda voting agent agent Id
booleanmatch true for a positive match, false for a negative match
ErrorsNULL_ARGUMENT agentId is null
CompliancemandatoryThis method must be implemented.
MethodclearVotingAgentIdTerms
Description

Clears the voting agent Id terms.

CompliancemandatoryThis method must be implemented.
MethodsupportsVotingAgentQuery
Description

Tests if an AgentQuery is available for querying candidates.

Returnboolean true if a voting agent query is available, false otherwise
CompliancemandatoryThis method must be implemented.
MethodgetVotingAgentQuery
Description

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

Returnosid.authentication.AgentQuerythe agent query
ErrorsUNIMPLEMENTED supportsVotingAgentQuery() is false
ComplianceoptionalThis method must be implemented if supportsVotingAgentQuery() is true.
MethodclearVotingAgentTerms
Description

Clears the voter terms.

CompliancemandatoryThis method must be implemented.
MethodmatchVotes
Description

Matches the number of votes within the given range inclusive.

Parametersintegerfromstart of range
integertoend of range
booleanmatch true for a positive match, false for a negative match
ErrorsINVALID_ARGUMENT from is greater than to
CompliancemandatoryThis method must be implemented.
MethodclearVotesTerms
Description

Clears the votes terms.

CompliancemandatoryThis method must be implemented.
MethodmatchMinimumVotes
Description

Matches the number of minimum votes inclusive.

Parametersintegervotesthe numbe rof votes
booleanmatch true for a positive match, false for a negative match
CompliancemandatoryThis method must be implemented.
MethodclearMinimumVotesTerms
Description

Clears the minimum votes terms.

CompliancemandatoryThis method must be implemented.
MethodmatchPollsId
Description

Sets the polls Id for this query to match terms assigned to 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 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 terms.

CompliancemandatoryThis method must be implemented.
MethodgetVoteQueryRecord
Description

Gets the vote query record corresponding to the given Vote record Type. Multiple retrievals produce a nested OR term.

Parametersosid.type.TypevoteRecordTypea vote query record type
Returnosid.voting.records.VoteQueryRecordthe vote query record
ErrorsNULL_ARGUMENT voteRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(voteRecordType) is false
CompliancemandatoryThis method must be implemented.