Interface | osid.voting.CandidateLookupSession | ||
---|---|---|---|
Implements | osid.OsidSession | ||
Description |
This session defines methods for retrieving candidates. A
This lookup session defines several views:
The methods Candidates may have an additional records indicated by
their respective record types. The record may not be accessed
through a cast of the | ||
Method | getPollsId | ||
Description |
Gets the | ||
Return | osid.id.Id | the Polls Id associated with this session | |
Compliance | mandatory | This method must be implemented. | |
Method | getPolls | ||
Description |
Gets the | ||
Return | osid.voting.Polls | the Polls associated with this session | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | canLookupCandidates | ||
Description |
Tests if this user can perform | ||
Return | boolean | false if lookup methods are not authorized, true
otherwise | |
Compliance | mandatory | This method must be implemented. | |
Method | useComparativeCandidateView | ||
Description |
The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | usePlenaryCandidateView | ||
Description |
A complete view of the | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useFederatedPollsView | ||
Description |
Federates the view for methods in this session. A federated view will include candidates in polls which are children of this polls in the polls hierarchy. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useIsolatedPollsView | ||
Description |
Isolates the view for methods in this session. An isolated view restricts lookups to this polls only. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useEffectiveCandidateView | ||
Description |
Only candidates whose effective dates are current are returned by methods in this session. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | useAnyEffectiveCandidateView | ||
Description |
All candidates of any effective dates are returned by methods in this session. | ||
Compliance | mandatory | This method is must be implemented. | |
Method | getCandidate | ||
Description |
Gets the In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | candidateId | the Id of the Candidate to retrieve |
Return | osid.voting.Candidate | the returned Candidate | |
Errors | NOT_FOUND | no Candidate found with the given Id | |
NULL_ARGUMENT | candidateId is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesByIds | ||
Description |
Gets a In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.IdList | candidateIds | the list of Ids to retrieve |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NOT_FOUND | an Id was not found | |
NULL_ARGUMENT | candidateIds is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesByGenusType | ||
Description |
Gets a In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.type.Type | candidateGenusType | a candidate genus type |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | candidateGenusType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesByParentGenusType | ||
Description |
Gets a In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.type.Type | candidateGenusType | a candidate genus type |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | candidateGenusType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesByRecordType | ||
Description |
Gets a In plenary mode, the returned list contains all known candidates or an error results. Otherwise, the returned list may contain only those candidates that are accessible through this session. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.type.Type | candidateRecordType | a candidate record type |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | candidateRecordType is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesOnDate | ||
Description |
Gets a list of candidates effective during the entire
given date range inclusive but not confined to the date
range. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.calendaring.DateTime | from | start of date range |
osid.calendaring.DateTime | to | end of date range | |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | INVALID_ARGUMENT | from is greater than to | |
NULL_ARGUMENT | from or to is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForRace | ||
Description |
Gets a In plenary mode, the returned list contains all known candidates or an error results. Otherwise, the returned list may contain only those candidates that are accessible through this session. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | raceId | a race Id |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | raceId is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForRaceOnDate | ||
Description |
Gets a list of candidates for the given race effective
during the entire given date range inclusive but not
confined to the date range. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | raceId | a race Id |
osid.calendaring.DateTime | from | start of date range | |
osid.calendaring.DateTime | to | end of date range | |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | INVALID_ARGUMENT | from is greater than to | |
NULL_ARGUMENT | raceId, from or to is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForResource | ||
Description |
Gets a In plenary mode, the returned list contains all known candidates or an error results. Otherwise, the returned list may contain only those candidates that are accessible through this session. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | resourceId | a resource Id |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | resourceId is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForResourceOnDate | ||
Description |
Gets a list of candidates for the given resource effective during the entire given date range inclusive but not confined to the date range. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | resourceId | a resource Id |
osid.calendaring.DateTime | from | start of date range | |
osid.calendaring.DateTime | to | end of date range | |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | INVALID_ARGUMENT | from is greater than to | |
NULL_ARGUMENT | resourceId, from or to is null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForRaceAndResource | ||
Description |
Gets a In plenary mode, the returned list contains all known candidates or an error results. Otherwise, the returned list may contain only those candidates that are accessible through this session. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | raceId | a race Id |
osid.id.Id | resourceId | a resource Id | |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | NULL_ARGUMENT | raceId or resourceId is null | |
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidatesForRaceAndResourceOnDate | ||
Description |
Gets a list of candidates for the given race and
resource effective during the entire given date range
inclusive but not confined to the date range. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Parameters | osid.id.Id | raceId | a race Id |
osid.id.Id | resourceId | a resource Id | |
osid.calendaring.DateTime | from | start of date range | |
osid.calendaring.DateTime | to | end of date range | |
Return | osid.voting.CandidateList | the returned Candidate list | |
Errors | INVALID_ARGUMENT | from is greater than to | |
NULL_ARGUMENT | raceId, resourceId, from, or to is
null | ||
OPERATION_FAILED | unable to complete request | ||
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. | |
Method | getCandidates | ||
Description |
Gets all In plenary mode, the returned list contains all known candidates or an error results. Otherwise, the returned list may contain only those candidates that are accessible through this session. In effective mode, candidates are returned that are currently effective. In any effective mode, effective candidates and those currently expired are returned. | ||
Return | osid.voting.CandidateList | a list of Candidates | |
Errors | OPERATION_FAILED | unable to complete request | |
PERMISSION_DENIED | authorization failure | ||
Compliance | mandatory | This method must be implemented. |