OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.RaceLookupSession
Implementsosid.OsidSession
Used Byosid.voting.VotingManager
osid.voting.VotingProxyManager
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.Id the Polls Id associated with this session
Compliancemandatory This method must be implemented.
MethodgetPolls
Description

Gets the Polls associated with this session.

Returnosid.voting.Polls the polls
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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
Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This 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.

Compliancemandatory This method is must be implemented.
MethoduseIsolatedPollsView
Description

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

Compliancemandatory This method is must be implemented.
MethoduseActiveRaceView
Description

Only active races are returned from methods in this session.

Compliancemandatory This method is must be implemented.
MethoduseAnyStatusRaceView
Description

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

Compliancemandatory This 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.IdraceId the Id of the Race to retrieve
Returnosid.voting.Race the returned Race
ErrorsNOT_FOUND no Race found with the given Id
NULL_ARGUMENT raceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdListraceIds the list of Ids to retrieve
Returnosid.voting.RaceList the returned Race list
ErrorsNOT_FOUND an Id was not found
NULL_ARGUMENT raceIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TyperaceGenusType a race genus type
Returnosid.voting.RaceList the returned Race list
ErrorsNULL_ARGUMENT raceGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TyperaceGenusType a race genus type
Returnosid.voting.RaceList the returned Race list
ErrorsNULL_ARGUMENT raceGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.TyperaceRecordType a race record type
Returnosid.voting.RaceList the returned Race list
ErrorsNULL_ARGUMENT raceRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.IdballotId a ballot Id
Returnosid.voting.RaceList the returned Race list
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This 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.RaceList a list of races
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.