public interface VoteNotificationSession extends OsidSession
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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForVoteNotifications()
Tests if this user can register for
Vote notifications. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
registerForChangedVote(Id voteId)
Register for notifications of updated votes for the given vote.
|
void |
registerForChangedVotes()
Registers for notification of updated votes.
|
void |
registerForChangedVotesForBallot(Id ballotId)
Register for notifications of updated votes for the given ballot.
|
void |
registerForChangedVotesForCandidate(Id candidateId)
Register for notifications of updated votes for the given candidate.
|
void |
registerForChangedVotesForRace(Id raceId)
Register for notifications of updated votes for the given race.
|
void |
registerForChangedVotesForVoter(Id resourceId)
Register for notifications of updated votes for the given voter.
|
void |
registerForDeletedVote(Id voteId)
Registers for notification of a deleted vote.
|
void |
registerForDeletedVotes()
Registers for notification of deleted votes.
|
void |
registerForDeletedVotesForBallot(Id ballotId)
Register for notifications of deleted votes for the given ballot.
|
void |
registerForDeletedVotesForCandidate(Id candidateId)
Register for notifications of deleted votes for the given candidate.
|
void |
registerForDeletedVotesForRace(Id raceId)
Register for notifications of deleted votes for the given race.
|
void |
registerForDeletedVotesForVoter(Id resourceId)
Register for notifications of deleted votes for the given voter.
|
void |
registerForNewVotes()
Register for notifications of new votes.
|
void |
registerForNewVotesForBallot(Id ballotId)
Register for notifications of new votes for the given ballot.
|
void |
registerForNewVotesForCandidate(Id candidateId)
Register for notifications of new votes for the given candidate.
|
void |
registerForNewVotesForRace(Id raceId)
Register for notifications of new votes for the given race.
|
void |
registerForNewVotesForVoter(Id resourceId)
Register for notifications of new votes for the given voter.
|
void |
useFederatedPollsView()
Federates the view for methods in this session.
|
void |
useIsolatedPollsView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getPollsId()
Polls
Id
associated with this
session. Polls Id
associated with this sessionmandatory
- This method must be implemented. Polls getPolls() throws OperationFailedException, PermissionDeniedException
Polls
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForVoteNotifications()
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. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void useFederatedPollsView()
mandatory
- This method is must be implemented. void useIsolatedPollsView()
mandatory
- This method is must be implemented. void registerForNewVotes() throws OperationFailedException, PermissionDeniedException
VoteReceiver.newVotes()
is invoked when a new vote is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewVotesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.newVotes()
is invoked when a new vote is created.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewVotesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.newVotes()
is invoked when a new vote is created.raceId
- the Id
of the Race
to
monitorNullArgumentException
- raceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewVotesForCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.newVotes()
is invoked when a new vote is
created.candidateId
- the Id
of the Candidate
to monitorNullArgumentException
- candidateId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewVotesForVoter(Id resourceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.newVotes()
is invoked when a new vote is created.resourceId
- the Id
of the voter to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVotes() throws OperationFailedException, PermissionDeniedException
VoteReceiver.ChangedVotes()
is invoked when a vote is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVotesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when a vote is
changed.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVotesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when a vote is changed.raceId
- the Id
of the Race
to
monitorNullArgumentException
- raceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVotesForCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when a vote is
changed.candidateId
- the Id
of the Candidate
to monitorNullArgumentException
- candidateId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVotesForVoter(Id resourceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when a vote is
changed.resourceId
- the Id
of the voter to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedVote(Id voteId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when a vote is changed.voteId
- the Id
of the Vote
to
monitorNullArgumentException
- voteId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVotes() throws OperationFailedException, PermissionDeniedException
VoteReceiver.deletedVotes()
is invoked when a vote is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVotesForBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.deletedVotes()
is invoked when a vote is
deleted.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVotesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.deletedVotes()
is invoked when a vote is deleted.raceId
- the Id
of the Race
to
monitorNullArgumentException
- raceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVotesForCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.deletedVotes()
is invoked when a vote is
deleted.candidateId
- the Id
of the Candidate
to monitorNullArgumentException
- candidateId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVotesForVoter(Id resourceId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.deletedVotes()
is invoked when a vote is
deleted.resourceId
- the Id
of the voter to monitorNullArgumentException
- resourceId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedVote(Id voteId) throws OperationFailedException, PermissionDeniedException
VoteReceiver.changedVotes()
is invoked when the specified vote
is deleted.voteId
- the Id
of the Vote
to
monitorNullArgumentException
- voteId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.