OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.RaceLookupSession
Implementsosid.OsidSession
Description

This session defines methods for retrieving races. A Race represents a statistic.

This lookup session defines several views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • federated polls view: includes races in polls which are children of this polls in the polls hierarchy
  • isolated polls view: restricts lookups to this polls only
  • active race view: active races are returned from methods in this session
  • any status race view: active and inactive races are returned from methods in this session
MethodgetPollsId
Description

Gets the Polls Id associated with this session.

Returnosid.id.Idthe Polls Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Pollsthe polls
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupRaces
Description

Tests if this user can lookup races. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer reading operations.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeRaceView
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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryRaceView
Description

A complete view of the Race returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedPollsView
Description

Federates the view for methods in this session. A federated view will include races in polls which are children of this polls in the polls hierarchy.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedPollsView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this polls only.

CompliancemandatoryThis method is must be implemented.
MethoduseActiveRaceView
Description

Only active races are returned from methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyStatusRaceView
Description

Borth active and inactive races are returned from methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetRace
Description

Gets the Race specified by its Id.

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Race may have a different Id than requested, such as the case where a duplicate Id was assigned to a Race and retained for compatibility.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.id.IdraceIdthe Id of the Race to retrieve
Returnosid.voting.Racethe returned Race
ErrorsNOT_FOUNDno Race found with the given Id
NULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesByIds
Description

Gets a RaceList corresponding to the given IdList.

In plenary mode, the returned list contains all of the races specified in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible races may be omitted from the list and may present the elements in any order including returning a unique set.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.id.IdListraceIdsthe list of Ids to retrieve
Returnosid.voting.RaceListthe returned Race list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT raceIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesByGenusType
Description

Gets a RaceList corresponding to the given race genus Type which does not include races of types derived from the specified Type. In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

Parametersosid.type.TyperaceGenusTypea race genus type
Returnosid.voting.RaceListthe returned Race list
ErrorsNULL_ARGUMENT raceGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesByParentGenusType
Description

Gets a RaceList corresponding to the given race genus Type and include races of types derived from the specified Type.

In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.type.TyperaceGenusTypea race genus type
Returnosid.voting.RaceListthe returned Race list
ErrorsNULL_ARGUMENT raceGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesByRecordType
Description

Gets a RaceList containing the given race record Type.

In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.type.TyperaceRecordTypea race record type
Returnosid.voting.RaceListthe returned Race list
ErrorsNULL_ARGUMENT raceRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesByProvider
Description

Gets a RaceList from the given provider.

In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.id.IdresourceIda resource Id
Returnosid.voting.RaceListthe returned Race list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRacesForBallot
Description

Gets a RaceList for the given Ballot.

In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Parametersosid.id.IdballotIda ballot Id
Returnosid.voting.RaceListthe returned Race list
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetRaces
Description

Gets all races.

In plenary mode, the returned list contains all known races or an error results. Otherwise, the returned list may contain only those races that are accessible through this session.

In active mode, races are returned that are currently active. In any status mode, active and inactive races are returned.

Returnosid.voting.RaceLista list of races
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.