OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.CandidateSearchSession
Implementsosid.voting.CandidateQuerySession
Description

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

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

This session defines views that offer differing behaviors for searching.

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

Candidates may have a candidiate query record indicated by their respective record types. The candidiate query record is accessed via the CandidateQuery.

MethodgetCandidateSearch
Description

Gets a candidate search.

Returnosid.voting.CandidateSearchthe candidate search
CompliancemandatoryThis method must be implemented.
MethodgetCandidateSearchOrder
Description

Gets a candidate search order. The CandidateSearchOrder is supplied to a CandidateSearch to specify the ordering of results.

Returnosid.voting.CandidateSearchOrderthe candidate search order
CompliancemandatoryThis method must be implemented.
MethodgetCandidatesBySearch
Description

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

Parametersosid.voting.CandidateQuerycandidateQuerythe candidate query
osid.voting.CandidateSearchcandidateSearchthe candidate search
Returnosid.voting.CandidateSearchResultsthe returned search results
ErrorsNULL_ARGUMENT candidateQuery or candidateSearch is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED candidateQuery or candidateSearch is not of this service
CompliancemandatoryThis method must be implemented.
MethodgetCandidateQueryFromInspector
Description

Gets a candidate query from an inspector. The inspector is available from a CandidateSearchResults.

Parametersosid.voting.CandidateQueryInspectorcandidateQueryInspectora candidate query inspector
Returnosid.voting.CandidateQuerythe candidate query
ErrorsNULL_ARGUMENT candidateQueryInspector is null
UNSUPPORTED candidateQueryInspector is not of this service
CompliancemandatoryThis method must be implemented.