OSID Logo
OSID Specifications
voting package
Version 3.0.0
Release Candidate Preview
Interfaceosid.voting.Vote
Implementsosid.OsidRelationship
Description

A Vote is a relationship between a Candidate and a voter.

MethodgetCandidateId
Description

Gets the candidate Id.

Returnosid.id.Ida candidate Id
CompliancemandatoryThis method must be implemented.
MethodgetCandidate
Description

Gets the Candidate.

Returnosid.voting.Candidatethe candidate
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetVoterId
Description

Gets the resource Id of the voter.

Returnosid.id.Idthe resource Id
CompliancemandatoryThis method must be implemented.
MethodgetVoter
Description

Gets the resource of the voter.

Returnosid.resource.Resourcethe resource
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetVotingAgentId
Description

Gets the agent Id of the voter.

Returnosid.id.Idthe agent Id
CompliancemandatoryThis method must be implemented.
MethodgetVotingAgent
Description

Gets the agent of the voter.

Returnosid.authentication.Agentthe agent
ErrorsOPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetVotes
Description

Gets the number of votes cast for this candidate.

Returnintegerthe number of votes cast
CompliancemandatoryThis method must be implemented.
MethodgetVoteRecord
Description

Gets the vote record corresponding to the given Vote record Type. This method is used to retrieve an object implementing the requested record. The voteRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(voteRecordType) is true .

Parametersosid.type.TypevoteRecordTypethe type of the record to retrieve
Returnosid.voting.records.VoteRecordthe vote record
ErrorsNULL_ARGUMENT voteRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(voteRecordType) is false
CompliancemandatoryThis method must be implemented.