Interface ReplyNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Reply 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.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeReplyNotification(Id notificationId) Acknowledge a reply notification.booleanTests if this user can register forReplynotifications.getForum()Gets theForumassociated with this session.Gets theForumIdassociated with this session.voidRegisters for notification of updated replies.voidregisterForChangedRepliesForPost(Id postId) Register for notifications of changed replies for the given postId.voidregisterForChangedRepliesForPoster(Id resourceId) Register for notifications of changed replies for the given poster resourceId.voidregisterForChangedReply(Id replyId) Registers for notification of an updated reply.voidRegisters for notification of deleted replies.voidregisterForDeletedRepliesForPost(Id postId) Register for notifications of deleted replies for the given postId.voidregisterForDeletedRepliesForPoster(Id resourceId) Register for notifications of deleted replies for the given poster resourceId.voidregisterForDeletedReply(Id replyId) Registers for notification of a deleted reply.voidRegister for notifications of new replies.voidregisterForNewRepliesForPost(Id postId) Register for notifications of new replies for the given postId.voidregisterForNewRepliesForPoster(Id resourceId) Register for notifications of new replies for the given poster resourceId.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getForumId
Id getForumId()Gets theForumIdassociated with this session.- Returns:
- the
Forum Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getForum
Gets theForumassociated with this session.- Returns:
- the forum
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForReplyNotifications
boolean canRegisterForReplyNotifications()Tests if this user can register forReplynotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedForumView
void useFederatedForumView()Federates the view for methods in this session. A federated view will include notifications for replies in forums which are children of this forum in the forum hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedForumView
void useIsolatedForumView()Isolates the view for methods in this session. An isolated view restricts notifications to this forum only.- Compliance:
mandatory- This method is must be implemented.
-
reliableReplyNotifications
void reliableReplyNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeReplyNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableReplyNotifications
void unreliableReplyNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeReplyNotification
void acknowledgeReplyNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a reply notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewReplies
Register for notifications of new replies.ReplyReceiver.newReplies()is invoked when a newReplyis created.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRepliesForPoster
void registerForNewRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of new replies for the given poster resourceId.ReplyReceiver.newReplies()is invoked when a newReplyis created.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewRepliesForPost
void registerForNewRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException Register for notifications of new replies for the given postId.ReplyReceiver.newReplies()is invoked when a newReplyis created.- Parameters:
postId- theIdof the post to monitor- Throws:
NullArgumentException-postIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReplies
Registers for notification of updated replies.ReplyReceiver.changedReplies()is invoked when a reply is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRepliesForPoster
void registerForChangedRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed replies for the given poster resourceId.ReplyReceiver.changedReplies()is invoked when aReplyfor the poster is changed.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedRepliesForPost
void registerForChangedRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException Register for notifications of changed replies for the given postId.ReplyReceiver.changedReplies()is invoked when aReplyfor the post is changed.- Parameters:
postId- theIdof the post to monitor- Throws:
NullArgumentException-postIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedReply
Registers for notification of an updated reply.ReplyReceiver.changedReplies()is invoked when the specified reply is changed.- Parameters:
replyId- theIdof theReplyto monitor- Throws:
NullArgumentException-replyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReplies
Registers for notification of deleted replies.ReplyReceiver.deletedReplies()is invoked when a reply is deleted.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRepliesForPoster
void registerForDeletedRepliesForPoster(Id resourceId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted replies for the given poster resourceId.ReplyReceiver.deletedReplies()is invoked when aReplyfor the poster is deleted.- Parameters:
resourceId- theIdof the resource to monitor- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedRepliesForPost
void registerForDeletedRepliesForPost(Id postId) throws OperationFailedException, PermissionDeniedException Register for notifications of deleted replies for the given postId.ReplyReceiver.deletedReplies()is invoked when aReplyfor the post is deleted.- Parameters:
postId- theIdof the post to monitor- Throws:
NullArgumentException-postIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedReply
Registers for notification of a deleted reply.ReplyReceiver.deletedReplies()is invoked when the specified reply is deleted.- Parameters:
replyId- theIdof theReplyto monitor- Throws:
NullArgumentException-replyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-