OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.BallotSearchSession
Implementsosid.voting.BallotQuerySession
Description

This session provides methods for searching among Ballot objects. The search query is constructed using the BallotQuery.

getBallotsByQuery() is the basic search method and returns a list of Ballots. A more advanced search may be performed with getBallotsBySearch(). It accepts an BallotSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getBallotsBySearch() returns an BallotSearchResults that can be used to access the resulting BallotList or be used to perform a search within the result set through BallotList.

This session defines views that offer differing behaviors for searching.

  • federated polls view: searches include ballots in polls of which this polls is a ancestor in the polls hierarchy
  • isolated polls view: searches are restricted to ballots in this polls

Ballots may have a ballot query record indicated by their respective record types. The ballot query record is accessed via the BallotQuery.

MethodgetBallotSearch
Description

Gets a ballot search.

Returnosid.voting.BallotSearchthe ballot search
CompliancemandatoryThis method must be implemented.
MethodgetBallotSearchOrder
Description

Gets a ballot search order. The BallotSearchOrder is supplied to a BallotSearch to specify the ordering of results.

Returnosid.voting.BallotSearchOrderthe ballot search order
CompliancemandatoryThis method must be implemented.
MethodgetBallotsBySearch
Description

Gets the search results matching the given search query using the given search.

Parametersosid.voting.BallotQueryballotQuerythe ballot query
osid.voting.BallotSearchballotSearchthe ballot search
Returnosid.voting.BallotSearchResultsthe returned search results
ErrorsNULL_ARGUMENT ballotQuery or ballotSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED ballotQuery or ballotSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetBallotQueryFromInspector
Description

Gets a ballot query from an inspector. The inspector is available from a BallotSearchResults.

Parametersosid.voting.BallotQueryInspectorballotQueryInspectora ballot query inspector
Returnosid.voting.BallotQuerythe ballot query
ErrorsNULL_ARGUMENT ballotQueryInspector is null
UNSUPPORTED ballotQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.