public interface PollsNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Polls
objects. 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.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForPollsNotifications()
Tests if this user can register for
Polls
notifications. |
void |
registerForChangedPolls()
Registers for notification of updated polls.
|
void |
registerForChangedPolls(Id pollsId)
Registers for notification of an updated polls.
|
void |
registerForDeletedPolls()
Registers for notification of deleted polls.
|
void |
registerForDeletedPolls(Id pollsId)
Registers for notification of a deleted polls.
|
void |
registerForDeletedPollsAncestors(Id pollsId)
Registers for notification if an ancestor is removed from the
specified polls in the polls hierarchy.
|
void |
registerForDeletedPollsDescendants(Id pollsId)
Registers for notification if a descendant is removed from fthe
specified polls in the polls hierarchy.
|
void |
registerForNewPolls()
Register for notifications of new polls.
|
void |
registerForNewPollsAncestors(Id pollsId)
Registers for notification if an ancestor is added to the specified
polls in the polls hierarchy.
|
void |
registerForNewPollsDescendants(Id pollsId)
Registers for notification if a descendant is added to the specified
polls in the polls hierarchy.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForPollsNotifications()
Polls
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 registerForNewPolls() throws OperationFailedException, PermissionDeniedException
PollsReceiver.newPolls()
is invoked when a new Polls
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPollsAncestors(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.newPollsAncestor()
is invoked when the specified polls experiences an addition in
ancestry.pollsId
- the Id
of the polls to monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPollsDescendants(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.newPollsDescendant()
is invoked when the
specified polls experiences an addition in descendants.pollsId
- the Id
of the polls to monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPolls() throws OperationFailedException, PermissionDeniedException
PollsReceiver.changedPolls()
is invoked when a polls is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPolls(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.changedPolls()
is invoked when the specified
polls is changed.pollsId
- the Id of the Polls to monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPolls() throws OperationFailedException, PermissionDeniedException
PollsReceiver.deletedPolls()
is invoked when a polls is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPolls(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.deletedPolls()
is invoked when the specified
polls is deleted.pollsId
- the Id
of the Polls
to
monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPollsAncestors(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.deletedPollsAncestor()
is invoked when the
specified polls experiences a removal of an ancestor.pollsId
- the Id
of the polls to monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPollsDescendants(Id pollsId) throws OperationFailedException, PermissionDeniedException
PollsReceiver.deletedPollsDescendnant()
is invoked when the
specified polls experiences a removal of one of its descdendents.pollsId
- the Id
of the polls to monitorNullArgumentException
- pollsId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.