OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.CandidateSearchSession
Implementsosid.voting.CandidateQuerySession
Used Byosid.voting.VotingManager
osid.voting.VotingProxyManager
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.CandidateSearch the candidate search
Compliancemandatory This 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.CandidateSearchOrder the candidate search order
Compliancemandatory This method must be implemented.
MethodgetCandidatesBySearch
Description

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

Parametersosid.voting.CandidateQuerycandidateQuery the candidate query
osid.voting.CandidateSearchcandidateSearch the candidate search
Returnosid.voting.CandidateSearchResults the returned search results
ErrorsNULL_ARGUMENT candidateQuery or candidateSearch is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
UNSUPPORTED candidateQuery or candidateSearch is not of this service
Compliancemandatory This method must be implemented.
MethodgetCandidateQueryFromInspector
Description

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

Parametersosid.voting.CandidateQueryInspectorcandidateQueryInspector a candidate query inspector
Returnosid.voting.CandidateQuery the candidate query
ErrorsNULL_ARGUMENT candidateQueryInspector is null
UNSUPPORTED candidateQueryInspector is not of this service
Compliancemandatory This method must be implemented.