OSID Logo
OSID Specifications
voting package
Version 3.1.0
Interfaceosid.voting.BallotLookupSession
Implementsosid.OsidSession
Used Byosid.voting.VotingManager
osid.voting.VotingProxyManager
Description

This session defines methods for retrieving ballots. A Ballot is an arbitrary entity that may represent a person, place or thing used to identify an object used in various services.

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
  • isolated polls view: All ballot methods in this session operate, retrieve and pertain to ballots defined explicitly in the current polls. Using an isolated view is useful for managing Ballots with the BallotAdminSession.
  • federated polls view: All ballot methods in this session operate, retrieve and pertain to all ballots defined in this polls and any other ballots implicitly available in this polls through polls inheritence.
  • active ballot view: active ballots are returned from methods in this session
  • any status ballot view: active and inactive ballots are returned from methods in this session

The methods useFederatedPollsView() and useIsolatedPollsView() behave as a radio group and one should be selected before invoking any lookup methods.

Ballots may have an additional records indicated by their respective record types. The record may not be accessed through a cast of the Ballot.

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 associated with this session
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodcanLookupBallots
Description

Tests if this user can perform Ballot lookups. 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 lookup operations.

Returnboolean false if lookup methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethoduseComparativeBallotView
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.
MethodusePlenaryBallotView
Description

A complete view of the Ballot 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 ballots 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 lookups to this polls only.

Compliancemandatory This method is must be implemented.
MethoduseActiveBallotView
Description

Only active ballots are returned from methods in this session.

Compliancemandatory This method is must be implemented.
MethoduseAnyStatusBallotView
Description

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

Compliancemandatory This method is must be implemented.
MethodgetBallot
Description

Gets the Ballot specified by its Id.

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

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

Parametersosid.id.IdballotId the Id of the Ballot to retrieve
Returnosid.voting.Ballot the returned Ballot
ErrorsNOT_FOUND no Ballot found with the given Id
NULL_ARGUMENT ballotId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsByIds
Description

Gets a BallotList corresponding to the given IdList.

In plenary mode, the returned list contains all of the ballots 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 Ballots may be omitted from the list and may present the elements in any order including returning a unique set.

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

Parametersosid.id.IdListballotIds the list of Ids to retrieve
Returnosid.voting.BallotList the returned Ballot list
ErrorsNOT_FOUND an Id was not found
NULL_ARGUMENT ballotIds is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsByGenusType
Description

Gets a BallotList corresponding to the given ballot genus Type which does not include ballot of types derived from the specified Type.

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

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

Parametersosid.type.TypeballotGenusType a ballot genus type
Returnosid.voting.BallotList the returned Ballot list
ErrorsNULL_ARGUMENT ballotGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsByParentGenusType
Description

Gets a BallotList corresponding to the given ballot genus Type and include any additional ballots with genus types derived from the specified Type.

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

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

Parametersosid.type.TypeballotGenusType a ballot genus type
Returnosid.voting.BallotList the returned Ballot list
ErrorsNULL_ARGUMENT ballotGenusType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsByRecordType
Description

Gets a BallotList containing the given ballot record Type.

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

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

Parametersosid.type.TypeballotRecordType a ballot record type
Returnosid.voting.BallotList the returned Ballot list
ErrorsNULL_ARGUMENT ballotRecordType is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsByCommissioner
Description

Gets a BallotList from the given commissioner..

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

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

Parametersosid.id.IdresourceId a resource Id
Returnosid.voting.BallotList the returned Ballot list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallotsOnDate
Description

Gets a BallotList that are effective for the entire given date range but not confined to the date range.

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

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

Parametersosid.calendaring.DateTimefrom s atsrting date
osid.calendaring.DateTimeto an ending date
Returnosid.voting.BallotList the returned Ballot list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodgetBallots
Description

Gets all Ballots.

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

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

Returnosid.voting.BallotList a list of Ballots
ErrorsOPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.