public interface BallotNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Ballot
objects in this Polls.
This also
includes existing ballots that may appear or disappear due to changes in
the Polls
hierarchy, 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 two views defined in this session correspond to the views in the
BallotLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForBallotNotifications()
Tests if this user can register for
Ballot
notifications. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
registerForChangedBallot(Id ballotId)
Registers for notification of an updated ballot.
|
void |
registerForChangedBallots()
Registers for notification of updated ballots.
|
void |
registerForDeletedBallot(Id ballotId)
Registers for notification of a deleted ballot.
|
void |
registerForDeletedBallots()
Registers for notification of deleted ballots.
|
void |
registerForNewBallots()
Register for notifications of new ballots.
|
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. Polls
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForBallotNotifications()
Ballot
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 registerForNewBallots() throws OperationFailedException, PermissionDeniedException
BallotReceiver.newBallots()
is invoked when a new
Ballot
is appears in this polls.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBallots() throws OperationFailedException, PermissionDeniedException
BallotReceiver.changedBallots()
is invoked when a ballot in
this polls is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
BallotReceiver.changedBallots()
is invoked when the specified
ballot in this polls 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 registerForDeletedBallots() throws OperationFailedException, PermissionDeniedException
BallotReceiver.deletedBallots()
is invoked when a ballot is
deleted or removed from this polls.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBallot(Id ballotId) throws OperationFailedException, PermissionDeniedException
BallotReceiver.deletedBallots()
is invoked when the specified
ballot is deleted or removed from this polls.ballotId
- the Id
of the Ballot
to
monitorNullArgumentException
- ballotId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.