public interface PostNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Post
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.
Notifications are triggered with changes to the Post
object itself. Adding and removing replies result in notifications
available from the notification session for replies.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgePostNotification(Id notificationId)
Acknowledge a post notification.
|
boolean |
canRegisterForPostNotifications()
Tests if this user can register for
Post notifications. |
Forum |
getForum()
Gets the
Forum associated with this session. |
Id |
getForumId()
Gets the
Forum Id associated with this
session. |
void |
registerForChangedPost(Id postId)
Registers for notification of an updated post.
|
void |
registerForChangedPosts()
Registers for notification of updated posts.
|
void |
registerForChangedPostsForPoster(Id resourceId)
Register for notifications of changed posts for the given poster
resource
Id. |
void |
registerForDeletedPost(Id postId)
Registers for notification of a deleted post.
|
void |
registerForDeletedPosts()
Registers for notification of deleted posts.
|
void |
registerForDeletedPostsForPoster(Id resourceId)
Register for notifications of deleted posts for the given poster
resource
Id. |
void |
registerForNewPosts()
Register for notifications of new posts.
|
void |
registerForNewPostsForPoster(Id resourceId)
Register for notifications of new posts for the given poster resource
Id. |
void |
reliablePostNotifications()
Reliable notifications are desired.
|
void |
unreliablePostNotifications()
Unreliable notifications are desired.
|
void |
useFederatedForumView()
Federates the view for methods in this session.
|
void |
useIsolatedForumView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getForumId()
Forum
Id
associated with this
session. Forum Id
associated with this sessionmandatory
- This method must be implemented. Forum getForum() throws OperationFailedException, PermissionDeniedException
Forum
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForPostNotifications()
Post
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 useFederatedForumView()
mandatory
- This method is must be implemented. void useIsolatedForumView()
mandatory
- This method is must be implemented. void reliablePostNotifications()
acknowledgePostNotification()
.mandatory
- This method is must be implemented. void unreliablePostNotifications()
mandatory
- This method is must be implemented. void acknowledgePostNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.newPosts()
is invoked when a new Post
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewPostsForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
PostReceiver.newPosts()
is invoked
when a new Post
is created.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.changedPosts()
is invoked when a post is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPostsForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
PostReceiver.changedPosts()
is invoked when a Post
for the given agent is updated.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPost(Id postId) throws OperationFailedException, PermissionDeniedException
PostReceiver.changedPosts()
is invoked when the specified post
is changed.postId
- the Id
of the Post
to
monitorNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPosts() throws OperationFailedException, PermissionDeniedException
PostReceiver.deletedPosts()
is invoked when a post is deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPostsForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
PostReceiver.deletedPosts()
is invoked when a Post
for the given agent is removed.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPost(Id postId) throws OperationFailedException, PermissionDeniedException
PostReceiver.deletedPosts()
is invoked when the specified post
is deleted.postId
- the Id
of the Post
to
monitorNullArgumentException
- postId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.