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

This session provides methods for looking up votes.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error votes
  • isolated polls view: All vote methods in this session operate, retrieve and pertain to votes defined explicitly in the current polls. Using an isolated view is useful for managing votes with the VoteAdminSession.
  • federated polls view: All vote methods in this session operate, retrieve and pertain to all votes defined in these polls and any other catalogs implicitly available in this polls through polls inheritence.
  • effective vote view: All vote lookup methods return votes where the current date falls in between the effective dates inclusive.
  • any effective vote view: Votes of any effective date are returned from methods.
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 associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupVotes
Description

Tests if this user can access votes. 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 vote operations.

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

A complete view of the vote 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 votes 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 votes to these polls only.

CompliancemandatoryThis method is must be implemented.
MethoduseEffectiveVoteView
Description

Only votes whose effective dates are current are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyEffectiveVoteView
Description

All votes of any effective dates are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetVote
Description

Gets a Vote specified by its Id.

Parametersosid.id.IdvoteId Id of the Vote
Returnosid.voting.Votethe vote
ErrorsNOT_FOUND voteId not found
NULL_ARGUMENT voteId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method is must be implemented.
MethodgetVotesByIds
Description

Gets a VoteList corresponding to the given IdList.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdListvoteIdsthe list of Ids to retrieve
Returnosid.voting.VoteListthe returned Vote list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT voteIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesByGenusType
Description

Gets the votes for the given vote genus type.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.type.TypevoteGenusTypea vote genus type
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT voteGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesByParentGenusType
Description

Gets the votes for the given vote genus type and include any votes with a genus type derived from the specified genus type.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.type.TypevoteGenusTypea vote genus type
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT voteGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesByRecordType
Description

Gets the votes for the given vote record type.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.type.TypevoteRecordTypea vote record type
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT voteRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesOnDate
Description

Gets a list of votes effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoter
Description

Gets the votes cast by the given voter.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterOnDate
Description

Gets a list of votes for a voter effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForCandidate
Description

Gets the Votes for a candidate.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdcandidateId Id of a Candidate
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForCandidateOnDate
Description

Gets a list of votes for a candidate effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdcandidateId Id of a Candidate
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT candidateId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndCandidate
Description

Gets the votes cast by the given voter and candidate.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdcandidateId Id of a Candidate
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT resourceId or candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndCandidateOnDate
Description

Gets a list of votes for a voter and candidate effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdcandidateId Id of a Candidate
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, candidateId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForRace
Description

Gets the votes cast in the given race.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdraceId Id of a Race
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForRaceOnDate
Description

Gets a list of votes in a race effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdraceId Id of a Race
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT raceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndRace
Description

Gets the votes cast by the given voter and race.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdraceId Id of a Race
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT resourceId or raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndRaceOnDate
Description

Gets a list of votes for a voter and race effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdraceId Id of a Race
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, raceId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForBallot
Description

Gets the votes cast in the given ballot.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdballotId Id of a Ballot
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForBallotOnDate
Description

Gets a list of votes in a ballot effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdballotId Id of a Ballot
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT ballotId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndBallot
Description

Gets the votes cast by the given voter and ballot.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdballotId Id of a Ballot
Returnosid.voting.VoteListthe votes
ErrorsNULL_ARGUMENT resourceId or ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotesForVoterAndBallotOnDate
Description

Gets a list of votes for a voter and ballot effective during the entire given date range inclusive but not confined to the date range.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Parametersosid.id.IdresourceId Id of a Voter
osid.id.IdballotId Id of a Ballot
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.voting.VoteListthe returned Vote list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, ballotId, from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetVotes
Description

Gets all votes.

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

In effective mode, votes are returned that are currently effective. In any effective mode, effective votes and those currently expired are returned.

Returnosid.voting.VoteListthe votes
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.