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

This session defines methods to receive asynchronous notifications on adds/changes to votes. This session is intended for consumers needing to synchronize their state with this service without the use of polling. Notifications are cancelled when this session is closed.

The views defined in this session correspond to the views in the VoteLookupSession.

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.
MethodcanRegisterForVoteNotifications
Description

Tests if this user can register for Vote notifications. 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 notification operations.

Returnboolean false if notification methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseFederatedPollsView
Description

Federates the view for methods in this session. A federated view will include notifications for 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 notifications for votes in this polls only.

CompliancemandatoryThis method is must be implemented.
MethodregisterForNewVotes
Description

Register for notifications of new votes. VoteReceiver.newVotes() is invoked when a new vote is created.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewVotesForBallot
Description

Register for notifications of new votes for the given ballot. VoteReceiver.newVotes() is invoked when a new vote is created.

Parametersosid.id.IdballotIdthe Id of the Ballot to monitor
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewVotesForRace
Description

Register for notifications of new votes for the given race. VoteReceiver.newVotes() is invoked when a new vote is created.

Parametersosid.id.IdraceIdthe Id of the Race to monitor
ErrorsNULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewVotesForCandidate
Description

Register for notifications of new votes for the given candidate. VoteReceiver.newVotes() is invoked when a new vote is created.

Parametersosid.id.IdcandidateIdthe Id of the Candidate to monitor
ErrorsNULL_ARGUMENT candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForNewVotesForVoter
Description

Register for notifications of new votes for the given voter. VoteReceiver.newVotes() is invoked when a new vote is created.

Parametersosid.id.IdresourceIdthe Id of the voter to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVotes
Description

Registers for notification of updated votes. VoteReceiver.ChangedVotes() is invoked when a vote is changed.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVotesForBallot
Description

Register for notifications of updated votes for the given ballot. VoteReceiver.changedVotes() is invoked when a vote is changed.

Parametersosid.id.IdballotIdthe Id of the Ballot to monitor
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVotesForRace
Description

Register for notifications of updated votes for the given race. VoteReceiver.changedVotes() is invoked when a vote is changed.

Parametersosid.id.IdraceIdthe Id of the Race to monitor
ErrorsNULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVotesForCandidate
Description

Register for notifications of updated votes for the given candidate. VoteReceiver.changedVotes() is invoked when a vote is changed.

Parametersosid.id.IdcandidateIdthe Id of the Candidate to monitor
ErrorsNULL_ARGUMENT candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVotesForVoter
Description

Register for notifications of updated votes for the given voter. VoteReceiver.changedVotes() is invoked when a vote is changed.

Parametersosid.id.IdresourceIdthe Id of the voter to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForChangedVote
Description

Register for notifications of updated votes for the given vote. VoteReceiver.changedVotes() is invoked when a vote is changed.

Parametersosid.id.IdvoteIdthe Id of the Vote to monitor
ErrorsNULL_ARGUMENT voteId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVotes
Description

Registers for notification of deleted votes. VoteReceiver.deletedVotes() is invoked when a vote is deleted.

ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVotesForBallot
Description

Register for notifications of deleted votes for the given ballot. VoteReceiver.deletedVotes() is invoked when a vote is deleted.

Parametersosid.id.IdballotIdthe Id of the Ballot to monitor
ErrorsNULL_ARGUMENT ballotId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVotesForRace
Description

Register for notifications of deleted votes for the given race. VoteReceiver.deletedVotes() is invoked when a vote is deleted.

Parametersosid.id.IdraceIdthe Id of the Race to monitor
ErrorsNULL_ARGUMENT raceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVotesForCandidate
Description

Register for notifications of deleted votes for the given candidate. VoteReceiver.deletedVotes() is invoked when a vote is deleted.

Parametersosid.id.IdcandidateIdthe Id of the Candidate to monitor
ErrorsNULL_ARGUMENT candidateId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVotesForVoter
Description

Register for notifications of deleted votes for the given voter. VoteReceiver.deletedVotes() is invoked when a vote is deleted.

Parametersosid.id.IdresourceIdthe Id of the voter to monitor
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodregisterForDeletedVote
Description

Registers for notification of a deleted vote. VoteReceiver.changedVotes() is invoked when the specified vote is deleted.

Parametersosid.id.IdvoteIdthe Id of the Vote to monitor
ErrorsNULL_ARGUMENT voteId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.