public interface CandidateNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Candidate
objects in this Polls.
This
also includes existing candidates 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
CandidateLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForCandidateNotifications()
Tests if this user can register for
Candidate
notifications. |
Polls |
getPolls()
Gets the
Polls associated with this session. |
Id |
getPollsId()
Gets the
Polls Id associated with this
session. |
void |
registerForChangedCandidate(Id candidateId)
Registers for notification of an updated candidate.
|
void |
registerForChangedCandidates()
Registers for notification of updated candidates.
|
void |
registerForChangedCandidatesForRace(Id raceId)
Registers for notification of an updated candidate for the given race.
|
void |
registerForChangedCandidatesForResource(Id resourceId)
Registers for notification of an updated candidate for the given
resource.
|
void |
registerForDeletedCandidate(Id candidateId)
Registers for notification of a deleted candidate.
|
void |
registerForDeletedCandidates()
Registers for notification of deleted candidates.
|
void |
registerForDeletedCandidatesForRace(Id raceId)
Registers for notification of a deleted candidate for the given race.
|
void |
registerForDeletedCandidatesForResource(Id resourceId)
Registers for notification of a deleted candidate for the given
resource.
|
void |
registerForNewCandidates()
Register for notifications of new candidates.
|
void |
registerForNewCandidatesForRace(Id raceId)
Registers for notification of a new candidate for the given race.
|
void |
registerForNewCandidatesForResource(Id resourceId)
Registers for notification of a new candidate for the given resource.
|
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 canRegisterForCandidateNotifications()
Candidate
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 registerForNewCandidates() throws OperationFailedException, PermissionDeniedException
CandidateReceiver.newCandidates()
is invoked when a new
Candidate
is appears in this polls.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCandidatesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.newCandidates()
is invoked when the
specified candidate is created in this polls.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCandidatesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.newCandidates()
is invoked when the
specified candidate is created in this polls.raceId
- the Id
of the race
to
monitorNullArgumentException
- raceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCandidates() throws OperationFailedException, PermissionDeniedException
CandidateReceiver.changedCandidates()
is invoked when a
candidate in this polls is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCandidatesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.changedCandidates()
is
invoked when the specified candidate is updated in this polls.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCandidatesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.changedCandidates()
is invoked when
the specified candidate is updated in this polls.raceId
- the Id
of the race
to
monitorNullArgumentException
- raceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.changedCandidates()
is invoked when the
specified candidate in this polls 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 registerForDeletedCandidates() throws OperationFailedException, PermissionDeniedException
CandidateReceiver.deletedCandidates()
is invoked when a
candidate is deleted or removed from this polls.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCandidatesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.deletedCandidates()
is
invoked when the specified candidate is deleted or removed from this
polls.resourceId
- the Id
of the Resource
to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCandidatesForRace(Id raceId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.deletedCandidates()
is invoked when
the specified candidate is deleted or removed from this polls.raceId
- the Id
of the race
to
monitorNullArgumentException
- raceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCandidate(Id candidateId) throws OperationFailedException, PermissionDeniedException
CandidateReceiver.deletedCandidates()
is invoked when the
specified candidate is deleted or removed from this polls.candidateId
- the Id
of the Candidate
to monitorNullArgumentException
- candidateId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.